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
5683
2
null
5682
3
null
I have never used it, but I know for new versions of IML, you can call R routines. Maybe start by looking at [http://support.sas.com/rnd/app/studio/statr.pdf](http://support.sas.com/rnd/app/studio/statr.pdf).
null
CC BY-SA 2.5
null
2010-12-22T01:26:07.817
2010-12-22T01:26:07.817
null
null
2040
null
5684
2
null
5664
3
null
In addition to the existing answers, you may find it useful to read up about test norms, a well established topic in psychology and education. - Test Norms: Their Use and Interpretation. - http://psychassessment.com.au/PDF/Chapter%2004.pdf - Google 'test norms'
null
CC BY-SA 2.5
null
2010-12-22T03:23:21.193
2010-12-22T03:23:21.193
null
null
183
null
5685
2
null
5681
1
null
It may not make sense to take an unweighted average of all $N$ observations if the subjects are divided among $k$ subpopulations [=groups] - unless the sample sizes in the groups are proportional to the sizes of the subpopulations. Otherwise, what characteristic[s] of interest would an unweighted average estimate? You...
null
CC BY-SA 2.5
null
2010-12-22T04:48:57.077
2010-12-22T11:47:26.107
2010-12-22T11:47:26.107
null
1112
null
5686
1
null
null
54
75312
I would like to know why some languages like R has both NA and NaN. What are the differences or are they equally the same? Is it really needed to have NA?
What is the difference between NaN and NA?
CC BY-SA 2.5
null
2010-12-22T06:52:16.957
2022-11-24T14:03:06.527
null
null
2479
[ "r" ]
5687
2
null
5686
46
null
> ?is.nan ?is.na ?NA ?NaN Should answer your question. But, in short: NaN means $\frac {0} {0}$ -- Stands for Not a Number NA is generally interpreted as a missing value and has various forms - NA_integer_, NA_real_, etc. Therefore, NaN $\neq$ NA and there is a need for NaN and NA.
null
CC BY-SA 2.5
null
2010-12-22T07:08:13.557
2010-12-22T07:08:13.557
2020-06-11T14:32:37.003
-1
1307
null
5688
2
null
5686
12
null
NA is for missing data. NaN, as J.M. said is for arithmetic purpose. NaN is usually the product of some arithmetic operation, such as `0/0`. NA usually is declared in advance, or is a product of operation when you try to access something that is not there: ``` > a <- c(1,2) > a[3] [1] NA ```
null
CC BY-SA 2.5
null
2010-12-22T07:09:16.243
2010-12-22T07:09:16.243
null
null
2116
null
5690
1
9097
null
12
7815
I'm looking into median survival using Kaplan-Meier in different states for a type of cancer. There are quite big differences between the states. How can i compare the median survival between all the states and determine which ones are significantly different from the mean median survival all across the country?
How to compare median survival between groups?
CC BY-SA 2.5
null
2010-12-22T09:55:50.503
2012-04-29T18:11:51.660
2011-04-29T01:09:38.913
3911
1291
[ "multiple-comparisons", "survival" ]
5691
1
5692
null
5
4201
I wish to create a confidence interval for a statistic calculated on a table (let's say the p.value of chisqr.test). For this, I might sample a bootstrap sample with the same size, from a table with the proportions of the table I have. And my questions are: - Is this a correct procedure to use, or is there some catch...
Is it o.k. to bootstrap sample of a table from its proportions - and how to do so (in R)?
CC BY-SA 3.0
null
2010-12-22T11:13:56.733
2016-03-28T23:09:59.270
2016-03-28T23:09:59.270
2910
253
[ "r", "chi-squared-test", "bootstrap", "contingency-tables" ]
5692
2
null
5691
4
null
Let me see if I understand you correctly: You have a contingency table say $M$ by $N$ and you calculate a statistic based on this table. You want a CI for this statistic and you don't have a theoretical CI (or may be you don't want to use it, due to some reason). Generally, if you have a contingency table, the columns...
null
CC BY-SA 2.5
null
2010-12-22T11:46:08.653
2010-12-22T11:46:08.653
null
null
1307
null
5693
2
null
4687
6
null
First of all, your usage of the term "prior probability" seems to be wrong. For any node N with discrete values $n_i$ the probability that a certain value of N occurs a priori is $p(N=n_i)$. If a node has no parents, one is interested in calculate this prob. But if a node has parents P, one is interested in calculating...
null
CC BY-SA 2.5
null
2010-12-22T12:52:08.763
2010-12-22T13:04:42.997
2010-12-22T13:04:42.997
264
264
null
5694
2
null
5691
1
null
I once asked similar [question on stackoverflow](https://stackoverflow.com/questions/2281561/random-sample-from-given-bivariate-discrete-distribution). Basically you sample from table the same way you sample vector.
null
CC BY-SA 2.5
null
2010-12-22T13:05:52.840
2010-12-22T13:05:52.840
2017-05-23T12:39:26.523
-1
2116
null
5695
2
null
2891
2
null
If these are exclusive behaviours - they must either turn left or right and can't go straight on, stop or anything else - then you have data that you might assume are binomially distributed: in the example you give there are then 1042 left turns (the 'ones') in 1084 'runs' which you are implicitly assuming to be indepe...
null
CC BY-SA 2.5
null
2010-12-22T14:21:26.737
2010-12-22T14:21:26.737
null
null
1739
null
5696
1
null
null
14
1271
I have multiple independent coders who are trying to identify events in a time series -- in this case, watching video of face-to-face conversation and looking for particular nonverbal behaviors (e.g., head nods) and coding the time and category of each event. This data could reasonable be treated as a discrete-time se...
Interrater reliability for events in a time series with uncertainty about event time
CC BY-SA 2.5
null
2010-12-22T15:41:17.387
2013-07-26T14:41:13.317
2010-12-22T15:59:33.153
930
null
[ "time-series", "reliability", "agreement-statistics" ]
5698
1
5699
null
3
5794
Please forgive me if this is not the right Stack Exchange (and for inventing terms). For discrete random variables X and Y, the mutual information of X and Y can be defined as follows: $I(X;Y) = \sum_{y \in Y} \sum_{x \in X} p(x,y) \log{ \left( \frac{p(x,y)}{p_1(x)\,p_2(y)} ...
Can the mutual information of a "cell" be negative?
CC BY-SA 2.5
0
2010-12-22T16:16:54.973
2016-02-25T12:23:41.740
2010-12-22T16:51:18.393
2485
2485
[ "mutual-information", "information-theory", "probability" ]
5699
2
null
5698
1
null
Answered on [Theoretical Computer Science](https://cstheory.stackexchange.com/questions/3939/can-the-mutual-information-of-a-cell-be-negative/3943#3943). CI cannot be negative. The gist is that $CI=p(x_0) KL(p (y|x_0), p(y))$, and the Kullback-Leibler divergence is non-negative.
null
CC BY-SA 3.0
null
2010-12-22T17:16:24.587
2016-02-25T12:23:41.740
2017-04-13T12:32:33.667
-1
2485
null
5700
1
444148
null
13
12085
Greetings, I'm performing research that will help determine the size of observed space and the time elapsed since the big bang. Hopefully you can help! I have data conforming to a piecewise linear function on which I want to perform two linear regressions. There is a point at which the slope and intercept change, and I...
Finding the change point in data from a piecewise linear function
CC BY-SA 2.5
null
2010-12-22T17:44:21.793
2023-05-04T11:52:10.127
2011-02-28T12:34:24.513
2116
2488
[ "regression", "change-point" ]
5701
2
null
5700
6
null
If the number of points is not too big, you may try all possibilities. Let's assume that the points are $X_i=(x_i,y_i)$ where $i=1,..,N$. Than, you may loop with $j$ from $2$ to $N-2$ and fit two lines to both $\{X_1,...,X_j\}$ and $\{X_{(j+1)},...,X_N\}$. Finally, you pick $j$ for which the sum of sum of squared resid...
null
CC BY-SA 2.5
null
2010-12-22T17:56:04.617
2010-12-22T17:56:04.617
null
null
null
null
5702
2
null
5700
8
null
R package [strucchange](http://cran.r-project.org/web/packages/strucchange/index.html) might help you. Look at the vignette, it has a nice overview how to solve similar problems.
null
CC BY-SA 2.5
null
2010-12-22T17:56:27.893
2010-12-22T17:56:27.893
null
null
2116
null
5703
1
null
null
8
589
Given $n$-vectors $x, y_1, y_2$ such that the Spearman correlation coefficient of $x$ and $y_i$ is $\rho_i = \rho(x,y_i)$, are there known bounds on the Spearman coefficient of $x$ with $y_1 + y_2$, in terms of the $\rho_i$ (and $n$, presumably)? That is, can one find (non-trivial) functions $l(\rho_1,\rho_2,n), u(\rho...
Are there bounds on the Spearman correlation of a sum of two variables?
CC BY-SA 2.5
null
2010-12-22T17:57:02.523
2010-12-23T20:53:49.907
2010-12-22T21:15:59.063
795
795
[ "correlation", "spearman-rho", "bounds" ]
5705
2
null
4687
2
null
Consider two simple cases, 1) a real valued variable X is the parent of another real valued variable Y 2) a real valued variable X is the parent of a discrete valued variable Y Assume that the Bayes net is a directed graph X -> Y. The Bayes net is fully specified, in both cases, when P(X) and P(Y | X) are specified. ...
null
CC BY-SA 2.5
null
2010-12-22T18:30:25.820
2010-12-22T18:30:25.820
null
null
1739
null
5706
1
null
null
3
199
Suppose I have a fleet of two-car trains riding around, and that each car is equipped with a data recording device. Unfortunately, some of the recording devices aren't working. I don't know either the exact size of the fleet or the percentage of failed recording devices. I'd like to make a reasonable guess about how ma...
Extrapolating the amount of data missing from the amount of data partially missing
CC BY-SA 2.5
null
2010-12-22T18:52:56.557
2010-12-23T14:41:47.153
2010-12-23T14:41:47.153
null
null
[ "data-mining", "missing-data", "transportation" ]
5707
2
null
5700
5
null
This is an (offline) changepoint detection problem. Our [previous discussion](https://stats.stackexchange.com/questions/2432/loess-that-allows-discontinuities/2445#2445) provides references to journal articles and R code. Look first at the [Barry and Hartigan](http://www.jstor.org/pss/2290726) "product partition mode...
null
CC BY-SA 2.5
null
2010-12-22T19:16:53.440
2010-12-22T19:16:53.440
2017-04-13T12:44:20.943
-1
919
null
5708
2
null
5664
1
null
I'd like to add another cautionary note, and a suggestion. When asked for a 1-5 rating, I usually think up some scale, like: - worst ever - real bad - ok - great - awesome If your raters did similarly, taking an average is somewhat questionable; the difference between "worst ever" and "real bad" may be larger th...
null
CC BY-SA 2.5
null
2010-12-22T19:37:14.630
2010-12-22T19:37:14.630
null
null
2489
null
5709
2
null
5706
6
null
This is a quick partial response to outline some options and correct some errors. You are implicitly seeking a [method of moments estimator](http://en.wikipedia.org/wiki/Method_of_moments_%28statistics%29). Under your assumptions, letting $f$ be the failure rate and $n$ be the fleet size, the expectations of the $S_i$...
null
CC BY-SA 2.5
null
2010-12-22T20:17:21.017
2010-12-22T20:17:21.017
null
null
919
null
5710
2
null
423
27
null
From [SMBC](http://www.smbc-comics.com): ![alt text](https://i.stack.imgur.com/isA5v.gif)
null
CC BY-SA 2.5
null
2010-12-22T23:06:03.883
2010-12-22T23:06:03.883
null
null
1106
null
5712
2
null
5686
6
null
I think of NA standing for 'Not Available', while NaN is 'Not a Number', although this is more mnemonic than explanation. By the way, I know of no language other than R (perhaps Splus?) that has both. Matlab, for example, has only NaN.
null
CC BY-SA 2.5
null
2010-12-23T01:12:45.503
2010-12-23T17:23:28.107
2010-12-23T17:23:28.107
795
795
null
5713
1
null
null
9
13376
Occasionally I see in literature that a categorical variable such as sex is “partialled” or “regressed” out in (fixed-effects or mixed-effects) regression analysis. I'm troubled with the following practical issues involved in such a statement: (1) Usually the coding method is not mentioned in the paper. Such a variabl...
Partialling or regressing out a categorical variable?
CC BY-SA 2.5
null
2010-12-23T04:43:03.667
2010-12-24T00:48:56.240
2010-12-23T04:53:54.900
1513
1513
[ "regression" ]
5714
2
null
2419
6
null
I had good success with the tree-based learners in [Milk: Machine Learning Toolkit for Python](http://luispedro.org/software/milk). It seems to be under active development, but the documentation was a bit sparse when I was using it. The test suite (github.com/luispedro/milk/blob/master/tests/test_adaboost.py) contain...
null
CC BY-SA 2.5
null
2010-12-23T05:18:33.843
2010-12-23T05:18:33.843
null
null
2498
null
5715
2
null
5700
3
null
Also the [segmented](http://cran.r-project.org/web/packages/segmented/index.html) package has helped me with similar problems in the past.
null
CC BY-SA 2.5
null
2010-12-23T11:04:55.210
2010-12-23T21:31:31.840
2010-12-23T21:31:31.840
930
1291
null
5716
2
null
5713
4
null
I don't think (1) makes any difference. The idea is to partial out from the response and the other predictors the effects of Sex. It doesn't matter if you code 0, 1 (Treatment contrasts) or 1, -1 (Sum to zero contrasts) as the models represent the same "amount" of information which is then removed. Here is an example i...
null
CC BY-SA 2.5
null
2010-12-23T11:47:46.440
2010-12-23T11:47:46.440
null
null
1390
null
5717
2
null
5713
1
null
It looks like I can't add a long comment directly to Dr. Simpson's answer. Sorry I have to put my response here. I really appreciate your response, Dr. Simpson! I should clarify my arguments a little bit. What I'm having trouble with the partialling business is not a theoretical but a practical issue. Suppose a linear ...
null
CC BY-SA 2.5
null
2010-12-23T15:31:46.357
2010-12-23T21:28:57.707
2010-12-23T21:28:57.707
930
1513
null
5718
2
null
4172
1
null
Another [question](https://stats.stackexchange.com/questions/527/what-ways-are-there-to-show-two-analytical-methods-are-equivalent/) seems to have covered similar ground, at least in regards to similarity of discrete values. There I suggest regressing regression would be usable in theory for the GPS position, though I...
null
CC BY-SA 2.5
null
2010-12-23T16:59:38.090
2010-12-23T16:59:38.090
2017-04-13T12:44:29.923
-1
196
null
5719
2
null
5713
1
null
Remember though that error will be reduced by adding any addtional factors. Even if gender is insignficant in your model it may still be useful in the study. Signficance can be found in any factor if the sample size is large enough. Conversly, if the sample size is not large enough a signficant effect may not be tes...
null
CC BY-SA 2.5
null
2010-12-23T17:05:00.970
2010-12-23T17:05:00.970
null
null
null
null
5720
2
null
5603
3
null
Frankly, what you have is still a Markov Chain, as vqv has very rightly pointed out. (PS I tried to add this as a comment but where is the button??)
null
CC BY-SA 2.5
null
2010-12-23T17:10:23.330
2010-12-23T17:10:23.330
null
null
2472
null
5722
2
null
5703
4
null
Spearman's rank correlation is just the Pearson product-moment correlation between the ranks of the variables. Shabbychef's extra constraint means that $y_1$ and $y_2$ are the same as their ranks and that there are no ties, so they have equal standard deviation $\sigma_y$ (say). If we also replace x by its ranks, the p...
null
CC BY-SA 2.5
null
2010-12-23T19:11:42.133
2010-12-23T20:53:49.907
2010-12-23T20:53:49.907
449
449
null
5723
2
null
5682
4
null
You might want to pick up (or look at) a copy of Rick Wicklin's book: Statistical Programming with SAS IML software [https://support.sas.com/content/dam/SAS/support/en/books/statistical-programming-with-sas-iml-software/63119_excerpt.pdf](https://support.sas.com/content/dam/SAS/support/en/books/statistical-programming-...
null
CC BY-SA 4.0
null
2010-12-23T20:42:30.510
2019-02-14T17:43:29.250
2019-02-14T17:43:29.250
74358
686
null
5724
1
null
null
1
197
I'm new here and wondering if anyone could give me some hints on how to estimate the time varying coefficient and state variable together. Here is my model: observation equation: $Y(t)= A(t)X(t)+ w(t)$, state equation: $X(t)=\phi X(t-1)+v(t)$, here I have time varying coefficient $A(t)$, it doesn't depend on any prede...
Multiplicative unobservable component in state space model
CC BY-SA 2.5
null
2010-12-23T22:25:19.767
2010-12-24T13:05:52.223
2010-12-24T13:05:52.223
2510
2510
[ "time-series" ]
5725
2
null
5713
2
null
It's true that the choice of coding method influences how you interpret the model coefficients. In my experience though (and I realise this can depend on your field), dummy coding is so prevalent that people don't have a huge problem dealing with it. In this example, if male = 0 and female = 1, then the intercept is ba...
null
CC BY-SA 2.5
null
2010-12-24T00:48:56.240
2010-12-24T00:48:56.240
null
null
1569
null
5726
2
null
5603
1
null
You might find Scott and Smyth '03 of interest: [http://www.datalab.uci.edu/papers/ScottSmythV7.pdf](http://www.datalab.uci.edu/papers/ScottSmythV7.pdf). They discuss markov modulated poisson processes, which varies the rate parameter based on which markov state it is in. You could have two states, one below and one ab...
null
CC BY-SA 2.5
null
2010-12-24T02:13:25.680
2010-12-24T02:13:25.680
null
null
2073
null
5727
1
5741
null
23
6384
I have a question on calculating James-Stein Shrinkage factor in the [1977 Scientific American paper by Bradley Efron and Carl Morris, "Stein's Paradox in Statistics"](http://www-stat.stanford.edu/~ckirby/brad/other/Article1977.pdf). I gathered the data for the baseball players and it is given below: ``` Name, avg45,...
James-Stein estimator: How did Efron and Morris calculate $\sigma^2$ in shrinkage factor for their baseball example?
CC BY-SA 3.0
null
2010-12-24T02:40:14.103
2018-07-01T01:05:25.077
2014-11-03T17:52:18.700
28666
2513
[ "estimation", "regularization", "steins-phenomenon" ]
5728
1
5764
null
9
20123
I am running a model for a problem in insurance domain. The final results show some false positive x and some false negative y. I am using SAS Enterprise Miner for this. Can somebody suggest me how to reduce false positive? I know for this i have to increase the false negative. I want to know two things: - Is there ...
Reducing false positive rate
CC BY-SA 2.5
null
2010-12-24T06:49:14.123
2021-06-15T09:41:06.170
2010-12-24T09:52:56.380
null
1763
[ "data-mining", "sas" ]
5729
2
null
5728
2
null
What you can do if you do not find the weight option is create the same effect yourself, by increasing the amount of the positives, for example you can give as an input to the algorithm 2 times each of the known positives an leave the negatives as they where. You can even increase it 10 times, it is a matter of experim...
null
CC BY-SA 2.5
null
2010-12-24T08:47:24.223
2010-12-24T08:47:24.223
null
null
1808
null
5730
2
null
4753
0
null
I had the same problem with a sparce matrix in NLP and what we did was select the columns that where more useful to clasify our rows (that gave more information for discerning the result), if you want I can explain it to you in more detail but it is really simple you can figure it out. But your problem does not seem t...
null
CC BY-SA 2.5
null
2010-12-24T09:01:39.010
2010-12-24T09:01:39.010
null
null
1808
null
5731
2
null
5724
1
null
I think this is related to [a previously asked question](https://stats.stackexchange.com/questions/4334/state-space-form-of-time-varying-ar1). One of the answers suggested to use the [AD Model Builder software](http://admb-project.org). Although I haven't used it myself, looking at the manual it looks like an alternati...
null
CC BY-SA 2.5
null
2010-12-24T09:22:15.193
2010-12-24T09:22:15.193
2017-04-13T12:44:44.530
-1
892
null
5732
1
null
null
8
1050
Why the test function in Kolmogorov-Smirnov test takes the supremum of the set of differences, not maximum? When maximum (greatest element) of a set does not exist then supremum may exist, but if greatest element exist then supremum is same as greatest element. I want to know why here greatest element does not exist? T...
Why "supremum", not "maximum" in Kolmogorov-Smirnov test?
CC BY-SA 2.5
null
2010-12-24T09:55:08.067
2010-12-24T12:34:18.007
2010-12-24T10:03:05.737
null
2516
[ "kolmogorov-smirnov-test" ]
5733
1
7892
null
10
5492
I'm working on a Monte Carlo function for valuing several assets with partially correlated returns. Currently, I just generate a covariance matrix and feed to the the `rmvnorm()` function in R. (Generates correlated random values.) However, looking at the distributions of returns of an asset, it is not normally distr...
Generate random multivariate values from empirical data
CC BY-SA 3.0
null
2010-12-24T10:35:28.497
2018-03-05T11:47:46.557
2018-03-05T11:47:46.557
7290
2566
[ "markov-chain-montecarlo", "monte-carlo", "density-function" ]
5734
1
null
null
2
5550
I try to implement a time series data analysis project, but I have to do in Java, C# or Python, is there any good libary such like LOESS, ARIMA in R you can recommend?
Is there any library like LOESS or ARIMA in Java/C# or Python?
CC BY-SA 4.0
null
2010-12-24T10:46:30.457
2019-09-17T11:39:24.123
2019-09-17T11:39:24.123
11887
2454
[ "time-series", "software" ]
5735
2
null
5733
4
null
Regarding the first question, you might consider resampling your data. There would be a problem in case your data were correlated over time (rather than contemporaneously correlated), in which case you would need something like a block bootstrap. But for returns data, a simple bootstrap is probably fine. I guess the an...
null
CC BY-SA 2.5
null
2010-12-24T12:16:09.760
2010-12-24T12:16:09.760
null
null
892
null
5736
2
null
5733
3
null
The answer to the first question is that you build a model. In your case this means choosing a distribution and estimating its parameters. When you have the distribution you can sample from it using Gibbs or Metropolis algorithms. On the side note, do you really need to sample from this distribution? Usually the inter...
null
CC BY-SA 2.5
null
2010-12-24T12:23:59.530
2010-12-24T12:23:59.530
null
null
2116
null
5737
2
null
5732
10
null
Suppose a difference is an increasing continuous function on open interval and zero everywhere else. Then the maximum will not exist, but supremum will.
null
CC BY-SA 2.5
null
2010-12-24T12:34:18.007
2010-12-24T12:34:18.007
null
null
2116
null
5738
2
null
5727
14
null
I am not quite sure about the $c = 0.212$, but the following article provides a much more detailed description of these data: Efron, B., & Morris, C. (1975). Data analysis using Stein's estimator and its generalizations. Journal of the American Statistical Association, 70(350), 311-319 [(link to pdf)](http://www.medici...
null
CC BY-SA 4.0
null
2010-12-24T12:55:41.967
2018-07-01T01:05:25.077
2018-07-01T01:05:25.077
196461
1934
null
5739
2
null
4334
1
null
Would it possible to treat Y(t-1) as an exogenous variable, and estimate this state space model with kalman filter. Then the routine for estimating the coefficient is very standard.
null
CC BY-SA 2.5
null
2010-12-24T13:12:37.723
2010-12-24T13:12:37.723
null
null
2510
null
5740
2
null
5734
7
null
R is an open source project, so you can look at the file `src/library/stats/src/loessc.c` which implements the C-level computation behind `loess()`. You should be able to use that for an extension module to the other languages you listed. Or, and this may be easier, you some of the existing ways to access R from Java,...
null
CC BY-SA 2.5
null
2010-12-24T14:10:09.720
2010-12-24T14:10:09.720
null
null
334
null
5741
2
null
5727
22
null
The parameter $\sigma^2$ is the (unknown) common variance of the vector components, each of which we assume are normally distributed. For the baseball data we have $45 \cdot Y_i \sim \mathsf{binom}(45,p_i)$, so the normal approximation to the binomial distribution gives (taking $ \hat{p_{i}} = Y_{i}$) $$ \hat{p}_{i}\...
null
CC BY-SA 2.5
null
2010-12-24T16:06:05.953
2010-12-24T18:23:29.703
2010-12-24T18:23:29.703
null
null
null
5742
1
5743
null
3
277
## Background I have a data set $Y$: ``` set.seed(0) predictor <- c(rep(5,10), rep(10,10), rep(15,10), rep(20,10)) + rnorm(40) response <- c(rnorm(10,1), rnorm(10,4), rnorm(10,2), rnorm(10,1)) plot(predictor, response) ``` and a set of models g$_i$: ``` fits <- list() fits[['null']] <- lm(response ~ 1) fits[[...
How can I calculate the probability of model $g_i$ given a set of $n$ models and AIC values?
CC BY-SA 2.5
null
2010-12-24T17:07:49.823
2010-12-25T15:35:17.650
2010-12-25T15:35:17.650
1381
1381
[ "probability", "model-selection", "maximum-likelihood" ]
5743
2
null
5742
2
null
Although AIC may not be suitable in this context, Aikake weights provide the ratio of $$\frac{L(g_i|Y)}{\sum_{j=1:n}{L(g_j|Y)}}$$ ## Solution This can be calculated from AIC in this way for each model $i$ (closely following [Burnham and Anderson, 2002](http://books.google.com/books?id=BQYR6js0CC8C&pg=PA75&lpg=PA75&d...
null
CC BY-SA 2.5
null
2010-12-24T20:56:03.353
2010-12-24T21:25:57.317
2020-06-11T14:32:37.003
-1
1381
null
5744
2
null
5691
0
null
how to bootstrap a table ought to depend on how it was obtained. there are a few ways this can be done. for example, one can sample n individuals and classify all of them into an $r\times c$ table. in this scenario, neither row nor column totals are fixed. it would then seem plausible that a bootstrap sample would tak...
null
CC BY-SA 2.5
null
2010-12-25T04:24:25.403
2010-12-25T04:24:25.403
null
null
1112
null
5745
2
null
5629
5
null
See Wikipedia's [List of uncertainty propagation software](http://en.wikipedia.org/wiki/List_of_uncertainty_propagation_software), in particular Python [uncertainties](http://packages.python.org/uncertainties) . There's even a conference: [http://probabilistic-programming.org/wiki/NIPS*2008_Workshop](http://probabilist...
null
CC BY-SA 3.0
null
2010-12-25T13:15:31.367
2016-09-07T11:45:57.263
2016-09-07T11:45:57.263
-1
557
null
5746
1
null
null
4
936
The [Secretary problem](http://en.wikipedia.org/wiki/Secretary_problem) has an algorithm for fixed N and immediate accept/reject (that is, reject reject ... accept one, stop). There are several variants; in mine, secretaries or samples come from a real-valued source Xj, payoff is from best-so-far not last, and each sam...
Optimal stopping from an unknown distribution
CC BY-SA 2.5
null
2010-12-25T15:29:04.023
2022-08-30T14:09:50.687
2010-12-29T13:00:33.357
557
557
[ "sampling", "search-theory", "optimal-stopping" ]
5747
1
5753
null
74
39505
I know empirically that is the case. I have just developed models that run into this conundrum. I also suspect it is not necessarily a yes/no answer. I mean by that if both A and B are correlated with C, this may have some implication regarding the correlation between A and B. But, this implication may be weak. It ...
If A and B are correlated with C, why are A and B not necessarily correlated?
CC BY-SA 2.5
null
2010-12-25T19:24:45.540
2021-11-29T04:37:55.217
2011-01-12T16:15:01.780
919
1329
[ "correlation", "cross-correlation" ]
5748
2
null
5747
16
null
I will leave the statistical demonstration to those who are better suited than me for it... but intuitively say that event A generates a process X that contributes to the generation of event C. Then A is correlated to C (through X). B, on the other hand generates Y, that also shapes C. Therefore A is correlated to C, B...
null
CC BY-SA 2.5
null
2010-12-25T19:30:52.613
2010-12-26T08:17:28.360
2010-12-26T08:17:28.360
582
582
null
5749
1
null
null
3
197
If you want to regress y on x, where multiple y's are observed at each x, is it ever better to instead take the mean at each x, and the use those means for the regression? Does it depend on the distributional assumptions?
When is it better to average observations at the same abscissa?
CC BY-SA 2.5
null
2010-12-25T21:13:06.783
2010-12-26T13:45:12.120
2010-12-26T13:45:12.120
null
null
[ "regression" ]
5750
1
5754
null
71
23023
I have several hundred measurements. Now, I am considering utilizing some kind of software to correlate every measure with every measure. This means that there are thousands of correlations. Among these there should (statistically) be a high correlation, even if the data is completely random (each measure has only abou...
Look and you shall find (a correlation)
CC BY-SA 3.0
null
2010-12-25T22:16:04.897
2017-02-15T22:44:30.453
2017-02-15T22:44:30.453
28666
888
[ "correlation", "multiple-comparisons", "permutation-test" ]
5751
2
null
5747
17
null
I think it's better to ask "why SHOULD they be correlated?" or, perhaps "Why should have any particular correlation?" The following R code shows a case where x1 and x2 are both correlated with Y, but have 0 correlation with each other ``` x1 <- rnorm(100) x2 <- rnorm(100) y <- 3*x1 + 2*x2 + rnorm(100, 0, ....
null
CC BY-SA 4.0
null
2010-12-25T22:17:12.493
2021-11-29T02:48:36.597
2021-11-29T02:48:36.597
11887
686
null
5752
2
null
5750
7
null
This is an example of multiple comparisons. There's a large literature on this. If you have, say, 100 variables, then you will have 100*99/2 =4950 correlations. If the data are just noise, then you would expect 1 in 20 of these to be significant at p = .05. That's 247.5 Before going farther, though, it would be good...
null
CC BY-SA 2.5
null
2010-12-25T22:22:20.943
2010-12-25T22:22:20.943
null
null
686
null
5753
2
null
5747
62
null
Because correlation is a mathematical property of multivariate distributions, some insight can be had purely through calculations, regardless of the statistical genesis of those distributions. For the Pearson correlations, consider multinormal variables $X$, $Y$, $Z$. These are useful to work with because any non-nega...
null
CC BY-SA 2.5
null
2010-12-25T23:54:38.263
2011-01-12T16:17:07.083
2011-01-12T16:17:07.083
919
919
null
5754
2
null
5750
76
null
This is an excellent question, worthy of someone who is a clear statistical thinker, because it recognizes a subtle but important aspect of multiple testing. There are [standard methods to adjust the p-values](http://www.technion.ac.il/docs/sas/stat/chap43/sect14.htm) of multiple correlation coefficients (or, equivalen...
null
CC BY-SA 2.5
null
2010-12-26T00:13:23.897
2010-12-26T00:13:23.897
2017-04-13T12:44:32.747
-1
919
null
5755
2
null
5749
6
null
When you use the means you are removing much of the variation of the y's around their averages. This would be incorrect if you are assessing the relationships between the individual y's and the x's. In particular it will cause you to overestimate the correlation between the y's and the x's and give you too much confi...
null
CC BY-SA 2.5
null
2010-12-26T00:19:39.053
2010-12-26T00:19:39.053
null
null
919
null
5756
2
null
5747
22
null
Correlation is the cosine of the angle between two vectors. In the situation described, (A,B,C) is a triple of observations, made n times, each observation being a real number. The correlation between A and B is the cosine of the angle between $V_A=A-E(A)$ and $V_B=B-E(B)$ as measured in n-dimensional euclidean space. ...
null
CC BY-SA 2.5
null
2010-12-26T07:26:29.060
2010-12-26T07:54:47.530
2010-12-26T07:54:47.530
2526
2526
null
5757
1
null
null
7
2643
In a double-blind study, when are deviations from the control group considered statistically significant? And is this related to the number of samples? I realise that every experiment is different and statistical significance should depend on the deviations in measurements and the size of the sample group, but I'm hopi...
When is a deviation statistically significant?
CC BY-SA 2.5
null
2010-12-26T11:41:21.370
2010-12-26T16:39:54.303
2010-12-26T16:39:54.303
1497
1497
[ "algorithms", "statistical-significance" ]
5758
2
null
4949
1
null
It seems that you can go about this in two ways, depending on what model assumptions you are happy to make. Generative Approach Assuming a generative model for the data, you also need to know the prior probabilities of each class for an analytic statement of the classification error. Look up [Discriminant Analysis](...
null
CC BY-SA 2.5
null
2010-12-26T12:51:17.367
2010-12-26T12:51:17.367
null
null
1739
null
5759
2
null
4396
0
null
I think one option is to split a SPSS file in groups. The menu approach is Data > Split file. I have worked with the rank option, but I think that is better to split the file, for doing other analysis by groups.
null
CC BY-SA 2.5
null
2010-12-26T13:37:32.393
2010-12-26T13:37:32.393
null
null
null
null
5760
2
null
5757
7
null
This question gets to the heart of statistical thinking by recognizing that both (a) "every experiment is different," implying no single "cookbook" recipe will suffice to assess experimental results in all cases and (b) "significance should depend on the deviations in measurements," pointing towards the importance of p...
null
CC BY-SA 2.5
null
2010-12-26T15:52:51.497
2010-12-26T15:52:51.497
null
null
919
null
5761
2
null
5746
5
null
Not an answer, but maybe this helps to clarify the question... I don't think the secretary problem is without dependence on the underlying distribution. For example, if the observations aren't stationary, the 37% approach is not likely to be optimal. For a concrete example, a person making monthly purchases in an inde...
null
CC BY-SA 4.0
null
2010-12-26T17:02:26.383
2022-08-30T14:09:50.687
2022-08-30T14:09:50.687
69508
null
null
5762
1
5784
null
2
494
My project is about whether early language scores (on a reading task) can predict later scores on a social attribution task. I have to conduct a logistic regression for my project but I am stuck on which one is appropriate. This is because I have conducted a binary logistic and multinomial logistic regression but I alw...
What logistic regression is best to use?
CC BY-SA 2.5
null
2010-12-26T17:08:51.420
2010-12-28T15:30:54.830
2010-12-26T23:14:08.420
null
null
[ "logistic", "self-study" ]
5763
2
null
5762
6
null
Logistic regression is to be used when the outcome of interest is a binary variable (e.g., success/failure), whereas multinomial logistic is reserved for the case of a multi-category response variable (e.g., blue/red/green). In both cases, the response variable to be predicted is a categorical variable. The predictors ...
null
CC BY-SA 2.5
null
2010-12-26T17:29:24.403
2010-12-28T08:33:23.127
2010-12-28T08:33:23.127
930
930
null
5764
2
null
5728
12
null
Regarding first (and second) question: A general approach to reduce misclassifications error by iteratively training models and reweighting rows (based on classification error) is [Boosting](http://en.wikipedia.org/wiki/Boosting). I think you might find that technique interesting. Regarding second question: The questio...
null
CC BY-SA 2.5
null
2010-12-26T20:51:31.283
2010-12-26T20:58:12.193
2017-04-13T12:44:36.927
-1
264
null
5765
1
null
null
3
2293
Given a list of numbers, is it possible to find out (or in other words, is there a statistical measure to tells the) the closeness of the numbers (do note that i am not talking about correlation - this would be for 2 sequences - something like correlation between height and weight). I am looking for something like a cl...
Measure of closeness
CC BY-SA 2.5
null
2010-12-27T05:22:20.193
2017-06-12T14:02:49.980
2017-06-12T14:02:49.980
11887
2535
[ "descriptive-statistics", "measurement", "winsorizing" ]
5766
2
null
5765
8
null
The simplest would be the standard deviation. Other measures of 'scale' include the MAD (median absolute deviation), the IQR (interquartile range), Winsorized standard deviation, etc. You might also be interested in the [Index of Disperson](http://en.wikipedia.org/wiki/Index_of_dispersion), the [Coefficient of Variatio...
null
CC BY-SA 2.5
null
2010-12-27T05:34:18.727
2010-12-27T05:47:20.770
2010-12-27T05:47:20.770
795
795
null
5767
2
null
5765
1
null
I'd use standard deviation, like shabbychef said. See [http://en.wikipedia.org/wiki/Variance](http://en.wikipedia.org/wiki/Variance) to learn more.
null
CC BY-SA 2.5
null
2010-12-27T06:36:10.327
2010-12-27T06:36:10.327
null
null
2489
null
5768
1
null
null
3
1557
I have been confused with the problem for a very long time, and hope that somebody here can help me out. I have a experiment installed in split-plot design, with 3 temporal groups as blocks, and 2 factors (each have 3 fixed levels) combinations in each of the block, and I have 4 replicates in each treatments. I used to...
Can I test the effect of Block in a split plot design in R?
CC BY-SA 4.0
null
2010-12-27T09:00:13.790
2019-04-05T12:14:07.653
2019-04-05T12:14:07.653
11887
2536
[ "r", "experiment-design", "split-plot" ]
5769
2
null
5734
2
null
With respect to loess the [BioPython](http://biopython.org/wiki/Biopython) project has a [lowess() function.](http://www.koders.com/python/fid5A91A606E15507B6823DEC7A059488A6624C4832.aspx?s=python) As for ARIMA model fitting, [PyIMSL Studio](http://www.vni.com/campaigns/pyimslstudioeval/) contains a number of very usef...
null
CC BY-SA 2.5
null
2010-12-27T15:20:52.803
2010-12-27T16:36:11.353
2010-12-27T16:36:11.353
1080
1080
null
5770
2
null
5768
2
null
I think you know this already, but you can calculate the F Statistic by the ratio of MS and the F Statistic follows $F_{df1, df2}$ where df1 and df2 are degrees of freedom of the numerator and denominator. About your estimating the block effect question: First, I don't understand what is your block effect? Normally in...
null
CC BY-SA 2.5
null
2010-12-27T16:46:32.043
2010-12-27T16:46:32.043
null
null
1307
null
5771
1
5780
null
5
1084
Suppose I am doing some experimental procedure on two treatment groups. The procedure has several stages, each of which may fail. Failure at any stage halts the experiment. If all stages are passed then there is some useful result. Although I'm primarily interested in the final result, the treatments might also entail ...
Multiple comparisons on nested subsets of data
CC BY-SA 2.5
null
2010-12-27T19:50:12.313
2010-12-28T10:48:09.420
null
null
174
[ "hypothesis-testing", "multiple-comparisons", "chi-squared-test" ]
5772
2
null
5762
1
null
Good explanation. Remember in your program output for the multilogistic model will only give estimates for two models even though there are three categories. The model that produces the largest estimate has the higheset odds from coming from that group. The last group can be determined by 1-estimate1-estimate2. Fro...
null
CC BY-SA 2.5
null
2010-12-28T02:35:22.147
2010-12-28T02:35:22.147
null
null
2539
null
5773
2
null
5747
105
null
I'm on an annual fishing trip right now. There is a correlation between the time of day I fish and the amount of fish I catch. There is also a correlation between the size of the bait I use and the amount of fish I catch. There is no correlation between the size of the bait and the time of day.
null
CC BY-SA 2.5
null
2010-12-28T02:45:45.653
2010-12-28T02:45:45.653
null
null
2539
null
5774
1
null
null
215
248909
I have a dataset that has both continuous and categorical data. I am analyzing by using PCA and am wondering if it is fine to include the categorical variables as a part of the analysis. My understanding is that PCA can only be applied to continuous variables. Is that correct? If it cannot be used for categorical data,...
Can principal component analysis be applied to datasets containing a mix of continuous and categorical variables?
CC BY-SA 3.0
null
2010-12-28T03:47:52.190
2020-11-19T10:01:35.460
2018-04-20T16:31:14.647
11887
2540
[ "categorical-data", "pca", "correspondence-analysis", "mixed-type-data" ]
5775
2
null
5750
11
null
From your follow up response to Peter Flom's question, it sounds like you might be better served by techniques that look at higher level structure in your correlation matrix. Techniques like factor analysis, PCA, multidimensional scaling, and cluster analysis of variables can be used to group your variables into sets o...
null
CC BY-SA 2.5
null
2010-12-28T05:36:53.667
2010-12-28T05:36:53.667
null
null
183
null
5776
1
null
null
2
660
There are 8 people playing poker. So, the odds of winning the entire round = 1/8 2 rounds are played, and Bill wins both rounds. What are the odds this was random? (Hypothesis test?) NullH = Bill has no added skill. (Got lucky) AltH = Bill has skill. ``` p = .13 = 1/8 q = .87 = 7/8 n = 2 SD = sqrt(pq/n) = .23 actual...
Odds of winning 2 trials in a row
CC BY-SA 4.0
null
2010-12-28T06:35:28.500
2020-09-05T14:26:16.770
2020-09-05T14:26:16.770
56211
1279
[ "hypothesis-testing" ]
5777
2
null
5774
119
null
Although a PCA applied on binary data would yield results comparable to those obtained from a [Multiple Correspondence Analysis](http://en.wikipedia.org/wiki/Multiple_correspondence_analysis) (factor scores and eigenvalues are linearly related), there are more appropriate techniques to deal with mixed data types, namel...
null
CC BY-SA 4.0
null
2010-12-28T07:09:51.967
2020-11-19T09:42:47.060
2020-11-19T09:42:47.060
930
930
null
5778
2
null
5774
35
null
A Google search "pca for discrete variables" gives this [nice overview](http://staskolenikov.net/talks/Gustavo-Stas-PCA-generic.pdf) by S. Kolenikov (@StasK) and G. Angeles. To add to chl answer, the PC analysis is really analysis of eigenvectors of covariance matrix. So the problem is how to calculate the "correct" co...
null
CC BY-SA 3.0
null
2010-12-28T07:41:44.453
2017-06-26T13:26:28.997
2017-06-26T13:26:28.997
28845
2116
null
5779
2
null
5776
1
null
What you are observing is a random variable with [binomial distribution](http://en.wikipedia.org/wiki/Binomial_distribution), where number of trials is 2 and success probability $1/8$. You then can calculate p-value directly, without resorting to normal approximation. Your statistic is then the number of successes, whi...
null
CC BY-SA 2.5
null
2010-12-28T07:59:47.490
2010-12-28T09:10:10.303
2010-12-28T09:10:10.303
2116
2116
null
5780
2
null
5771
2
null
Assuming I understood your question correctly, I think what you are doing is fine. However, it does sound like you should correct your P values for multiple comparisons (for example using holm method with p.adjust function in R). The reason for the adjustment is that you are searching for "interesting results" over t...
null
CC BY-SA 2.5
null
2010-12-28T10:48:09.420
2010-12-28T10:48:09.420
null
null
253
null
5781
2
null
5733
3
null
I'm with @mpiktas in that I also think you need a model. I think the standard method here would be to estimate a copula to capture the dependence structure between the different assets and use e.g. skew-normal- or t-distributed marginal distributions for the different assets. That gives you a very general model class ...
null
CC BY-SA 2.5
null
2010-12-28T10:48:46.020
2010-12-28T10:48:46.020
null
null
1979
null
5782
1
5790
null
40
52835
Lets say we have random variable $X$ with known variance and mean. The question is: what is the variance of $f(X)$ for some given function f. The only general method that I'm aware of is the delta method, but it gives only aproximation. Now I'm interested in $f(x)=\sqrt{x}$, but it'd be also nice to know some general m...
Variance of a function of one random variable
CC BY-SA 3.0
null
2010-12-28T14:13:16.227
2020-03-01T13:35:12.273
2013-05-11T22:13:54.820
-1
1643
[ "variance", "random-variable", "delta-method" ]
5783
2
null
5782
9
null
To know the first two moments of X (mean and variance) is not enough, if the function f(x) is arbitrary (non linear). Not only for computing the variance of the transformed variable Y, but also for its mean. To see this -and perhaps to attack your problem- you can assume that your transformation function has a Taylor e...
null
CC BY-SA 2.5
null
2010-12-28T14:59:28.877
2010-12-28T14:59:28.877
null
null
2546
null
5784
2
null
5762
2
null
It sounds like either your professor gave you an incorrect recommendation, or you misunderstood, or you have not communicated what you want in a clear way. Something is wrong, in any case. If you are trying to predict a numeric score (like IQ, SAT, etc) then you do not want logistic regression of any type. You probab...
null
CC BY-SA 2.5
null
2010-12-28T15:30:54.830
2010-12-28T15:30:54.830
null
null
686
null
5785
2
null
5776
6
null
No, this is not right, because no observational context has been provided. All the following scenarios are consistent with the information given: - Two games will be played. Beforehand, you hypothesize that Bill will win both. Assuming the results are independent and Bill has 1/8 chance of winning, the chance of th...
null
CC BY-SA 2.5
null
2010-12-28T16:24:26.547
2010-12-28T16:24:26.547
null
null
919
null
5786
1
null
null
11
1752
Recently I have used Platt's scaling of SVM-outputs to estimate probabilities of default-events. More direct alternatives seem to be "Kernel logistic Regression" (KLR) and the related "Import Vector Machine". Can anyone tell which kernel method giving probability-outputs is currently state of the art? Does an R-impleme...
Which kernel method gives the best probability outputs?
CC BY-SA 2.5
null
2010-12-28T16:32:06.750
2015-04-14T19:15:54.360
2015-04-14T19:15:54.360
9964
2549
[ "logistic", "svm", "kernel-trick" ]
5787
2
null
5734
0
null
As far as I know there aren't many options. Libraries for time series analysis free or otherwise are hard to come by. If you are doing this for work you can have a look at [NAG](http://www.nag.com). It's commercial and not Java native. But you can use JNI with their C library. They have a [time series chapter](http:/...
null
CC BY-SA 2.5
null
2010-12-28T16:45:03.330
2010-12-28T16:45:03.330
2017-05-23T12:39:26.143
-1
300
null