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
6897
1
6898
null
6
592
Here is my example. Supose we evaluate a characteristic using two different methods (a and b) and we want to study if both methods performs in a same way. We also know that these two measures have been recorded from two different groups, and the mean values for each one of these groups are highly different. Our data se...
If correlation between two variables is affected by a factor, how should I evaluate this correlation?
CC BY-SA 2.5
null
2011-02-04T22:16:28.863
2011-02-05T19:53:05.150
null
null
221
[ "correlation" ]
6898
2
null
6897
9
null
This might be a case of locally uncorrelated, but globally correlated variables. The variance in each group might be limited because of group homogeneity, therefore there is no evidence for a relationship within each group. But globally, with the full variance, the relationship can be strong. A schematic illustration o...
null
CC BY-SA 2.5
null
2011-02-04T22:50:54.100
2011-02-05T19:53:05.150
2011-02-05T19:53:05.150
1909
1909
null
6899
1
null
null
3
156
[Kavosh](http://www.biomedcentral.com/1471-2105/10/318) is a recent package designed for [network motif](http://en.wikipedia.org/wiki/Network_motif) discovery. To give a comparison, Kavosh generates a collection of similar networks using an MCMC process. The networks in consideration are directed graphs without loops ...
Kavosh uses a different switching process in its MCMC; how concerned should I be?
CC BY-SA 2.5
null
2011-02-05T01:46:59.883
2011-02-05T01:46:59.883
null
null
386
[ "algorithms", "markov-chain-montecarlo", "networks", "graph-theory" ]
6902
2
null
1595
38
null
I haven't seen the [scikit-learn](http://scikit-learn.org/) explicitly mentioned in the answers above. It's a Python package for machine learning in Python. It's fairly young but growing extremely rapidly (disclaimer: I am a scikit-learn developer). It's goals are to provide standard machine learning algorithmic tools ...
null
CC BY-SA 3.0
null
2011-02-05T10:49:45.910
2014-08-19T20:55:48.897
2014-08-19T20:55:48.897
17230
1265
null
6904
2
null
4551
10
null
In similar vein to @dirkan - The use of p-values as a formal measure of evidence of the null hypothesis being true. It does have some good heuristic and intuitively good features, but is essentially an incomplete measure of evidence because it makes no reference to the alternative hypothesis. While the data may be un...
null
CC BY-SA 2.5
null
2011-02-05T12:26:58.653
2011-02-05T12:26:58.653
null
null
2392
null
6905
2
null
4551
9
null
Using statistics/probability in hypothesis testing to measure the "absolute truth". Statistics simply cannot do this, they can only be of use in deciding between alternatives, which must be specified from "outside" the statistical paradigm. Statements such as "the null hypothesis is proved true by the statistics" are...
null
CC BY-SA 2.5
null
2011-02-05T12:40:27.353
2011-02-05T12:40:27.353
null
null
2392
null
6907
1
6919
null
30
7418
Look at this picture: ![enter image description here](https://i.stack.imgur.com/Io7JY.jpg) If we draw a sample from the red density then some values are expected to be less than 0.25 whereas it is impossible to generate such a sample from the blue distribution. As a consequence, the Kullback-Leibler distance from the r...
An adaptation of the Kullback-Leibler distance?
CC BY-SA 3.0
null
2011-02-05T13:01:14.260
2017-04-11T17:19:15.367
2017-04-11T17:19:15.367
11887
3019
[ "kullback-leibler" ]
6909
2
null
6907
2
null
Yes there does, Bernardo and Reuda defined something called the "intrinsic discrepancy" which for all purposes is a "symmetrised" version of the KL-divergence. Taking the KL divergence from $P$ to $Q$ to be $\kappa(P \mid Q)$ The intrinsic discrepancy is given by: $$\delta(P,Q)\equiv \min \big[\kappa(P \mid Q),\kappa...
null
CC BY-SA 2.5
null
2011-02-05T13:23:23.520
2011-02-06T17:03:49.210
2011-02-06T17:03:49.210
2970
2392
null
6911
2
null
4551
38
null
Maybe stepwise regression and other forms of testing after model selection. Selecting independent variables for modelling without having any a priori hypothesis behind the existing relationships can lead to logical fallacies or spurious correlations, among other mistakes. Useful references (from a biological/biostatist...
null
CC BY-SA 3.0
null
2011-02-05T15:22:55.597
2014-12-09T12:51:56.987
2014-12-09T12:51:56.987
2126
2126
null
6912
1
6914
null
10
3254
I came by the post "[Post-hoc Pairwise Comparisons of Two-way ANOVA](http://www.r-bloggers.com/post-hoc-pairwise-comparisons-of-two-way-anova/)" (responding to [this post](http://rtutorialseries.blogspot.com/2011/01/r-tutorial-series-two-way-anova-with.html)), which shows the following: ``` dataTwoWayComparisons <- rea...
How could a Tukey HSD test be more signif then the uncorrected P value of t.test?
CC BY-SA 2.5
null
2011-02-05T15:42:04.080
2011-02-05T16:31:07.540
null
null
253
[ "r", "multiple-comparisons", "t-test", "post-hoc", "tukey-hsd-test" ]
6913
1
6928
null
21
5537
I recently read the advice that you should generally use median not mean to eliminate outliers. Example: The following article [http://www.amazon.com/Forensic-Science-Introduction-Scientific-Investigative/product-reviews/1420064932/](http://www.amazon.com/Forensic-Science-Introduction-Scientific-Investigative/product-r...
Is median fairer than mean?
CC BY-SA 4.0
null
2011-02-05T16:29:45.263
2020-07-25T11:57:14.297
2020-07-25T11:57:14.297
7290
778
[ "mean", "median", "types-of-averages" ]
6914
2
null
6912
10
null
Because your pairwise $t$-test above is not adjusted for age, and age explains a lot of the variance in StressReduction.
null
CC BY-SA 2.5
null
2011-02-05T16:31:07.540
2011-02-05T16:31:07.540
null
null
449
null
6915
2
null
6913
8
null
If the only choices are integers in the range 1 to 5, can any really be considered an outlier? I'm sure that with small sample sizes, popular outlier tests will fail, but that just points out the problems inherent in small samples. Indeed, given a sample of 5, 5, 5, 5, 5, 1, Grubbs' test reports 1 as an outlier at $\a...
null
CC BY-SA 2.5
null
2011-02-05T16:46:57.890
2011-02-05T16:54:18.127
2011-02-05T16:54:18.127
597
597
null
6916
1
null
null
17
384
I'm teaching an intro stats class and was reviewing the types of sampling, including systematic sampling where you sample every kth individual or object. A student asked if sampling every person with a particular characteristic would accomplish the same thing. For example, would sampling every person with a blue t-sh...
Is "every blue t-shirted person" a systematic sample?
CC BY-SA 2.5
null
2011-02-05T16:48:59.650
2011-02-06T10:59:39.137
2011-02-06T10:59:39.137
null
1490
[ "sampling" ]
6917
2
null
6897
2
null
Therefore, it is important to evaluate whether the homogeneity of groups is due to low number of data, or actually these groups are quite homogeneous and different. In the first case, we could ensure the presence of a high correlation even when this has not been observed for each group separately. But what would happen...
null
CC BY-SA 2.5
null
2011-02-05T17:07:20.920
2011-02-05T17:07:20.920
null
null
221
null
6918
2
null
6916
22
null
The answer, in general, to your question is "no". Obtaining a random sample from a population (especially of humans) is notoriously difficult. By conditioning on a particular characteristic, you're by definition not obtaining a random sample. How much bias this introduces is another matter altogether. As a slightly ab...
null
CC BY-SA 2.5
null
2011-02-05T17:20:22.780
2011-02-05T17:33:53.097
2011-02-05T17:33:53.097
2970
2970
null
6919
2
null
6907
21
null
You might look at Chapter 3 of Devroye, Gyorfi, and Lugosi, A Probabilistic Theory of Pattern Recognition, Springer, 1996. See, in particular, the section on $f$-divergences. $f$-Divergences can be viewed as a generalization of Kullback--Leibler (or, alternatively, KL can be viewed as a special case of an $f$-Divergenc...
null
CC BY-SA 2.5
null
2011-02-05T18:14:56.510
2011-02-27T03:38:48.520
2017-04-13T12:44:51.217
-1
2970
null
6920
1
6923
null
67
19874
I'm analysing some data where I would like to perform ordinary linear regression, however this is not possible as I am dealing with an on-line setting with a continuous stream of input data (which will quickly get too large for memory) and need to update parameter estimates while this is being consumed. i.e. I cannot j...
Efficient online linear regression
CC BY-SA 3.0
null
2011-02-05T18:25:52.210
2022-04-04T17:10:48.880
2022-04-04T17:10:48.880
53690
2942
[ "regression", "time-series", "algorithms", "online-algorithms", "real-time" ]
6921
2
null
1595
17
null
great overview so far. I'm using python (specifically scipy + matplotlib) as a matlab replacement since 3 years working at University. I sometimes still go back because I'm familiar with specific libraries e.g. the matlab wavelet package is purely awesome. I like the [http://enthought.com/](http://enthought.com/) pytho...
null
CC BY-SA 2.5
null
2011-02-05T18:31:42.033
2011-02-05T18:31:42.033
null
null
2904
null
6922
2
null
6920
9
null
I think recasting your linear regression model into a [state-space model](http://faculty.chicagobooth.edu/hedibert.lopes/teaching/MCMCtutorial/unit10-dynamicmodels.pdf) will give you what you are after. If you use R, you may want to use package [dlm](http://cran.r-project.org/web/packages/dlm/index.html) and have a loo...
null
CC BY-SA 2.5
null
2011-02-05T18:52:53.013
2011-02-05T18:52:53.013
null
null
892
null
6923
2
null
6920
36
null
Maindonald describes a sequential method based on [Givens rotations](http://en.wikipedia.org/wiki/Givens_rotation). (A Givens rotation is an orthogonal transformation of two vectors that zeros out a given entry in one of the vectors.) At the previous step you have decomposed the [design matrix](http://en.wikipedia.or...
null
CC BY-SA 3.0
null
2011-02-05T19:09:20.667
2012-11-19T23:16:15.307
2020-06-11T14:32:37.003
-1
919
null
6924
2
null
6907
10
null
The [Kolmogorov distance](http://en.wikipedia.org/wiki/Kolmogorov%E2%80%93Smirnov_test) between two distributions $P$ and $Q$ is the sup norm of their CDFs. (This is the largest vertical discrepancy between the two graphs of the CDFs.) It is used in distributional testing where $P$ is an hypothesized distribution and...
null
CC BY-SA 2.5
null
2011-02-05T19:26:34.743
2011-02-05T19:26:34.743
null
null
919
null
6925
2
null
5960
26
null
There is a well-known paper by Silverman that deals with this issue. It employs kernel-density estimation. See > B. W. Silverman, Using kernel density estimates to investigate multimodality, J. Royal Stat. Soc. B, vol. 43, no. 1, 1981, pp. 97-99. Note that there are some errors in the tables of the paper. This is ...
null
CC BY-SA 3.0
null
2011-02-05T20:23:18.553
2011-12-21T17:37:45.403
2011-12-21T17:37:45.403
2970
2970
null
6926
2
null
6916
6
null
As long as the distribution of the characteristic you are using to select units into the sample is orthogonal to the distribution of the characteristic of the population you want to estimate, you can obtain an unbiased estimate of the population quantity by conditioning selection on it. The sample is not strictly a ran...
null
CC BY-SA 2.5
null
2011-02-05T21:42:45.253
2011-02-05T21:42:45.253
null
null
3069
null
6927
1
6936
null
9
2731
I'm doing a simulation study which requires bootstrapping estimates obtained from a generalized linear mixed model (actually, the product of two estimates for fixed effects, one from a GLMM and one from an LMM). To do the study well would require about 1000 simulations with 1000 or 1500 bootstrap replications each time...
How can I speed up calculation of the fixed effects in a GLMM?
CC BY-SA 2.5
null
2011-02-05T21:46:17.677
2011-02-06T15:16:20.523
null
null
2739
[ "r", "mixed-model" ]
6928
2
null
6913
30
null
The problem is that you haven't really defined what it means to have a good or fair rating. You suggest in a comment on @Kevin's answer that you don't like it if one bad review takes down an item. But comparing two items where one has a "perfect record" and the other has one bad review, maybe that difference should be ...
null
CC BY-SA 2.5
null
2011-02-05T22:13:43.713
2011-02-05T22:13:43.713
null
null
2898
null
6929
2
null
6927
2
null
It could possibly be a faster computer. But here is one trick which may work. Generate a simultation of $Y^*$, but only conditional on $Y$, then just do OLS or LMM on the simulated $Y^*$ values. Supposing your link function is $g(.)$. this says how you get from the probability of $Y=1$ to the $Y^*$ value, and is most...
null
CC BY-SA 2.5
null
2011-02-05T23:20:50.217
2011-02-05T23:20:50.217
null
null
2392
null
6930
2
null
6776
1
null
You would just do this as part of the algorithm. So you would a) select observing $Y$ or $Y_2$, by your random probability b) fit the relevant regression, depending on which part of the mixture you chose. If you are also mixing over $X$ as well, this doesn't change the above method, you just act as if the mixing $X.mi...
null
CC BY-SA 2.5
null
2011-02-06T01:02:12.610
2011-02-07T10:44:03.220
2011-02-07T10:44:03.220
2116
2392
null
6931
2
null
6320
2
null
If you have no reason to suspect more than one mode in your data, then a multivariate normal distribution is not a bad first go. You just calculate the mean vector, and covariance matrix, and there's your PDF. However this is a very rough answer, and it seems to me that with 100 observations, you will probably have mu...
null
CC BY-SA 2.5
null
2011-02-06T01:23:06.167
2011-02-06T01:23:06.167
null
null
2392
null
6932
2
null
1595
12
null
Perhaps not directly related, but R has a nice GUI environment for interactive sessions (edit: on Mac/Windows). IPython is very good but for an environment closer to Matlab's you might try Spyder or IEP. I've had better luck of late using IEP, but Spyder looks more promising. IEP: [http://code.google.com/p/iep/](http:/...
null
CC BY-SA 2.5
null
2011-02-06T04:09:24.287
2011-02-06T04:09:24.287
null
null
26
null
6933
2
null
6795
21
null
This is problem 3.23 on page 97 of [Hastie et al., Elements of Statistical Learning, 2nd. ed. (5th printing)](http://www.stanford.edu/~hastie/local.ftp/Springer/ESLII_print5.pdf#page=115). The key to this problem is a good understanding of ordinary least squares (i.e., linear regression), particularly the orthogonality...
null
CC BY-SA 3.0
null
2011-02-06T05:55:09.133
2011-05-24T22:56:27.137
2011-05-24T22:56:27.137
2970
2970
null
6935
2
null
6927
4
null
Two other possibilities too consider, before buying a new computer. - Parallel computing - bootstrapping is easy to run in parallel. If your computer is reasonably new, you probably have four cores. Take a look the the multicore library in R. - Cloud computing is also a possibility and reasonably cheap. I have collea...
null
CC BY-SA 2.5
null
2011-02-06T13:22:55.083
2011-02-06T13:22:55.083
null
null
8
null
6936
2
null
6927
4
null
It should help to specify starting values, though it's hard to know how much. As you're doing simulation and bootstrapping, you should know the 'true' values or the un-bootstrapped estimates or both. Try using those in the `start =` option of `glmer`. You could also consider looking into the whether the tolerances for...
null
CC BY-SA 2.5
null
2011-02-06T15:16:20.523
2011-02-06T15:16:20.523
null
null
449
null
6937
2
null
6907
20
null
The Kullback-Leibler divergence $\kappa(P|Q)$ of $P$ with respect to $Q$ is infinite when $P$ is not absolutely continuous with respect to $Q$, that is, when there exists a measurable set $A$ such that $Q(A)=0$ and $P(A)\ne0$. Furthermore the KL divergence is not symmetric, in the sense that in general $\kappa(P\mid Q)...
null
CC BY-SA 3.0
null
2011-02-06T15:47:14.310
2015-08-14T16:37:50.697
2015-08-14T16:37:50.697
2592
2592
null
6938
2
null
6913
23
null
The answer you get depends on the question you ask. Mean and median answer different questions. So they give different answers. It's not that one is "fairer" than another. Medians are often used with highly skewed data (such as income). But, even there, sometimes the mean is best. And sometimes you don't want ANY ...
null
CC BY-SA 2.5
null
2011-02-06T15:51:31.447
2011-02-06T15:51:31.447
null
null
686
null
6939
1
6942
null
2
2346
Suppose I have the following simplified distribution: ``` time | value 1 | 2 2 | 4 3 | 8 4 | 16 1 | 1 2 | 3 3 | 9 4 | 27 1 | 40 2 | 20 3 | 10 4 | 5 1 | 12 2 | 1 3 | 99 4 | 23423 ``` These are all part of the same dataset (so one x can have multiple values here, eg. ti...
How to detect patterns between fields of a distribution in SPSS?
CC BY-SA 2.5
null
2011-02-06T17:33:19.747
2011-02-06T18:42:53.183
2011-02-06T18:16:45.200
3040
3040
[ "distributions", "spss", "pattern-recognition" ]
6940
1
6953
null
15
10831
I hope this isn't a silly question. Let's say I have some arbitrary continuous distribution. I also have a statistic, and I'd like to use this arbitrary distribution to get a p-value for this statistic. I realize that in R it's easy to do this as long as your distribution fits one of the built-in ones, like if it's no...
Calculating p-value from an arbitrary distribution
CC BY-SA 2.5
null
2011-02-06T18:13:50.133
2011-02-07T10:49:56.943
2011-02-07T10:49:56.943
null
52
[ "r", "distributions", "p-value" ]
6941
2
null
6940
10
null
Yes, it is possible to use any arbitrary distribution to get a p-value for any statistic. Theoretically and practically you can calculate (one-sided) p-value by this formula. $$\mathrm{p-value} = P[T > T_{observed} | H_0 \quad \mathrm{holds}]$$ Where $T$ is the test-statistic of interest and $T_{observed}$ is the valu...
null
CC BY-SA 2.5
null
2011-02-06T18:33:44.633
2011-02-06T18:39:15.453
2011-02-06T18:39:15.453
1307
1307
null
6942
2
null
6939
1
null
I think I understand what you are after, but I might be wrong - just to clarify things in advance :) If you want to find the "distribution" of your data, than [R](http://www.r-project.org/) could do this easily, I have no idea about Spss. Though I am not sure about your are really after distributions, as those would on...
null
CC BY-SA 2.5
null
2011-02-06T18:42:53.183
2011-02-06T18:42:53.183
null
null
2714
null
6943
1
6944
null
6
34597
I am unable to get the `zscore` function to work. When I try to call it, I get the following error: ``` could not find function zscore ``` The online documentation online states that it is in basic R library. Searching online reveals that other people had the same problem some time ago - though on macs. Does anyone k...
zscore function in R
CC BY-SA 2.5
null
2011-02-06T23:31:42.537
2016-09-19T20:18:39.417
2011-02-06T23:47:13.467
8
3008
[ "r" ]
6944
2
null
6943
12
null
As the `zscore` function you are looking for can be found in the R.basic package made by [Henrik Bengtsson](http://www.braju.com/R/), which cannot be found on CRAN. To install use: ``` install.packages(c("R.basic"), contriburl="http://www.braju.com/R/repos/") ``` See [this similar topic](https://stats.stackexchange.co...
null
CC BY-SA 2.5
null
2011-02-06T23:43:55.260
2011-02-06T23:43:55.260
2017-04-13T12:44:40.883
-1
2714
null
6945
1
6947
null
8
468
In a lottery, 1/10 of the 50 000 000 tickets give a prize. What is the minimum amount of tickets one should buy to have at least a 50% chance to win? Would be very glad if you could explain your methodology when resolving this. Please consider this as homework if you will.
Minimum tickets required for specified probability of winning lottery
CC BY-SA 2.5
null
2011-02-07T00:15:04.510
2017-09-15T23:47:27.480
2011-02-12T05:55:21.817
183
1833
[ "probability", "self-study" ]
6946
1
6948
null
7
2793
During an article revision the authors found, in average, 1.6 errors by page. Assuming the errors happen randomly following a Poisson process, what is the probability of finding 5 errors in 3 consecutive pages? Please explain your methodology, as the main purpose of the question is not getting the answer but the "how t...
How do you solve a Poisson process problem
CC BY-SA 2.5
null
2011-02-07T00:23:26.160
2011-02-12T13:25:08.530
2011-02-07T03:27:36.310
1833
1833
[ "probability", "self-study", "poisson-distribution" ]
6947
2
null
6945
15
null
I should really ask what your thoughts are so far on this. This problem is very closely related to the "birthday problem". The easiest way to do these problems is to count the possible ways of either winning or losing. Usually one is much easier to do than the other, so the key is to find the right one. Before we get i...
null
CC BY-SA 2.5
null
2011-02-07T01:43:02.600
2011-02-07T03:21:01.393
2011-02-07T03:21:01.393
2970
2970
null
6948
2
null
6946
10
null
The two most important characteristics of a Poisson process with rate $\lambda$ are - For any interval $(s, t)$, the number of arrivals within the interval follows a Poisson distribution with mean $\lambda (t-s)$. - The number of arrivals in disjoint intervals are independent of one another. So, if $s_1 < t_1 < s_2 <...
null
CC BY-SA 2.5
null
2011-02-07T03:06:02.280
2011-02-07T03:42:29.363
2011-02-07T03:42:29.363
2970
2970
null
6949
1
null
null
6
478
I am looking for a book/case study etc on how to build a fraud detection model at the transaction level. Something applied rather than theoretical would be really helpful.
Any good reference books/material to help me build a txn level fraud detection model?
CC BY-SA 2.5
null
2011-02-07T03:13:07.937
2017-11-03T15:37:02.097
2017-11-03T15:37:02.097
11887
null
[ "machine-learning", "references", "anomaly-detection", "isotonic", "fraud-detection" ]
6950
1
6952
null
4
3662
I have a large amount of variables (24) to predict a Y/N value, and I would like help for writting a procedure that automatically tries the different results of the factor selection to see how good the regression turns out to be, and of course I want to save the best model for later use.
How to do a logistic regression with the results of different factor analysis methods
CC BY-SA 2.5
null
2011-02-07T03:45:54.400
2015-12-30T22:28:22.197
null
null
1808
[ "r", "logistic", "factor-analysis" ]
6951
2
null
6946
3
null
If I were his instructor I'd prefer the following explanation, which obviously is equivalent to that given by @cardinal. Let $N_t$ be the Poisson process of counting the number of errors on consequtive pages, of rate $\lambda=1.6/page$. One supposes that we observe the process at integer moments t (here t being assimi...
null
CC BY-SA 2.5
null
2011-02-07T07:36:25.897
2011-02-12T13:25:08.530
2011-02-12T13:25:08.530
2376
2376
null
6952
2
null
6950
4
null
First of all, consider if the factor analysis is the right way to do feature extraction. I would suggest to use principal component analysis to make dimension reduction first and then use extracted features as predictor variables. Depends on your settings you should also use appropriate cross-validation regime to acces...
null
CC BY-SA 2.5
null
2011-02-07T10:24:37.227
2011-02-07T10:24:37.227
null
null
609
null
6953
2
null
6940
12
null
If you have a [cumulative distribution function](http://en.wikipedia.org/wiki/Cumulative_distribution_function) $F$, then calculating the $p$-value for given statistic $T$ is simply $1-F(T)$. This is straightforward in R. If you have [probability density function](http://en.wikipedia.org/wiki/Density_function) on the o...
null
CC BY-SA 2.5
null
2011-02-07T10:27:29.180
2011-02-07T10:27:29.180
null
null
2116
null
6954
1
6959
null
9
3072
In R there is a function [nlm()](http://127.0.0.1:14633/library/stats/html/nlm.html) which carries out a minimization of a function f using the Newton-Raphson algorithm. In particular, that function outputs the value of the variable code defined as follows: > code an integer indicating why the optimization process ter...
The code variable in the nlm() function
CC BY-SA 2.5
null
2011-02-07T10:49:26.900
2011-02-26T15:47:54.760
2020-06-11T14:32:37.003
-1
3019
[ "r", "extreme-value" ]
6955
1
null
null
1
169
I create SAS output in .rtf format and the File Download warning pops up each time. I need to turn this off for all files that I create. How?
Getting rid of file download warning in SAS
CC BY-SA 2.5
null
2011-02-07T11:25:49.097
2011-02-18T22:56:20.907
2011-02-07T15:16:13.880
null
3085
[ "sas" ]
6956
1
6961
null
1
1155
I was looking at howto figure out the optimal lag order for an ADF-test when I came across [this](http://homepages.strath.ac.uk/~hbs96127/mlecture12.ppt) PPT presentation. There are two examples of a ADF-test model reduction, one on p23 and one on p36. I have two questions: - How do I come up with the F numbers of the...
How to interpret ADF-test optimal lag model reduction?
CC BY-SA 2.5
null
2011-02-07T12:01:37.240
2011-02-07T14:46:03.480
null
null
3086
[ "optimization", "hypothesis-testing", "cointegration" ]
6957
2
null
6653
6
null
I would start simulating the data from a toy model. Something like: ``` n.games <- 1000 n.slices <- 90 score.away <- score.home <- matrix(0, ncol=n.slices, nrow=n.games) for (j in 2:n.slices) { score.home[ ,j] <- score.home[ , j-1] + (runif(n.games)>.97) score.away[ ,j] <- score.away[ , j-1] + (runif(n.games)>.9...
null
CC BY-SA 2.5
null
2011-02-07T12:15:54.877
2011-02-07T13:08:39.737
2011-02-07T13:08:39.737
375
375
null
6958
1
6960
null
14
16604
I have fitted the ARIMA models to the original time series, and the best model is ARIMA(1,1,0). Now I want to simulate the series from that model. I wrote the simple AR(1) model, but I couldn't understand how to adjust the difference within the model ARI(1,1,0). The following R code for AR(1) series is: ``` phi= -0.70...
Simulation of ARIMA (1,1,0) series
CC BY-SA 2.5
null
2011-02-07T12:26:51.370
2022-07-20T17:45:52.827
2011-03-30T03:13:24.613
159
3084
[ "r", "time-series", "arima" ]
6959
2
null
6954
8
null
These situations are understood more clearly when having in mind what minimisation or maximisation really is and how optimisation works. Suppose we have function $f$ which has local minimum at $x_0$. Optimisation methods try to construct the sequence $x_i$ which converges to $x_0$. It is always shown that in theory th...
null
CC BY-SA 2.5
null
2011-02-07T12:51:40.707
2011-02-07T12:51:40.707
null
null
2116
null
6960
2
null
6958
22
null
If you want to simulate ARIMA you can use `arima.sim` in R, there is no need to do it by hand. This will generate the series you want. ``` e <- rnorm(100,0,0.345) arima.sim(n=100,model=list(ar=-0.7048,order=c(1,1,0)),start.innov=4.1,n.start=1,innov=2.1+e) ``` You can look at the code of how this is achieved by typing...
null
CC BY-SA 2.5
null
2011-02-07T13:32:42.747
2011-02-08T19:58:59.113
2011-02-08T19:58:59.113
2116
2116
null
6961
2
null
6956
2
null
For page 23 you have simple [F statistics](http://en.wikipedia.org/wiki/F-test) for regression (scroll down to regression problems in the link for the formula). So the number 0.92201 comes from this calculation (in R): ``` > (963.09-961.27)/(961.27/487) [1] 0.922051 ``` The value in the brackets is p-value of F-statis...
null
CC BY-SA 2.5
null
2011-02-07T13:56:16.377
2011-02-07T14:46:03.480
2011-02-07T14:46:03.480
2116
2116
null
6962
2
null
6955
2
null
It's under the Recycle Bin's properties. Just right-click Recycle Bin, properties, and you can turn off the confirmation there.
null
CC BY-SA 2.5
null
2011-02-07T14:48:36.677
2011-02-07T14:48:36.677
null
null
2310
null
6963
1
7617
null
17
1442
It is easy to produce a random variable with Dirichlet distribution using Gamma variables with the same scale parameter. If: $ X_i \sim \text{Gamma}(\alpha_i, \beta) $ Then: $ \left(\frac{X_1}{\sum_j X_j},\; \ldots\; , \frac{X_n}{\sum_j X_j}\right) \sim \text{Dirichlet}(\alpha_1,\;\ldots\;,\alpha_n) $ Problem What hap...
What is the expected value of modified Dirichlet distribution? (integration problem)
CC BY-SA 2.5
null
2011-02-07T15:53:15.410
2011-03-08T07:45:43.053
2011-02-07T17:13:02.550
217
217
[ "expected-value", "dirichlet-distribution", "gamma-distribution", "integral" ]
6964
1
null
null
1
2042
I just ran a vendor-supplied program that converts data from their proprietary binary format to what they call a "Matlab format". There are two resulting files from the conversion, a "filename.dat" and a "filename.m". The "filename.m" file seems to have column heading information in it. The second "filename.dat" file i...
How to pull data formatted for Matlab into R?
CC BY-SA 2.5
null
2011-02-07T17:16:09.403
2012-05-24T21:21:26.637
2011-02-07T18:11:40.303
8
2768
[ "r", "matlab" ]
6965
2
null
6964
3
null
This doesn't sound like "Matlab format" (which would be a .mat file). Rather, the .m-file is a Matlab function or script that is most likely used to read the data in the .dat file. Have a look at the Matlab [documentation](http://www.mathworks.com/help/techdoc/) to find out how the .m file reads the data, so that you ...
null
CC BY-SA 2.5
null
2011-02-07T17:26:07.803
2011-02-07T17:26:07.803
null
null
198
null
6966
1
null
null
57
6424
Why continue to teach and use hypothesis testing (with all its difficult concepts and which are among the most statistical sins) for problems where there is an interval estimator (confidence, bootstrap, credibility or whatever)? What is the best explanation (if any) to be given to students? Only tradition? The views wi...
Why continue to teach and use hypothesis testing (when confidence intervals are available)?
CC BY-SA 3.0
null
2011-02-07T18:05:50.610
2017-01-26T11:51:34.617
2017-01-26T11:51:34.617
28666
523
[ "hypothesis-testing", "confidence-interval", "teaching" ]
6967
1
6973
null
2
789
/edit: To clarify: The mtable function from the [memisc](http://cran.r-project.org/web/packages/memisc/index.html) package does exactly what I need, but unfortunately does not work with arima models. Similar to [this question](https://stats.stackexchange.com/questions/6856/aggregating-results-from-linear-model-runs-r):...
Aggregating results from Arima runs R
CC BY-SA 2.5
null
2011-02-07T18:20:52.983
2011-02-08T00:26:12.043
2017-04-13T12:44:25.283
-1
2817
[ "r", "time-series", "regression", "arima" ]
6968
2
null
6966
29
null
I teach hypothesis tests for a number of reasons. One is historical, that they'll have to understand a large body of prior research they read and understand the hypothesis testing point of view. A second is that, even in modern times, it's still used by some researchers, often implicitly, when performing other kinds ...
null
CC BY-SA 3.0
null
2011-02-07T18:24:00.687
2014-09-29T00:52:03.693
2014-09-29T00:52:03.693
601
601
null
6969
2
null
6706
2
null
You could also look [Wessa P., (2008), Maximum-likelihood Exponential Distribution Fitting](http://www.wessa.net/rwasp_fitdistrexp.wasp) which has a nice, documented online execution of the problem with the R source code attached to the actual plot.
null
CC BY-SA 2.5
null
2011-02-07T18:28:04.613
2011-02-07T18:28:04.613
null
null
2714
null
6971
1
6984
null
3
199
In order to test the Matrix package in R, I ran the following piece of code: ``` library(Matrix) p <- 50; n <- 500 a0 <- sample(1:(n*p), n*p*0.1) d1 <- (a0-1) %% n d2 <- floor((a0-d1)/n) d0 <- cbind(d1+1, d2+1) x0 <- Matrix(0, n, p, forceCheck=TRUE) x0[d0] <- rnorm(n*p*0.1, 10, 1) x1 <- matrix(rnorm(n*p), n, p) fx01 ...
Function timings in the Matrix package
CC BY-SA 2.5
null
2011-02-07T22:37:55.593
2011-02-08T08:59:04.167
2011-02-08T08:59:04.167
2116
603
[ "r", "optimization", "matrix" ]
6972
1
6985
null
3
1583
X is the weight of a baby when born (in gram). If the distribution of X is N(3315, 575) and Y is the number of babies with weight lower than 2719 in a random sample of 25, then P[Y≤4] is about...? I'm trying to figure how to solve this. What kind of formula do I use? I suppose N is a normal distribution, that 3315 is t...
Normal distribution and weight of babies problem
CC BY-SA 2.5
null
2011-02-07T22:56:45.337
2017-09-10T08:31:15.333
2011-02-08T06:04:57.733
919
1833
[ "probability", "self-study", "binomial-distribution", "normal-distribution" ]
6973
2
null
6967
7
null
You need to write a function called `getSummary.Arima` for use with the `memisc` package. Check out `getSummary.lm` for an example.
null
CC BY-SA 2.5
null
2011-02-08T00:26:12.043
2011-02-08T00:26:12.043
null
null
159
null
6974
1
6977
null
5
569
My problem is this: There are 52 people divided into 5 groups: A, B, C, D, and E. From stage 1 to stage 2, they either stay in the same groups, or change groups. The following table shows how many people change from their stage 1 group to stage 2 group for all pairs. ``` Stage 1 Stage 2 Group...
What is the right statistical test to use when attesting claims like "60% people switched over from group A to group B"?
CC BY-SA 2.5
null
2011-02-08T01:57:28.050
2011-02-09T04:24:16.253
2011-02-08T02:08:40.863
3097
3097
[ "hypothesis-testing", "classification", "statistical-significance" ]
6975
1
7001
null
4
161
I'm trying to figure out the best way of creating groups in a dataset with many dimensions. I have 1000 measurements, and each measurement has 40 dimensions. The measurements are of neighborhoods with physical and socio-economic data. For example I have measures like the number of people in each area, the population de...
Creating groups with multi-dimensional data?
CC BY-SA 2.5
null
2011-02-08T02:23:56.847
2011-02-08T21:25:23.370
2011-02-08T16:21:20.827
919
2635
[ "classification", "pca", "factor-analysis", "cart" ]
6976
1
null
null
11
1076
This question might sound very broad, but here is what I am looking for. I know there are many excellent books about econometric methods, and many excellent expository articles about econometric techniques. There are even excellent reproducible examples of econometrics, as described in this CrossValidated [question](ht...
Documented/reproducible examples of successful real-world applications of econometric methods?
CC BY-SA 2.5
null
2011-02-08T02:24:03.660
2011-02-08T12:46:40.163
2017-04-13T12:44:24.677
-1
2544
[ "r", "machine-learning", "forecasting", "data-mining", "econometrics" ]
6977
2
null
6974
10
null
I think what you're probably looking for are the so-called mover-stayer models. The basic model is a loglinear model that allows for an "inflated" diagonal and usually involves some form of symmetry on the off-diagonals. A good place to start is A. Agresti, Categorical Data Analysis, 2nd ed., pp. 423--428. (That's the ...
null
CC BY-SA 2.5
null
2011-02-08T02:55:24.297
2011-02-09T04:24:16.253
2011-02-09T04:24:16.253
2970
2970
null
6978
1
null
null
12
342
This was inspired by [Efficient online linear regression](https://stats.stackexchange.com/questions/6920/efficient-online-linear-regression), which I found very interesting. Are there any texts or resources devoted to large-scale statistical computing, by which computing with datasets too large to fit in main memory, ...
Online, scalable statistical methods
CC BY-SA 2.5
null
2011-02-08T04:09:23.683
2011-06-09T16:09:25.037
2017-04-13T12:44:33.977
-1
1777
[ "online-algorithms", "computational-statistics", "references" ]
6979
2
null
6966
4
null
Hypothesis testing is a useful way to frame a lot of questions: is the effect of a treatment zero or nonzero? The ability between statements such as these and a statistical model or procedure (including the construction of an interval estimator) is important for practitioners I think. It also bears mentioning that a co...
null
CC BY-SA 2.5
null
2011-02-08T05:07:01.333
2011-02-08T05:07:01.333
null
null
26
null
6980
2
null
6966
60
null
This is my personal opinion, so I'm not sure it properly qualifies as an answer. Why should we teach hypothesis testing? One very big reason, in short, is that, in all likelihood, in the time it takes you to read this sentence, hundreds, if not thousands (or millions) of hypothesis tests have been conducted within a 10...
null
CC BY-SA 3.0
null
2011-02-08T05:10:14.317
2012-02-20T01:22:18.573
2012-02-20T01:22:18.573
2970
2970
null
6981
2
null
6966
7
null
In teaching Neyman Pearson hypothesis testing to early statistics students, I have often tried to locate it in its original setting: that of making decisions. Then the infrastructure of type 1 and type 2 errors all makes sense, as does the idea that you might accept the null hypothesis. We have to make a decision, w...
null
CC BY-SA 2.5
null
2011-02-08T05:41:56.397
2011-02-08T05:41:56.397
null
null
187
null
6982
2
null
6974
0
null
I would start with building the sums: ``` Stage 1 Stage 2 A B C D E | Sum ----------------------------------- Group A 18 0 0 0 2 | 20 Group B 0 6 0 0 3 | 9 Group C 4 0 2 0 2 | 8 Group D 0 0 0 0 0 | 0 Group E 4 2 0 1 ...
null
CC BY-SA 2.5
null
2011-02-08T06:55:16.950
2011-02-08T06:55:16.950
null
null
3100
null
6983
2
null
6966
11
null
I think it depends on which hypothesis testing you are talking about. The "classical" hypothesis testing (Neyman-Pearson) is said to be defective because it does not appropriately condition on what actually happened when you did the test. It instead is designed to work "regardless" of what you actually saw in the lon...
null
CC BY-SA 3.0
null
2011-02-08T08:12:23.203
2013-07-16T15:46:09.633
2013-07-16T15:46:09.633
7290
2392
null
6984
2
null
6971
3
null
There is an error in definition of `fx01`, the matrices are not compatible the way you defined. If we define ``` fx01 <- function(ll, x0) tcrossprod(rnorm(ncol(x0)),x0) ``` Then on my Macbook Pro with 2.53 GHz Intel Core 2 Duo processor with 4GB RAM and R 2.11.1, I get ``` > system.time(lapply(1:1000, fx02, x1=x1)) ...
null
CC BY-SA 2.5
null
2011-02-08T08:29:44.753
2011-02-08T08:43:50.513
2011-02-08T08:43:50.513
2116
2116
null
6985
2
null
6972
2
null
It may be easier to first consider equality for general $Y=y$ and the to "add up" for $y=0,1,2,3,4$. Because the question as stated does not assume any (logical) dependence between babies in the sample, we can say the all have the same probability of being under the threshold (because we do not know how to differentiat...
null
CC BY-SA 2.5
null
2011-02-08T08:31:43.127
2011-02-08T08:31:43.127
null
null
2392
null
6986
1
6992
null
4
705
If I have a dataset of $N$ pairs ($x_i$,$y_i$) where each $y_i$ has an individual error $\sigma_{y_i}$, I can incorporate this into regression by using the inverse of this as weights. If I now do logarithmic regression $\ln y_i = b_0 + b_1\,\ln x_i + \epsilon_i$, how do I incorporate now the errors? Are the weights jus...
Logarithmic regression with individual errors
CC BY-SA 2.5
null
2011-02-08T12:25:54.363
2011-02-08T16:34:48.667
null
null
3104
[ "regression", "lognormal-distribution" ]
6987
2
null
6976
4
null
As mentioned in the comments, travel demand forecasts often use inputs from discrete choice models (multinomial logit, nested logit, mixed logit, etc) to assist in the development of behavioral mode choice or route assignment in their travel demand forecasts. DCM certainly has many applications outside travel demand fo...
null
CC BY-SA 2.5
null
2011-02-08T12:46:40.163
2011-02-08T12:46:40.163
null
null
696
null
6988
2
null
58
14
null
The back propagation algorithm is a [gradient descent](http://en.wikipedia.org/wiki/Gradient_descent) algorithm for fitting a neural network model. (as mentionned by @Dikran) Let me explain how. Formally: Using the calculation of the gradient at the end of this post within equation [1] below (that is a definition of t...
null
CC BY-SA 3.0
null
2011-02-08T12:47:57.683
2012-11-13T07:37:40.343
2012-11-13T07:37:40.343
223
223
null
6989
1
6994
null
33
17042
I want to fit a multilevel GLMM with a Poisson distribution (with over-dispersion) using R. At the moment I am using [lme4](http://cran.r-project.org/web/packages/lme4/index.html) but I noticed that recently the `quasipoisson` family was removed. I've seen elsewhere that you can model additive over-dispersion for bino...
How do I fit a multilevel model for over-dispersed poisson outcomes?
CC BY-SA 4.0
null
2011-02-08T13:02:55.313
2018-09-04T10:02:50.647
2018-09-04T10:02:50.647
128677
1871
[ "r", "mixed-model", "poisson-distribution", "lme4-nlme", "overdispersion" ]
6990
1
null
null
3
668
How do I carry out a repeated measures analysis using R?
Repeated measures using R
CC BY-SA 2.5
null
2011-02-08T13:16:39.953
2011-02-09T06:40:13.363
2011-02-09T04:55:12.440
183
3107
[ "r", "anova", "repeated-measures" ]
6991
2
null
6986
3
null
It is good to remember what is the purpose of the weighting. Suppose we have linear regression \begin{align} \mathbf{y}=\mathbf{X}\mathbf{\beta}+\mathbf{\varepsilon} \end{align} In this case $\sigma_{y_i}=\sigma_{\varepsilon_i}=\sigma_i$ and we can write that $$\Omega=E(\varepsilon\varepsilon')=diag(\sigma_i)$$ Now we...
null
CC BY-SA 2.5
null
2011-02-08T15:26:07.017
2011-02-08T15:26:07.017
null
null
2116
null
6992
2
null
6986
2
null
If the variance of $y_i$ is $\sigma_i^2,$ then, by the [delta method](http://en.wikipedia.org/wiki/Delta_method), the variance of $\log(y_i)$ is approximately $\sigma_i^2 / y_i^2 .$ So if you're doing [weighted least squares](http://en.wikipedia.org/wiki/Weighted_least_squares#Weighted_least_squares) using inverse-vari...
null
CC BY-SA 2.5
null
2011-02-08T16:34:48.667
2011-02-08T16:34:48.667
null
null
449
null
6993
2
null
6989
7
null
I think that the glmmADMB package is exactely what you are looking for. > install.packages("glmmADMB", repos="http://r-forge.r-project.org") But in a bayesian point of view you can use the MCMCglmm package or the BUGS/JAGS software, they are very flexible and you can fit this kind of model. (and the syntax is clos...
null
CC BY-SA 3.0
null
2011-02-08T17:01:35.940
2014-08-04T20:39:07.137
2014-08-04T20:39:07.137
2028
2028
null
6994
2
null
6989
24
null
You can fit multilevel GLMM with a Poisson distribution (with over-dispersion) using R in multiple ways. Few `R` packages are: `lme4`, `MCMCglmm`, `arm`, etc. A good reference to see is [Gelman and Hill (2007)](http://www.stat.columbia.edu/~gelman/arm/) I will give an example of doing this using `rjags` package in `R`....
null
CC BY-SA 2.5
null
2011-02-08T17:06:29.380
2011-02-08T17:15:16.543
2011-02-08T17:15:16.543
1307
1307
null
6995
2
null
6990
5
null
There are [many tutorials](http://www.r-statistics.com/2010/04/repeated-measures-anova-with-r-tutorials/) you can go through.
null
CC BY-SA 2.5
null
2011-02-08T17:47:25.943
2011-02-08T17:47:25.943
null
null
253
null
6996
2
null
6966
10
null
If I were a hardcore Frequentist I would remind you that confidence intervals are quite regularly just inverted hypothesis tests, i.e. when the 95% interval is simply another way of describing all the points that a test involving your data wouldn't reject at the .05 level. In these situations a preference for one over...
null
CC BY-SA 2.5
null
2011-02-08T17:52:56.230
2011-02-08T17:52:56.230
null
null
1739
null
6997
2
null
6208
1
null
This has been an eye-opening debate on the type-II/III issue for me. Thanks for everyone's the effort in providing the discussion. I'd come round to the view of promoting type-II consistently over type-III, but had a weak grasp on the argument - I just relied on the advice in John fox's regression book (car) that advis...
null
CC BY-SA 2.5
null
2011-02-08T18:23:45.137
2011-02-08T18:23:45.137
null
null
null
null
6998
1
6999
null
4
568
The geometric mean is the appropriate measure of central tendency for log-normally distributed variables. However, the arithmetic mean still has some use in relation to log-normal variables - in inferring totals from survey data, for instance. It is my understanding that the arithmetic mean of the sample of a log-norma...
Means and imputation of log-normal variables
CC BY-SA 2.5
null
2011-02-08T18:39:48.527
2011-02-08T18:48:31.850
null
null
229
[ "mean", "data-imputation", "lognormal-distribution" ]
6999
2
null
6998
5
null
Replacing missing data with the mean is worse than useless as a method of imputation. See e.g. [this page on missingdata.org.uk](http://missingdata.lshtm.ac.uk/index.php?option=com_content&view=article&id=68%3asimple-mean-imputation&catid=39%3asimple-ad-hoc-methods-for-coping-with-missing-data&Itemid=96).
null
CC BY-SA 2.5
null
2011-02-08T18:48:31.850
2011-02-08T18:48:31.850
null
null
449
null
7001
2
null
6975
1
null
You may want to start using a dimensionality reduction,maybe using [PCA](http://en.wikipedia.org/wiki/Principal_components_analysis) or [MDS](http://en.wikipedia.org/wiki/Multidimensional_scaling), which may give a clearer picture. I would also try [clustering](http://en.wikipedia.org/wiki/Cluster_analysis), whether k-...
null
CC BY-SA 2.5
null
2011-02-08T21:25:23.370
2011-02-08T21:25:23.370
null
null
2314
null
7004
1
7005
null
21
20073
## Background I have a variable with an unknown distribution. I have 500 samples, but I would like demonstrate the precision with which I can calculate variance, e.g. to argue that a sample size of 500 is sufficient. I am also interested in knowing the minimum sample size that would be required to estimate variance ...
Calculating required sample size, precision of variance estimate?
CC BY-SA 2.5
null
2011-02-09T00:48:49.097
2016-09-11T03:20:05.800
2020-06-11T14:32:37.003
-1
2750
[ "estimation", "random-variable", "variance", "sampling", "sample-size" ]
7005
2
null
7004
13
null
For i.i.d. random variables $X_1, \dotsc, X_n$, the unbiased estimator for the variance $s^2$ (the one with denominator $n-1$) has variance: $$\mathrm{Var}(s^2) = \sigma^4 \left(\frac{2}{n-1} + \frac{\kappa}{n}\right)$$ where $\kappa$ is the excess kurtosis of the distribution (reference: [Wikipedia](http://en.wikiped...
null
CC BY-SA 3.0
null
2011-02-09T02:12:51.547
2012-06-07T00:58:13.283
2012-06-07T00:58:13.283
2750
2898
null
7007
1
null
null
3
5357
## Context: A sample of people were asked to provide ratings of their impression of [jeepneys](http://en.wikipedia.org/wiki/Jeepney) using a Likert Scale. Age, gender, household income, and so on was also obtained. Dangerous: strongly agree; agree; neutral; disagree; strongly disagree Convenient: strongly a...
Statistical Analysis for Perception Survey
CC BY-SA 2.5
null
2011-02-09T03:36:52.297
2017-04-26T14:00:16.703
2011-02-12T05:47:26.930
183
3118
[ "survey", "stata" ]
7008
2
null
7004
18
null
Learning a variance is hard. It takes a (perhaps surprisingly) large number of samples to estimate a variance well in many cases. Below, I'll show the development for the "canonical" case of an i.i.d. normal sample. Suppose $Y_i$, $i=1,\ldots,n$ are independent $\mathcal{N}(\mu, \sigma^2)$ random variables. We seek a $...
null
CC BY-SA 2.5
null
2011-02-09T04:05:39.063
2011-02-09T13:24:07.000
2011-02-09T13:24:07.000
2970
2970
null