Id
stringlengths
1
6
PostTypeId
stringclasses
7 values
AcceptedAnswerId
stringlengths
1
6
ParentId
stringlengths
1
6
Score
stringlengths
1
4
ViewCount
stringlengths
1
7
Body
stringlengths
0
38.7k
Title
stringlengths
15
150
ContentLicense
stringclasses
3 values
FavoriteCount
stringclasses
3 values
CreationDate
stringlengths
23
23
LastActivityDate
stringlengths
23
23
LastEditDate
stringlengths
23
23
LastEditorUserId
stringlengths
1
6
OwnerUserId
stringlengths
1
6
Tags
list
8347
1
null
null
21
3619
While attending conferences, there has been a bit of a push by advocates of Bayesian statistics for assessing the results of experiments. It is vaunted as both more sensitive, appropriate, and selective towards genuine findings (fewer false positives) than frequentist statistics. I have explored the topic somewhat, an...
Is Bayesian statistics genuinely an improvement over traditional (frequentist) statistics for behavioral research?
CC BY-SA 2.5
null
2011-03-11T19:47:33.830
2011-03-18T11:36:47.960
2011-03-16T07:50:42.073
449
null
[ "bayesian", "statistical-power", "frequentist" ]
8348
2
null
8347
2
null
I am not familiar with Bayesian Statistics myself but I do know that Skeptics Guide to the Universe Episode 294 has and interview with Eric-Jan Wagenmakers where they discuss Bayesian Statistics. Here is a link to the podcast: [http://www.theskepticsguide.org/archive/podcastinfo.aspx?mid=1&pid=294](http://www.theskepti...
null
CC BY-SA 2.5
null
2011-03-13T04:16:06.883
2011-03-13T04:16:06.883
null
null
null
null
8349
1
8488
null
2
185
I'm a complete noob when it comes to statistics, so please excuse my lack of standard terminology. I think my question might be related to normalization, but please re-tag if I'm wrong. I'm a programmer by trade, and I've been tasked with creating a chart which shows how the number of errors in a data set change from ...
Charting errors based on number of items per month
CC BY-SA 2.5
null
2011-03-16T09:06:15.457
2011-03-19T10:40:15.893
2011-03-16T11:55:43.973
3735
3735
[ "data-visualization", "descriptive-statistics" ]
8350
2
null
8347
5
null
Bayesian statistics can be derived from a few Logical principles. Try Searching "probability as extended logic" and you will find more in depth analysis of the fundamentals. But basically, Bayesian statistics rests on three basic "desiderata" or normative principles: - The plausability of a proposition is to be repr...
null
CC BY-SA 2.5
null
2011-03-16T09:23:16.897
2011-03-18T11:36:47.960
2017-04-13T12:44:44.530
-1
2392
null
8351
1
8359
null
8
7389
I have a quarterly time series and test for stationarity with an augmented Dickey-Fuller test using R. ``` adf.test(myseries) # returns # Dickey-Fuller = -3.9828, Lag order = 4, p-value = 0.01272 # alternative hypothesis: stationary ``` so the H0 is rejected. I tried to validate this intuitively and regressed the sam...
Trend or no trend?
CC BY-SA 2.5
null
2011-03-16T09:29:27.813
2011-03-16T22:55:24.480
2011-03-16T15:06:42.183
704
704
[ "r", "time-series", "loess" ]
8352
1
null
null
2
634
I would like to analyse the following type of experiment using a two-level fully nested ANOVA. We have mice of two genotypes (Group factor) and for each of the genotypes we take a certain number of mice (sub-groups) and measure several identical samples per each mouse. Thus it looks like a classic two-level nested desi...
What is the proper ratio of mean squares for a two-level nested ANOVA?
CC BY-SA 3.0
null
2011-03-16T10:00:26.227
2011-06-22T08:48:31.287
2011-06-21T20:45:01.260
930
1727
[ "anova", "experiment-design", "genetics" ]
8353
2
null
8335
3
null
Using the suggested corrected data we have: The model to be tested is : Y(T)=B0 + B1*X(T) + A(T) The null hypothesis is that the set B0 and B1 are the same over the two states step 1 : Estimate this for STATE1 obtaining an error sum of squares SOS1 =.789 step 2 : Estimate this for STATE2 obtaining an error sum of squar...
null
CC BY-SA 2.5
null
2011-03-16T10:25:22.210
2011-03-17T11:37:41.620
2011-03-17T11:37:41.620
2116
3382
null
8354
2
null
8344
22
null
Influence functions are basically an analytical tool that can be used to assess the effect (or "influence") of removing an observation on the value of a statistic without having to re-calculate that statistic. They can also be used to create asymptotic variance estimates. If influence equals $I$ then asymptotic varia...
null
CC BY-SA 2.5
null
2011-03-16T11:27:17.790
2011-03-16T11:35:25.490
2011-03-16T11:35:25.490
2392
2392
null
8355
2
null
8351
5
null
[Larry Bretthorst's extended phd](http://bayes.wustl.edu/glb/book.pdf) will greatly help you I think. You should take the discrete fourier transform of the data. This will give you a look at your series in the frequency domain. Trend is represented by low frequency. Ultimate modeling book. It's 200 pages, but well...
null
CC BY-SA 2.5
null
2011-03-16T11:46:52.670
2011-03-16T11:46:52.670
null
null
2392
null
8357
2
null
8334
6
null
Your question is most interesting to me and it's solution has been my primary research for a number of years. There are a number of ways that "a structural break" may occur. If there is a change in the Intercept or a change in Trend in "the latter portion of the time series" then one would be better suited to perform ...
null
CC BY-SA 2.5
null
2011-03-16T12:27:38.923
2011-03-16T13:50:24.793
2011-03-16T13:50:24.793
3382
3382
null
8358
1
8543
null
4
679
I am a beginner in statistics with just basic knowledge. I have these data: cases, deaths and CFR (Case Fatality Rate-deaths per 100 cases) of a disease for 17 years (1994-2010) from 2 neighbouring states where people can walk across the states freely. This is a population based cohort study. Data are available from 19...
How to assess effect of intervention in one state versus another using annual case fatality rate?
CC BY-SA 2.5
null
2011-03-16T12:31:39.013
2011-03-20T20:31:57.940
2011-03-16T13:00:03.317
null
2956
[ "time-series", "statistical-significance", "spss", "relative-risk" ]
8359
2
null
8351
7
null
The answer to your first question is no. If the null hypothesis of unit root is rejected, the alternative in its most general form is stationary series with [time trend](http://en.wikipedia.org/wiki/Augmented_Dickey%E2%80%93Fuller_test). Here is the example: ``` > rr <- 1+0.01*(1:100)+rnorm(100) > plot(rr) > adf.test(r...
null
CC BY-SA 2.5
null
2011-03-16T12:44:21.670
2011-03-16T12:44:21.670
null
null
2116
null
8361
5
null
null
0
null
[ggplot2](http://had.co.nz/ggplot2/) is an [actively maintained, open-source](https://github.com/hadley/ggplot2) chart-drawing library for [r](/questions/tagged/r), written by [Hadley Wickham](http://stackoverflow.com/users/16632/hadley), based upon the principles of ["The Grammar of Graphics"](https://rads.stackoverfl...
null
CC BY-SA 4.0
null
2011-03-16T14:34:23.620
2020-07-02T00:46:57.570
2020-07-02T00:46:57.570
7290
3376
null
8362
4
null
null
0
null
ggplot2 is an enhanced plotting library for R based upon the principles of "The Grammar of Graphics". Use this tag for *on topic* questions that (a) involve `ggplot2` as a critical part of the question &/or expected answer, & (b) are not just about how to use `ggplot2`.
null
CC BY-SA 4.0
null
2011-03-16T14:34:23.620
2020-07-02T00:44:16.790
2020-07-02T00:44:16.790
7290
null
null
8363
2
null
8342
1
null
Initially I suggested to try one of the constrained ordination techniques from the `vegan` package, but on a second thought I doubt that this would be useful, as you actually have 2 contingency tables. I hope that the second part of [this example](http://is.gd/CSS9QV) [PDF: R Demonstration – Categorical Analysis] will ...
null
CC BY-SA 2.5
null
2011-03-16T14:47:55.757
2011-03-17T08:06:04.890
2011-03-17T08:06:04.890
3467
3467
null
8364
2
null
8347
15
null
A quick response to the bulleted content: 1) Power / Type 1 error in a Bayesian analysis vs. a frequentist analysis Asking about Type 1 and power (i.e. one minus the probability of Type 2 error) implies that you can put your inference problem into a repeated sampling framework. Can you? If you can't then there isn't ...
null
CC BY-SA 2.5
null
2011-03-16T14:54:27.780
2011-03-16T14:54:27.780
null
null
1739
null
8367
2
null
8303
6
null
One idea would be to use a random forest and then use the variable importance measures it outputs to choose your best 8 variables. Another idea would be to use the "boruta" package to repeat this process a few hundred times to find the 8 variables that are consistently most important to the model.
null
CC BY-SA 2.5
null
2011-03-16T16:04:09.750
2011-03-16T16:04:09.750
null
null
2817
null
8369
2
null
8342
1
null
Logistic regression seems appropriate for your problem. The variable you are trying to predict is the probability that an observation (which is either species A or species B) is species A. The covariates are $host$, $rain$ and optionally $host*rain$. The R command would be: > glm(formula = species ~ host + rain, fam...
null
CC BY-SA 2.5
null
2011-03-16T16:38:09.173
2011-03-16T18:38:27.713
2011-03-16T18:38:27.713
3567
3567
null
8370
1
8372
null
6
2304
I have a matrix of positive real numbers between 0 and 1; the rows represent genes and columns represent samples. Number of rows is greater than the number of columns by a magnitude of $10^4$. I am wondering how to visualize this in `R`. I know heatmap is one of the ways to do this, but are there other ideas. Here are ...
How to visualize/summarize a matrix with number of rows $\gg$ number of columns?
CC BY-SA 2.5
null
2011-03-16T17:04:50.353
2011-03-16T20:14:48.487
2011-03-16T17:44:54.310
930
1307
[ "r", "data-visualization", "genetics" ]
8371
1
9657
null
10
1792
French polling institutes are currently facing a major crisis after they recently published what can only be called [the most ridiculous poll so far](http://www.bbc.co.uk/news/world-europe-12660329) on the 2012 presidential election horse race. The French Senate is now considering to legislate on the issue by forcing p...
Do confidence intervals apply to quota sampling?
CC BY-SA 2.5
null
2011-03-16T17:38:34.997
2019-07-17T12:03:09.373
null
null
3582
[ "sampling", "polling" ]
8372
2
null
8370
6
null
Find one-dimensional [multidimensional scaling solutions](http://en.wikipedia.org/wiki/Multidimensional_scaling) for the rows and for the columns (separately), using whatever similarity measures you like (such as correlation). Sort the rows and columns according to their MDS positions. This will bring similar genes t...
null
CC BY-SA 2.5
null
2011-03-16T18:29:31.027
2011-03-16T18:29:31.027
null
null
919
null
8373
1
null
null
15
12360
I am seeing a regression model which is regressing Year-on-Year stock index returns on lagged (12 months) Year-on-Year returns of the same stock index, credit spread (difference between monthly mean of risk-free bonds and corporate bond yields), YoY Inflation rate and YoY index of industrial production. It looks thus (...
Time series regression with overlapping data
CC BY-SA 3.0
null
2011-03-16T18:40:35.840
2023-03-12T14:27:22.750
2023-03-12T14:27:22.750
53690
1349
[ "regression", "time-series", "autocorrelation", "overlapping-data" ]
8374
1
null
null
8
266
I am trying to correlate age (6-90 yrs) with loudness of voice (in dB). However, my data do not contain any data points in the range of 20-50 yrs. What correlation measure is most appropriate with such a considerable gap, and why? I have been using Kendall Tau so far. Note that we are not dealing with bimodally distri...
Which correlation measure should be used with a large gap (missing data)?
CC BY-SA 2.5
null
2011-03-16T18:52:37.840
2011-03-16T22:59:14.990
2011-03-16T22:44:11.883
919
null
[ "distributions", "correlation", "missing-data" ]
8375
1
8806
null
17
9270
I am looking to build a predictive model for predicting churn and looking to use a discrete time survival model fitted to a person-period training dataset (one row for each customer and discrete period they were at risk, with an indicator for event – equaling 1 if the churn happened in that period, else 0). - I am fi...
Survival Model for Predicting Churn - Time-varying predictors?
CC BY-SA 4.0
null
2011-03-16T19:58:45.120
2018-07-01T11:28:47.083
2018-06-04T07:11:26.640
128677
2040
[ "survival", "predictive-models", "churn" ]
8376
2
null
8370
6
null
I was about to suggest something along @whuber's answer (I used this reordering technique but in a context of feature selection, so I was mainly concerned with the "variables view"). So let me suggest two other directions (but the first one is close to the already proposed one). As far as heatmaps are concerned, you ca...
null
CC BY-SA 2.5
null
2011-03-16T20:14:48.487
2011-03-16T20:14:48.487
null
null
930
null
8377
1
8383
null
7
1571
I am a first year psychology student. I am doing some research work with a prof, unfortunately the material that I need to use right now is covered only in my second year. But I need to already know it now. So I am burning through any resources I can find to quickly come up to speed. I need help to understand this part...
Understanding multiple regression output
CC BY-SA 2.5
null
2011-03-16T20:55:08.437
2011-03-17T16:58:37.463
2011-03-17T16:58:37.463
919
3745
[ "regression", "anova", "sas" ]
8378
2
null
8342
11
null
There are two ways to interpret your first question, which are reflected in the two ways you asked it: “Are species associated with host plants?” and, “Are species independent to host plants, given the effect of rain?” The first interpretation corresponds to a model of joint independence, which states that species and...
null
CC BY-SA 2.5
null
2011-03-16T21:16:26.233
2011-03-16T21:21:45.497
2011-03-16T21:21:45.497
3432
3432
null
8379
2
null
8374
8
null
Create a scatterplot to check whether it makes any sense to suppose that a single correlation coefficient is an adequate description of the association between the variables. For example, in these (simulated) data the correlation for ages 6-20 is 90%, for ages 50+ it's -70%, and overall it's 15%. In such a situation r...
null
CC BY-SA 2.5
null
2011-03-16T22:15:34.437
2011-03-16T22:15:34.437
null
null
919
null
8380
1
null
null
4
396
I want to build a linear model to predict a scalar output from a vector of noisy scalar variable measurements. I have two separate training data sets. One has output data and corresponding exact variable measurements. The other has exact variable measurements and corresponding noisy variable measurements. The noisy ...
Building linear model from exact variable measurements for use with noisy variable measurements
CC BY-SA 2.5
null
2011-03-16T22:15:53.453
2011-03-25T16:48:20.410
2011-03-21T16:06:20.593
3744
3744
[ "r", "regression", "predictive-models", "errors-in-variables" ]
8381
2
null
652
1
null
Agresti & Finlay's Statistical Methods for the Social Sciences is quite good, though I'd like to believe there is a good open source alternative. Is it wrong to use an amazon affiliate link here?
null
CC BY-SA 2.5
null
2011-03-16T22:34:19.733
2011-03-16T22:34:19.733
null
null
3748
null
8382
1
8438
null
6
611
So I have data that has been quantized by an analogue to digital converter. (continuous data has been turned into discrete data and the values range from 0 to the saturation value , which is 127 in this case). This particular instrument I used to gather the data is quite noisy, let's say there is added Gaussian noise...
How to average quantized and truncated data?
CC BY-SA 3.0
null
2011-03-16T22:52:36.403
2017-04-23T16:16:25.247
2017-04-23T16:16:25.247
11887
3749
[ "mean", "discrete-data", "signal-processing", "winsorizing" ]
8383
2
null
8377
6
null
It seems like you need an introduction to regression. People made book recommendations [here](https://stats.stackexchange.com/questions/652/best-books-for-an-introduction-to-statistical-data-analysis). Free book recommendations [here](https://stats.stackexchange.com/questions/170/free-statistical-textbooks). It's har...
null
CC BY-SA 2.5
null
2011-03-16T22:54:57.350
2011-03-17T00:22:58.507
2017-04-13T12:44:35.347
-1
3748
null
8384
2
null
8351
1
null
The ADF test has weak power and, as Dmitrij Celov mentioned, you should probably also check the results of PP and KPSS tests. If you find that your results are on the margin of detecting a unit root, it's possible your series is fractionally integrated. I would also check ACF and PACF plots of the series, looking for s...
null
CC BY-SA 2.5
null
2011-03-16T22:55:24.480
2011-03-16T22:55:24.480
null
null
3265
null
8386
2
null
290
2
null
Alex Tabarrok posted a great list of resources here on [marginalrevolution.com](http://marginalrevolution.com/marginalrevolution/2011/01/stata-resources.html?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3a+marginalrevolution/hCQh+%28Marginal+Revolution%29) Gabriel Rossman shares a good introductory guide [he...
null
CC BY-SA 2.5
null
2011-03-16T23:45:24.433
2011-03-17T00:16:14.973
2011-03-17T00:16:14.973
3748
3748
null
8387
2
null
103
4
null
Andrew Gelman doesn't limit himself to visualization, but he comments on it frequently. [Statistical Modeling, Causal Inference, and Social Science](http://www.stat.columbia.edu/~gelman/blog/)
null
CC BY-SA 3.0
null
2011-03-16T23:59:43.900
2012-10-24T14:54:19.153
2012-10-24T14:54:19.153
615
3748
null
8388
2
null
363
8
null
Andrew Gelman's interesting book recommendations are here: [http://thebrowser.com/interviews/andrew-gelman-on-statistics](http://thebrowser.com/interviews/andrew-gelman-on-statistics)
null
CC BY-SA 2.5
null
2011-03-17T00:09:23.670
2011-03-17T00:09:23.670
null
null
3748
null
8389
1
null
null
5
654
I need a closed-form expression for the probability that 2 values drawn at random from a normal distribution are separated by at most T, as a function of T and the variance of the distribution. I can formulate the problem as an integration, but can't solve it. I'd be happy with a well-motivated approximation. I'd be am...
Probability that two values drawn at random from a normal distribution are separated by at most T
CC BY-SA 2.5
null
2011-03-17T00:30:01.570
2011-03-17T02:07:17.637
null
null
null
[ "normal-distribution", "sample" ]
8390
2
null
7562
4
null
Looking at the example for `postStratify` in the [manual](http://cran.r-project.org/web/packages/survey/survey.pdf), you are correct: you seem to be required to give a `svydesign` object (though you can if needed use `svrepdesign` to specify it instead). The `svydesign` object must have `ids`; all the others are opti...
null
CC BY-SA 2.5
null
2011-03-17T00:40:10.997
2011-03-17T00:40:10.997
null
null
2958
null
8391
2
null
8389
10
null
The distribution of the difference between two single independent samples from normal distributions has a mean which is the difference between the means of the original distributions and a variance which is the sum of the variances of the original distributions. So in your case, if the normal distribution of $X$ has ...
null
CC BY-SA 2.5
null
2011-03-17T00:47:18.960
2011-03-17T02:07:17.637
2011-03-17T02:07:17.637
919
2958
null
8392
1
8431
null
5
144
I have logs of which users run which programs on our systems at a university. The data shows username, process time, and the time stamp for the sample. I also know which classes each user is in. Given this data, is it possible to reliably tell which professors/courses use a particular piece of software? I figure this m...
How to determine course-based usage of software?
CC BY-SA 2.5
0
2011-03-17T01:02:41.093
2011-03-19T09:46:11.220
2011-03-17T21:59:53.503
3369
2814
[ "r", "modeling" ]
8393
1
8403
null
2
434
I have three questions. - I want to conduct a planned comparison in ANCOVA which compares three groups (n=2, n=7 and n=5) with two groups (n=11 and n=25). Is it ok to include the group with n=2 if I am only conducting a planned comparison as described above? - Is it ok to conduct an ANCOVA when I am only comparing tw...
Questions about number of groups and group size in planned comparisons in ANCOVA
CC BY-SA 2.5
null
2011-03-17T01:17:24.617
2011-03-17T10:39:06.427
null
null
2025
[ "data-transformation", "ancova", "small-sample" ]
8394
2
null
2917
0
null
You may consider trying the R package [compute.es](http://cran.r-project.org/web/packages/compute.es/index.html). There are several functions for deriving effect size estimates and the variance of the effect size.
null
CC BY-SA 2.5
null
2011-03-17T01:53:03.130
2011-03-17T02:47:49.370
2011-03-17T02:47:49.370
1381
null
null
8395
2
null
8157
4
null
If I understand you correctly, only points in some small volume of n-dimensional space meet your constraints. Your first constraint constrains it to the interior of a hypersphere, which reminds me of the comp.graphics.algorithms FAQ ["Uniform random points on sphere"](http://www.cgafaq.info/wiki/Uniform_random_points_o...
null
CC BY-SA 2.5
null
2011-03-17T02:56:04.293
2011-03-17T02:56:04.293
2017-04-13T12:44:46.680
-1
3754
null
8396
1
null
null
5
5108
I do not know why package forecast 2.16 in R does not produce Theil's U? I really appreciate your efforts.
How to produce Theil's U with package forecast 2.16 in R?
CC BY-SA 2.5
null
2011-03-17T03:27:07.263
2015-07-21T20:22:14.807
2011-03-17T07:22:09.587
2116
null
[ "r", "forecasting", "goodness-of-fit" ]
8397
2
null
8377
2
null
You may be interested by [this](http://joyeuserrance.wordpress.com/2010/11/25/the-linear-model-2-simple-linear-regression/) introduction to the linear model (basis of almost any statistical analyses), and linear regression in particular: - it thoroughly explains lots of the mathematical aspects of linear regression, b...
null
CC BY-SA 2.5
null
2011-03-17T04:08:33.860
2011-03-17T04:08:33.860
null
null
3459
null
8398
2
null
8396
12
null
It does. Use the `accuracy()` command. Update: here is an example. ``` library(forecast) x <- EuStockMarkets[1:200,1] f <- EuStockMarkets[201:300,1] fit1 <- ses(x,h=100) accuracy(fit1,f) ME RMSE MAE MPE MAPE MASE ACF1 Theil's U 0.8065983 78.1801986 63.2728352 -0.1725009 ...
null
CC BY-SA 2.5
null
2011-03-17T05:01:07.543
2011-03-17T09:28:55.800
2011-03-17T09:28:55.800
159
159
null
8399
1
null
null
3
2532
I posted [this](https://electronics.stackexchange.com/q/10632/2939) question on Electronics.Stackexchange and someone told me I'll be better off posting it here. Its an implementation of the Particle Filter using MATLAB but the results never follow the observations. I changed the weighting function to be Gaussian but ...
Particle filter in Matlab - what is going wrong?
CC BY-SA 2.5
null
2011-03-17T05:09:45.780
2011-06-15T13:00:42.117
2017-04-13T12:33:11.210
-1
null
[ "correlation", "matlab", "monte-carlo", "particle-filter" ]
8401
1
null
null
11
2566
I am working on a research project that is related to optimization and recently had an idea to use MCMC in this setting. Unfortunately, I am fairly new to MCMC methods so I had several questions. I'll start by describing the problem and then asking my questions. Our problem boils down to estimating the expected value o...
Using MCMC to evaluate the expected value of a high-dimensional function
CC BY-SA 2.5
0
2011-03-17T06:41:46.460
2014-09-22T20:13:17.627
2011-03-17T08:51:51.883
3572
3572
[ "sampling", "markov-chain-montecarlo", "matlab", "expected-value" ]
8402
2
null
8377
2
null
If you want a book specifically on this sort of regression - as opposed to data analysis in general - I recommend [Regression Analysis by Example by Chatterjee and Price](http://rads.stackoverflow.com/amzn/click/0471746967). Good, not technical, but it doesn't oversimplify.
null
CC BY-SA 2.5
null
2011-03-17T10:33:44.997
2011-03-17T10:33:44.997
null
null
686
null
8403
2
null
8393
4
null
First off, with such small N, I think anything that comes close to statistical significance is going to pass the inter-ocular trauma test - it will hit you between the eyes. I am not sure what you mean by compare 3 groups with 2 groups. Do you mean you want to combine the three groups into one, and the 2 groups into a...
null
CC BY-SA 2.5
null
2011-03-17T10:39:06.427
2011-03-17T10:39:06.427
null
null
686
null
8404
2
null
726
35
null
> The plural of anecdote is not data. -- Roger Brinner (in the context of [Anecdotal_evidence](http://en.wikipedia.org/wiki/Anecdotal_evidence))
null
CC BY-SA 2.5
null
2011-03-17T10:53:40.767
2011-03-17T10:53:40.767
null
null
264
null
8405
1
8410
null
3
5488
I have continuous data $A$ and categorical data $O$. I need counts of $A$ in bins by group $O$. I'm working in R. I know how to bin data (using `cut2`) and how to get the counts of $O$ (using `aggregate` or `by` or `describe` or `summaryBy`). I could also get what I need by running one of these functions with a subset ...
Counts of binned data by group
CC BY-SA 2.5
null
2011-03-17T12:03:05.233
2011-03-28T06:07:52.767
2011-03-22T09:04:58.307
2824
2824
[ "r", "descriptive-statistics", "binning" ]
8406
2
null
726
7
null
> The researcher armed with a confidence interval, but deprived of the false respectability of statistical significance, must work harder to convince himself and others of the importance of his findings. This can only be good. Michael Oakes, Statistical inference: A commentary for the social and behaviou...
null
CC BY-SA 2.5
null
2011-03-17T12:05:58.503
2011-03-17T12:05:58.503
null
null
2669
null
8407
1
8417
null
26
34327
I would like to import the "Last Trade" stock price from Yahoo finance into R. The intention is to work with (almost) real time data. Are there any solutions? Thanks in advance for any helpful comment.
Import stock price from Yahoo Finance into R?
CC BY-SA 2.5
null
2011-03-17T12:11:10.293
2016-03-01T17:19:29.597
2011-03-18T16:15:41.810
null
3757
[ "r" ]
8408
2
null
8407
15
null
That is pretty easy given that [R](http://www.r-project.org) can read directly off a given URL. The key is simply to know how to form the URL. Here is a quick and dirty example based on code Dj Padzensky wrote in the late 1990s and which I have been maintaining in the [Perl](http://www.perl.org) module [Yahoo-FinanceQ...
null
CC BY-SA 2.5
null
2011-03-17T12:29:03.407
2011-03-17T12:29:03.407
null
null
334
null
8409
2
null
8401
4
null
I would always remember, that MCMC is just a numerical integration tool (and a rather inefficient one at that). It is not some magic/mystical thing. It is very useful because it is reasonably easy to apply. It does not require much thinking compared to some other numerical integration techniques. For instance, you ...
null
CC BY-SA 2.5
null
2011-03-17T12:40:34.437
2011-03-17T12:40:34.437
null
null
2392
null
8410
2
null
8405
6
null
I really like using the `summary.formula` function in the `Hmisc` package for these tasks. Some artificial data: ``` A <- rnorm(100, mean=50, sd=20) G <- gl(2, 50) B <- unclass(G)*10 + rnorm(100, sd=3) ``` Descriptives by `G`: ``` summary( G ~ cut2(A,g=4) + B, method="reverse") Descriptive Statistics by G +-----...
null
CC BY-SA 2.5
null
2011-03-17T13:04:36.523
2011-03-17T15:52:42.263
2011-03-17T15:52:42.263
279
279
null
8413
2
null
8377
4
null
The two together don't tell you anything more than the second one would alone! The main effects are uninteresting and misleading when there is interaction present. The second model tells you all you need to know. Here are a couple of plots, with R code, to help you understand what that second model looks like... ``` l...
null
CC BY-SA 2.5
null
2011-03-17T14:42:00.950
2011-03-17T14:42:00.950
null
null
485
null
8415
1
8416
null
5
658
I have a time series, let's call it $y(t)$. Augmented Dickey-Fuller and Phillips-Perron tests indicate no unit root but a deterministic trend. The series is strongly autocorrelated. I estimated the following short-run dynamic model: $$y(t) = \alpha + \beta\cdot y(t-1) + \gamma\cdot t + \varepsilon_t$$ where $\alpha$, ...
Short and long-run trend
CC BY-SA 2.5
null
2011-03-17T16:09:46.423
2011-03-17T16:46:02.370
2011-03-17T16:30:57.613
919
3762
[ "time-series", "model-selection", "trend" ]
8416
2
null
8415
3
null
There is no quick solution to the problem, since the deterministic trend is just a function of $t$. We may denote this trend by $f(t)$ and it is not evident that the trend is linear. So some quick tips what to do in this case: - Plot the original data, though the noise ratio could be huge therefore... - Make technica...
null
CC BY-SA 2.5
null
2011-03-17T16:46:02.370
2011-03-17T16:46:02.370
null
null
2645
null
8417
2
null
8407
14
null
This really isn't a statistics question (perhaps this could be moved to SO?), but there's a nice function in [quantmod](http://www.quantmod.com) that does what Dirk has done by hand. See `getQuote()` and `yahooQF()`. Typing `yahooQF()` will bring up a menu of all the possible quote formats you can use. ``` > require(...
null
CC BY-SA 3.0
null
2011-03-17T16:48:37.487
2011-07-01T07:25:32.483
2011-07-01T07:25:32.483
3651
1657
null
8418
1
null
null
1
2917
I have a dataset with repeated measures at different speeds. I've binned the speed ranges into 0-0.5, 0.5-1.5, and 1.5-infinity. ``` mydata`$`fact<−cut(mydata$section, breaks=c(0,0.5,1.5,Inf)) ``` which gives the levels (0,0.5] (0.5,1.5] (1.5,Inf] I first used the lme to test all speeds together to see if x and y ...
How can I specify a level of a factor while in an lme?
CC BY-SA 2.5
null
2011-03-17T16:52:45.347
2011-03-17T18:10:24.983
2011-03-17T16:56:34.597
919
null
[ "r", "mixed-model" ]
8419
1
8434
null
3
7056
Supposing a Bayesian classifier with multivariate normal densities, how do I find the error rate of the classifier when we have two classes? I am using this: When dimension $d = 1$: $$P(x | \mu , \sigma^2) = N(x, \mu, \sigma^2) = \frac{1}{\sqrt{2\pi \sigma^2}} e^{-\frac{(x-\mu)^2}{2\sigma^2}} $$ In $d$ dimensions: $$P(...
Bayesian classifier with multivariate normal densities
CC BY-SA 2.5
null
2011-03-17T17:18:25.883
2011-04-29T00:57:16.927
2011-04-29T00:57:16.927
3911
3681
[ "machine-learning", "naive-bayes" ]
8420
1
8450
null
4
196
Other then gapminder.org, could you please direct me to any good examples (interactive or static) of visualizations that compare between countries?
Examples of visualization featuring comparisons between countries?
CC BY-SA 3.0
null
2011-03-17T17:33:20.797
2017-10-06T09:42:48.480
2017-10-06T09:42:48.480
11887
253
[ "data-visualization" ]
8421
2
null
7720
2
null
To 'test' (i.e., evaluate) the proportional odds assumption in R, you can use residuals.lrm() in Frank Harrell Jr.'s Design package. If you type ?residuals.lrm , there is a quick-to-replicate example of how Frank Harrell recommends evaluating the proportional odds assumption (i.e., visually, rather than by a push-butto...
null
CC BY-SA 3.0
null
2011-03-17T17:52:24.270
2017-01-29T21:05:53.147
2017-01-29T21:05:53.147
145102
3763
null
8422
2
null
8206
2
null
Here is mine implementation of your solutions. I've decided not to map the mean value, there is not to much space left. Also the line from 0 to 1 seems odd. Thank's a lot everyone. ``` data <- read.table("roc_average.txt") bxp <- boxplot(data, horizontal = TRUE, range = 0, axes = FALSE, col = "grey", add = TRUE, at = 0...
null
CC BY-SA 2.5
null
2011-03-17T17:58:12.653
2011-03-19T12:26:25.473
2011-03-19T12:26:25.473
3345
3345
null
8424
2
null
8418
1
null
If you just want to fit separate models for each level of your factor, then probably the easiest way is to use the `subset=` argument to `lme` (or any other GLM in R, btw). For example, ``` lme(y ~ x + factor(repeatedmeasures) + fact, random = ~1 | z, data=mydata, subset=as.numeric(fact) == 1) ``` should subset o...
null
CC BY-SA 2.5
null
2011-03-17T18:10:24.983
2011-03-17T18:10:24.983
null
null
930
null
8425
1
null
null
5
291
I hope this is an appropriate forum for this question...if not, any pointers on a place to ask would be great. If my questions is not clear, please just let me know and I'll try to add information/explanation where I can. Say I have a set of data points that I run through a [FLAME clustering algorithm](http://en.wikip...
Bias from increased information in FLAME clustering
CC BY-SA 2.5
null
2010-08-27T18:14:14.280
2012-06-10T14:34:20.997
2011-03-17T21:59:03.863
3369
338
[ "clustering", "online-algorithms" ]
8426
2
null
8425
1
null
I think it is possible to introduce the new set of data periodically by assigning its initial value with the interpolated value of its neighbor while the possible set of neighbor for each new data point could be the points in the triangle that data point resides in. I think what is more important is the order of assig...
null
CC BY-SA 2.5
null
2010-12-17T07:46:14.033
2011-03-18T08:01:26.373
2011-03-18T08:01:26.373
null
null
null
8428
1
null
null
11
6107
I am finishing up some analysis on a large set of data. I would like to take the linear model used in the first part of the work and re-fit it using an linear mixed model (LME). The LME would be very similar with the exception that one of the variables used in the model would be used as a random effect. This data comes...
Comparing a mixed model (subject as random effect) to a simple linear model (subject as a fixed effect)
CC BY-SA 3.0
null
2011-03-17T19:28:38.270
2018-03-12T11:19:53.597
2018-03-12T11:19:53.597
28666
3727
[ "r", "regression", "hypothesis-testing", "mixed-model", "lme4-nlme" ]
8429
2
null
8428
2
null
I am not totally sure to figure out what model is fitted when you use the lme function. (I guess the random effect is supposed to follow a normal distribution with zero mean?). However, the linear model is a special case of the mixed model when the variance of the random effect is zero. Although some technical difficul...
null
CC BY-SA 2.5
null
2011-03-17T20:08:02.357
2011-03-17T20:34:47.713
2011-03-17T20:34:47.713
3019
3019
null
8430
2
null
8428
8
null
This is to add to @ocram's answer because it is too long to post as a comment. I would treat `A ~ B + C` as your null model so you can assess the statistical significance of a `D`-level random intercept in a nested model setup. As ocram pointed out, regularity conditions are violated when $H_0: \sigma^2 = 0$, and the l...
null
CC BY-SA 2.5
null
2011-03-17T20:43:54.430
2011-03-17T20:50:30.897
2011-03-17T20:50:30.897
3432
3432
null
8431
2
null
8392
1
null
Purely from a machine learning perspective, I think it is possible to do the inference you want from this data. How reliable it will be will depend on how much data you have (the more the better) and on usage patterns (do students mostly do course-related or course-unrelated stuff on these computers). However, this is ...
null
CC BY-SA 2.5
null
2011-03-17T21:11:16.093
2011-03-17T21:11:16.093
null
null
3369
null
8432
2
null
8392
0
null
Considering you observe co-occurences of discrete variables, I would do the following: ``` num_programs = 3 num_students = 10 num_courses = 5 # How long a given student uses a given program random_exponential = rexp(num_programs*num_students) P = matrix(random_exponential, nrow = num_programs) # Given a student, proba...
null
CC BY-SA 2.5
null
2011-03-17T22:52:13.613
2011-03-19T09:46:11.220
2011-03-19T09:46:11.220
1351
1351
null
8433
1
8437
null
6
1274
I have data on 70,000 students, nested in 120 schools. I'm starting with fixed effects for the schools, but at some point I might start letting intercepts and slopes vary. Some key predictors (e.g. gpa, test scores) have non-linear relationships with some outcomes. I definitely want to interact these predictors wit...
Interactions between non-linear predictors
CC BY-SA 2.5
null
2011-03-17T23:33:22.827
2011-10-08T15:32:08.783
2011-10-08T15:32:08.783
3748
3748
[ "r", "mixed-model", "interaction", "splines", "generalized-additive-model" ]
8434
2
null
8419
5
null
I would have thought the "best" (most intuitive) estimate of error would be the probability that the classification is incorrect. Or alternatively/equivalently the odds against the class. Using the [wikipedia page](http://en.wikipedia.org/wiki/Naive_Bayes_classifier), you classify as Male or female. I would have tho...
null
CC BY-SA 2.5
null
2011-03-17T23:34:51.363
2011-03-19T01:49:46.053
2011-03-19T01:49:46.053
2392
2392
null
8435
1
null
null
0
665
When to use multivariate logistic regression versus generalized linear mixed-effects models? What is the difference between the two? Edit (in response to comments): I was hoping to see multivariate as more than one covariate. My problemset is analysis for a longitudinal prospective cohort study where im measuring vita...
Generalized Linear Mixed Effects
CC BY-SA 2.5
null
2011-03-18T01:21:08.357
2011-03-29T06:32:50.853
2011-03-29T06:32:50.853
930
null
[ "regression", "mixed-model", "panel-data" ]
8436
1
8440
null
8
2166
I have some data; it's a proportion $y$ of some stuff relative to everything, so it's bounded between 0 and 1 by definition. The proportion changes over time. Besides fairly high variance there is a step-like change about the middle of the time period; the step isn't very large, but it's there, and it happens pretty f...
Logistic regression for bounds different from 0 and 1
CC BY-SA 2.5
null
2011-03-18T02:30:48.143
2019-10-06T08:36:32.147
2011-03-19T17:35:35.033
2658
2658
[ "logistic" ]
8437
2
null
8433
7
null
You could try generalized additive mixed models, handily implemented in the [gamm4](http://cran.r-project.org/web/packages/gamm4/index.html) package. The way I've used them, you can do something like: ``` fit1 = gamm4( formula = V1 ~ V2 + s(V3) , random = ~ (1|V4) ) fit2 = gamm4( formula = V1 ~ V2 + s(V3,by...
null
CC BY-SA 2.5
null
2011-03-18T02:30:58.790
2011-03-18T02:30:58.790
null
null
364
null
8438
2
null
8382
1
null
[http://en.wikipedia.org/wiki/Truncation_%28statistics%29](http://en.wikipedia.org/wiki/Truncation_%28statistics%29) This is not much help, but at least it gives the correct buzzword (truncated, not quantized; quantization is not your problem) and one pointer to a paper. This should do as a starting point for further s...
null
CC BY-SA 2.5
null
2011-03-18T02:54:43.513
2011-03-18T02:54:43.513
null
null
2658
null
8439
1
null
null
2
278
I would like to validate a commonly used questionnaire for internet-based administration. What statistical tests should I be using?
Validating a paper questionnaire in a web-based format
CC BY-SA 2.5
null
2011-03-18T03:00:31.760
2011-03-18T11:38:41.063
2011-03-18T08:16:00.613
183
null
[ "validation", "survey" ]
8440
2
null
8436
3
null
To begin with, I think we have to distinguish between [logistic regression](http://en.wikipedia.org/wiki/Logistic_regression) and (generalized) [logistic function](http://en.wikipedia.org/wiki/Generalised_logistic_curve). Though the latter may be viewed as a separate case of a the former taking the time as the only exp...
null
CC BY-SA 2.5
null
2011-03-18T05:48:45.150
2011-03-18T09:15:16.640
2011-03-18T09:15:16.640
2645
2645
null
8441
2
null
8439
5
null
The following are two complementary strategies that you could adopt. ### 1. Conduct your own empirical validation: A simple strategy would be to run some form of experiment. Randomly assign half of your participants to web based completion and the other half to paper based completion. Then, examine whether statistic...
null
CC BY-SA 2.5
null
2011-03-18T08:13:31.180
2011-03-18T11:38:41.063
2011-03-18T11:38:41.063
183
183
null
8442
1
null
null
4
212
My goal is to create CI for the CART prediction of new_x Consider the following code: ``` require(rpart) set.seed(147830) n <- 100 x1 <- runif(n) x2 <- rnorm(n) y <- x1 + 2*x2 + rnorm(n, 0, .5) DAT <- data.frame(y,x1,x2) fit <- rpart(y ~ x1 + x2, data = DAT) new_x <- data.frame(x1 = .5 , x2 = .25) predict(fit, newd...
How to produce a CI for a value predicted in CART?
CC BY-SA 2.5
null
2011-03-18T08:46:16.270
2011-03-18T09:58:04.173
null
null
253
[ "r", "predictive-models", "cart", "rpart" ]
8443
2
null
7236
0
null
What I would do is provide `prob` argument with weights for each data point based on number of levels in your variable. Example: ``` df <- data.frame(oks = sample(100), grp = c(rep("trt1", times = 30), rep("trt2", times = 70))) > head(df) oks grp 1 40 trt1 2 29 trt1 3 12 trt1 4 25 trt1 5 19 trt1 6 45 ...
null
CC BY-SA 2.5
null
2011-03-18T09:21:26.243
2011-03-18T09:21:26.243
null
null
144
null
8444
2
null
8442
1
null
Couldn't you use the distribution of the observed `y` in the leafs/terminal nodes to get an idea about the precision of the estimated mean for new observations falling into that leaf? For CIs with large coverage you'd probably need a lot of data / a small tree so that each terminal node contains a lot of observations, ...
null
CC BY-SA 2.5
null
2011-03-18T09:58:04.173
2011-03-18T09:58:04.173
null
null
1979
null
8446
1
null
null
4
672
My supervisor asked me to find out which distribution represents a particular situation. I have a VoIP generator that generates calls "uniformly" distributed between callers. This means that the volume per caller distribution is "almost" uniformly distributed between a minimum and maximum. So by running a test with 100...
What kind of distribution is this "almost" uniformly distributed data for calls/week?
CC BY-SA 4.0
0
2011-03-18T10:03:48.483
2018-08-24T06:34:50.247
2018-08-20T06:45:47.427
176202
3342
[ "hypothesis-testing", "distributions", "numerics", "distribution-identification" ]
8447
1
null
null
4
4030
I want to graphically show the change in relative risk along with confidence limits over 17 years. Can I use a forest plot without meta-analysis because it will have the added advantage to tabulate Z-values and p-values also? Here I want to show the progressive change in the relative risk and NOT meta-analysis. Or is...
Visualizing change in risk ratio along with confidence limits
CC BY-SA 2.5
null
2011-03-18T10:55:33.273
2011-09-05T06:24:41.813
2011-03-18T16:01:58.567
null
2956
[ "confidence-interval", "relative-risk", "graphical-model" ]
8448
2
null
8405
2
null
@SabreWolfy: I've edited my answer to add an additional factor by binning data: ``` library(Hmisc) library(doBy) set.seed(123) A=rnorm(100, mean=50, sd=20) bin.data<-data.frame(bins.A=cut2(A, g=4),G=gl(2,50), A) summaryBy(A~bins.A+G,data=bin.data,FUN=each(length,mean,median)) ``` will give output for age: ``` ...
null
CC BY-SA 2.5
null
2011-03-18T11:12:23.097
2011-03-18T18:19:36.817
2011-03-18T18:19:36.817
3774
3774
null
8449
2
null
8446
1
null
Try Q-Q plots (or P-P plots, only they are somewhat less widely used) of your empirical distribution against each of hypothetical type of distribution. The parameters for the latter are usually deduced by software from your empirical distribution although you could input parameter values you wish to check.
null
CC BY-SA 2.5
null
2011-03-18T11:24:22.680
2011-03-18T11:24:22.680
null
null
3277
null
8450
2
null
8420
2
null
Although I haven't seen international examples, I think [InstantAtlas](http://www.instantatlas.com/) offers quite a lot of nice features that could be useful in your case: ![enter image description here](https://i.stack.imgur.com/C5SA5.jpg) [StatPlanet](http://www.sacmeq.org/statplanet/) might be another (free) option:...
null
CC BY-SA 2.5
null
2011-03-18T11:48:32.543
2011-03-18T11:48:32.543
null
null
22
null
8451
2
null
8436
5
null
You are looking for the wrong keywords. Logistic regression is for 0-1 outcomes, where the probability of being 1 is modeled with an S-shaped (logistic) function, not the actual data points themselves. Looking for nonlinear regression, specifically the four-parameter logistic model: $y = A + (B-A)/(1+\exp(-(a+bx))) + \...
null
CC BY-SA 2.5
null
2011-03-18T13:04:44.530
2011-03-18T13:04:44.530
null
null
279
null
8452
2
null
8435
2
null
This depends on what you mean by "multivariate". Doing a quick google search, the term seems to refer to "more than 1 co variate". So the model equation is for "ordinary logistic regression" you have: $$log(\frac{\pi}{1-\pi})=\beta_0 + \beta_1 X_1$$ For "multivariate logistic regression" you have: $$logit(\frac{\pi}{...
null
CC BY-SA 2.5
null
2011-03-18T13:08:03.853
2011-03-18T13:08:03.853
null
null
2392
null
8453
1
null
null
2
340
Does $R^2 * \mbox{slope}$ provide an estimation of cause and effect? For example, if $R^2$ of miles driven and coffee consumed is $x\%$ and the slope of the coffee-and-miles dataset is $y$ (miles/coffee), can you say "$z$ of each cup of coffee drunk is related to the number of miles driven"?
Can you use $R^2$ and regression to estimate cause and effect?
CC BY-SA 3.0
null
2011-03-18T13:17:29.973
2014-05-25T15:29:49.563
2014-05-25T15:29:49.563
27403
null
[ "regression", "correlation" ]
8455
1
8531
null
10
1265
The recent events in Japan have made me think about the following. Nuclear Plants are usually designed to limit risk of serious accidents to a 'design basis probability' for example, say, 10E-6/year. This is the criteria for a single plant. However, when there is a population of hundreds of reactors, how do we combine ...
Combining probabilities of nuclear accidents
CC BY-SA 2.5
null
2011-03-18T13:59:43.307
2011-03-21T17:36:23.963
null
null
null
[ "probability" ]
8456
1
null
null
5
46489
I am a senior doing a science fair project on the efficiency of fuels. For each fuel I tested, I have a time series of temperature. I want to plot these into an excel xy chart, how do I plot them if the constants (time) are not the same for each set of data?
Excel xy chart with unequal x values in series
CC BY-SA 2.5
null
2011-03-18T14:03:39.683
2023-01-25T10:51:48.917
2011-03-18T16:07:45.020
null
null
[ "data-visualization", "excel" ]
8457
2
null
8455
1
null
As commentators pointed out, this has the very strong independency assumption. Let the probability that a plant blows up be $p$. Then the probability that a plant does not blow up is $1-p$. Then the probability that $n$ plants do not blow up is $(1-p)^n$. The expected number of plants blown up per year is $np$. In case...
null
CC BY-SA 2.5
null
2011-03-18T14:09:25.707
2011-03-18T16:04:05.963
2011-03-18T16:04:05.963
2860
2860
null
8458
2
null
8453
5
null
Regression gives you, essentially, a correlation. Correlation is not causality -- or else global warming would be caused by a decline in global number of pirates.
null
CC BY-SA 2.5
null
2011-03-18T14:17:10.117
2011-03-18T14:17:10.117
null
null
2044
null
8459
1
null
null
2
131
I recently was asked to help characterize some surfaces (raised ink dots on paper) that were scanned with a profilometer, yielding height data across a grid of x & y coordinates. The critical question was to characterize the average dot height. The data were rather noisy as the paper was not perfectly flat, so I played...
Does this de-noising algorithm have a name?
CC BY-SA 2.5
null
2011-03-18T15:26:07.260
2011-03-19T15:56:45.143
null
null
364
[ "smoothing" ]
8460
2
null
8420
0
null
I like Visualizing data patterns with micromaps by daniel carr and linda pickle, specially the concept of linked micromaps, which is influenced by the idea of small multiples (Tufte) and the idea of dot - charts (Cleveland). I strong recommend to read it.
null
CC BY-SA 2.5
null
2011-03-18T15:49:52.650
2011-03-18T15:49:52.650
null
null
null
null