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
3601
2
null
3595
4
null
It is hard to give a good answer without knowing what kind of models you have in mind. For linear regression, I have successfully used the biglm package in R.
null
CC BY-SA 2.5
null
2010-10-14T13:44:36.413
2010-10-14T13:44:36.413
null
null
439
null
3602
2
null
3589
0
null
Another way to solve such a problem is to impute the missing data for the shorter series using a time series model which may or may not make sense in a particular context. In your context, imputing the stock prices into the past would mean that you are asking the following counter-factual question: What would be the s...
null
CC BY-SA 2.5
null
2010-10-14T13:49:41.147
2010-10-14T13:49:41.147
null
null
null
null
3603
2
null
3599
1
null
Your problem is one of multi-collinear regressors (since B and C are correlated). I would suggest that you look at the answers to the question: [Dealing with correlated regressors](https://stats.stackexchange.com/q/3561/28). The following paper may also be relevant in your context: [Using principal components for esti...
null
CC BY-SA 2.5
null
2010-10-14T13:57:04.500
2010-10-14T13:57:04.500
2017-04-13T12:44:24.947
-1
null
null
3604
2
null
3592
4
null
I'll concentrate on your example question: does class 1 of the old classification scheme have a better or worse survival than class 1 of the updated classification scheme? We can form four mutually exclusive groups of patients: (a) Patients who weren't in class 1 under either scheme. Clearly, they don't help us answer ...
null
CC BY-SA 2.5
null
2010-10-14T13:58:37.590
2010-10-14T13:58:37.590
null
null
449
null
3605
2
null
3589
10
null
No amount of imputation, time series analysis, GARCH models, interpolation, extrapolation, or other fancy algorithms will do anything to create information where it does not exist (although they can create that illusion ;-). The history of Y's price before X went public is useless for assessing their subsequent correl...
null
CC BY-SA 2.5
null
2010-10-14T14:07:20.877
2010-10-14T14:07:20.877
null
null
919
null
3606
2
null
3599
2
null
You have clearly stated a part of your model: > C depends on B, in that values of B above a threshold will change C. The change in C will furthermore reduce B in the next measurement. By "next measurement" I understand you mean next in time. Let's index time as $t = 0, 1, 2, \ldots$. Then the dependence of C on B ...
null
CC BY-SA 2.5
null
2010-10-14T14:21:48.683
2010-10-14T14:21:48.683
null
null
919
null
3607
2
null
3599
2
null
Not easy at all. This starts to sound like the sort of thing that [Jamie Robins](http://en.wikipedia.org/wiki/James_Robins) and colleagues have done a lot of work on. To quote the start of the abstract of one of their papers: "In observational studies with exposures or treatments that vary over time, standard approache...
null
CC BY-SA 2.5
null
2010-10-14T14:23:57.400
2010-10-14T14:23:57.400
null
null
449
null
3609
1
null
null
4
2054
It seems to me that rather than using non robust estimation methods with robust standard errors it would be better to use robust estimation from the outset. I wonder what other people think.
Robust standard errors for panel data vs robust estimation for panel data
CC BY-SA 2.5
null
2010-10-14T17:57:07.050
2010-10-15T04:27:41.783
2010-10-14T17:59:07.143
930
1585
[ "robust", "panel-data" ]
3610
2
null
3595
3
null
We trained 3.5M observations and 44 features using 64-bit R on an EC2 instance with 32GB ram and 4 cores. We used random forests and it worked well. Note that we had to preprocess/manipulate the data before training.
null
CC BY-SA 2.5
null
2010-10-14T18:00:23.600
2010-10-14T18:00:23.600
null
null
616
null
3611
1
3612
null
9
5206
Does X (hazard) variable in Cox proportional hazard regression analysis always have to be time? If not, could you provide an example, please? Can age of cancer patient be a hazard variable? If so, can it be interpreted as the risk of getting cancer at a certain age? Would Cox regression be a legitimate analysis to stud...
Cox regression and time scale
CC BY-SA 3.0
null
2010-10-14T18:40:10.550
2014-05-30T12:56:22.647
2014-05-30T12:56:22.647
28740
1586
[ "regression", "survival", "hazard" ]
3612
2
null
3611
8
null
Usually, age at baseline is used as a covariate (because it is often associated to disease/death), but it can be used as your time scale as well (I think it is used in some longitudinal studies, because you need to have enough people at risk along the time scale, but I can't remember actually -- just found these slides...
null
CC BY-SA 2.5
null
2010-10-14T19:05:25.133
2010-10-14T19:05:25.133
null
null
930
null
3613
2
null
3611
7
null
No, it doesn't always have to be time. Many censored responses can be modeled with survival analysis techniques. In his book Nondetects and Data Analysis, Dennis Helsel advocates using the negative of a concentration in place of time (in order to cope with nondetects, which when negated become right-censored values)....
null
CC BY-SA 2.5
null
2010-10-14T19:10:51.673
2010-10-14T19:10:51.673
null
null
919
null
3614
1
null
null
27
48355
I want to calculate the probability distribution for the total of a combination of dice. I remember that the probability of is the number of combinations that total that number over the total number of combinations (assuming the dice have a uniform distribution). What are the formulas for - The number of combination...
How to easily determine the results distribution for multiple dice?
CC BY-SA 2.5
null
2010-10-14T19:23:39.887
2019-10-29T03:58:46.750
2010-10-14T22:40:19.860
null
1456
[ "probability", "dice" ]
3615
2
null
3614
5
null
Approximate Solution I explained the exact solution earlier (see below). I will now offer an approximate solution which may suit your needs better. Let: $X_i$ be the outcome of a roll of a $s$ faced dice where $i=1, ... n$. $S$ be the total of all $n$ dice. $\bar{X}$ be the sample average. By definition, we have: $\ba...
null
CC BY-SA 3.0
null
2010-10-14T19:58:44.760
2017-02-28T01:24:51.983
2017-02-28T01:24:51.983
805
null
null
3616
1
3617
null
16
44924
I have a simple time series with 5-10 data points per data set at regular intervals. I am wondering what is the best way to determine whether two data sets are different. Should i try t-tests on each data point, or look at the area under the curves or is there some kind of multivariate model that would work better?
What is the best statistical test for a time series?
CC BY-SA 2.5
null
2010-10-14T20:17:42.653
2010-11-05T14:54:01.720
2010-10-15T02:50:22.197
159
1327
[ "time-series", "statistical-significance" ]
3617
2
null
3616
12
null
You will need to specify precisely what you mean by "different". You will also need to specify what assumptions you are willing to make about the serial correlation structure within each time series. With t-tests, you are comparing the mean of each group and you are assuming that the groups consist of independent obse...
null
CC BY-SA 2.5
null
2010-10-14T21:14:33.157
2010-10-14T21:14:33.157
null
null
159
null
3618
2
null
3614
19
null
Exact solutions The number of combinations in $n$ throws is of course $6^n$. These calculations are most readily done using the probability generating function for one die, $$p(x) = x + x^2 + x^3 + x^4 + x^5 + x^6 = x \frac{1-x^6}{1-x}.$$ (Actually this is $6$ times the pgf--I'll take care of the factor of $6$ at the e...
null
CC BY-SA 4.0
null
2010-10-14T22:29:58.243
2019-10-29T03:58:46.750
2019-10-29T03:58:46.750
7250
919
null
3619
2
null
3595
7
null
There is the [RHIPE](http://www.rhipe.org/) package (R-Hadoop integration). It is can make it very easy (with exceptions) to analyze large amounts of data in R.
null
CC BY-SA 3.0
null
2010-10-15T01:03:14.220
2012-03-12T16:11:13.280
2012-03-12T16:11:13.280
6432
1307
null
3620
2
null
3609
2
null
I don't know if I understand you correctly, but still I will give it a shot. I think robust estimation from the outset would be better in most of the cases. Reason: If you estimation is not robust, outliers might severely affect your estimate. Still, in general, you will be far the true value. This may be also looked...
null
CC BY-SA 2.5
null
2010-10-15T01:22:06.443
2010-10-15T01:22:06.443
null
null
1307
null
3621
2
null
3611
4
null
On the age-scale vs. time-scale issue, chl has some good references and captures the essentials -- in particular, the requirement that the at-risk set contain sufficient subjects from all ages as would arise in a longitudinal study. I would only note that there is no general consensus around this yet, but there is so...
null
CC BY-SA 2.5
null
2010-10-15T02:06:12.473
2010-10-15T02:06:12.473
null
null
251
null
3622
2
null
3609
8
null
They're robust with respect to different things. If you use robust regression to obtain an estimate of fixed effect in panel data, then you're computing an estimate that's resistant to outliers. If you use robust standard errors for your OLS estimator, it's because you suspect that the assumption behind your error mode...
null
CC BY-SA 2.5
null
2010-10-15T02:40:18.180
2010-10-15T04:27:41.783
2010-10-15T04:27:41.783
251
251
null
3623
1
3626
null
3
421
I have a logistic regression (in SAS, for reference) with continuous and categorical predictors (with reference coding), and an interaction term between one of each type (assume for now that the categorical variable in question has three response levels, reference coded to $c_1$ and $c_2$): $logit(p) = a + (continuous ...
Plugging in mean values/proportions to a logistic regression with continuous-discrete interaction
CC BY-SA 2.5
null
2010-10-15T04:44:29.807
2010-10-15T08:27:19.977
2010-10-15T08:27:19.977
null
1144
[ "logistic", "categorical-data", "fitting" ]
3625
2
null
3614
7
null
There's a very neat way of computing the combinations or probabilities in a spreadsheet (such as excel) that computes the convolutions directly. I'll do it in terms of probabilities and illustrate it for six sided dice but you can do it for dice with any number of sides (including adding different ones). (btw it's als...
null
CC BY-SA 3.0
null
2010-10-15T06:19:31.640
2014-07-28T02:19:47.983
2014-07-28T02:19:47.983
805
805
null
3626
2
null
3623
3
null
Regardless of the interaction term, this procedure isn't going to estimate the average p, because logit is a nonlinear function so the mean of the logit isn't the same as the logit of the mean. If you want to calculate the expected proportion of positive outcomes in a sample, the easiest way is to calculated the predic...
null
CC BY-SA 2.5
null
2010-10-15T06:39:37.757
2010-10-15T06:39:37.757
null
null
449
null
3627
2
null
3623
4
null
The predicted grand average (see onestop's answer) may not be all that informative - after all, you are fitting a model to understand systematic deviations from it. You can predict your p for any setting of your predictors. Given that you are interested in the effects of the predictors, it would make sense to look at w...
null
CC BY-SA 2.5
null
2010-10-15T07:35:14.613
2010-10-15T07:35:14.613
null
null
1352
null
3628
1
3629
null
9
38461
From the output of a logistic regression in JMP, I read about two binary variables: ``` Var1 estimate -0.1007384 Var2 estimate 0.21528927 ``` and then ``` Odds ratio for Var1 lev1/lev2 1.2232078 reciprocal 0.8175225 Odds ratio for Var2 lev1/lev2 0.6501329 reciprocal 1.5381471 ``` Now I obtain `1.2232078` as `exp(2*0...
Relation between logistic regression coefficient and odds ratio in JMP
CC BY-SA 2.5
null
2010-10-15T10:48:41.760
2017-06-16T19:24:59.167
2010-10-15T14:42:37.287
930
1219
[ "logistic", "odds-ratio", "jmp" ]
3629
2
null
3628
15
null
Ok, I drop a quick response. Your idea is correct in that the regression coefficient is the log of the OR. More precisely, if $b$ is your regression coefficient, $\exp(b)$ is the odds ratio corresponding to a one unit change in your variable. So, to get back to the adjusted odds, you need to know what are the internal ...
null
CC BY-SA 2.5
null
2010-10-15T10:54:40.603
2010-10-15T11:08:31.683
2010-10-15T11:08:31.683
930
930
null
3630
1
null
null
5
435
I'm trying to evaluate a path dependent function, $f(r_t)$, on a [Cox-Ingersoll-Ross](https://en.wikipedia.org/wiki/Cox%E2%80%93Ingersoll%E2%80%93Ross_model) process: $$dr_t = \theta (\mu - r_t)dt + \sigma \sqrt r_t dW_t$$ by Monte Carlo simulation. Could anyone suggest and explain any effective variance reduction tech...
CIR Process-Variance reduction
CC BY-SA 3.0
null
2010-10-15T11:00:45.113
2016-12-09T08:31:15.880
2016-12-09T08:31:15.880
113090
1443
[ "r", "references", "markov-chain-montecarlo", "stochastic-processes", "methodology" ]
3631
2
null
3611
3
null
Per the OP's request, heres another application I have seen survival analysis used in a spatial context (although obviously different than measuring environmental substances [mentioned](https://stats.stackexchange.com/questions/3611/cox-regression-and-time-scale/3613#3613) by whuber) is modeling the distance between ev...
null
CC BY-SA 3.0
null
2010-10-15T12:01:27.760
2011-10-20T19:51:54.067
2017-04-13T12:44:33.237
-1
1036
null
3632
1
3665
null
2
260
Suppose we need to take an action on a population with income (x) more than $5,000. Income is not observed directly. Should we use logistic regression to estimate x, or should we use logistic regression to estimate the probability of x>5000 directly? (What are the drawbacks/advantage of the methods?) Edit: Yes - by log...
Should we regress x or use logistic regression on x>5000
CC BY-SA 2.5
null
2010-10-15T14:14:33.220
2010-10-17T04:02:18.357
2010-10-16T04:50:04.427
994
994
[ "regression", "logistic" ]
3633
2
null
3616
6
null
Maybe repeated measures anova is what you want. It allows you to compare the subjects (inter subject factors) while taking the correlated structure of the "time series" per subject (intra subject factor). It is an easy but dated method and can be found in the context of "general linear models", it needs some additional...
null
CC BY-SA 2.5
null
2010-10-15T15:08:03.417
2010-10-15T15:08:03.417
null
null
1573
null
3634
1
null
null
9
6300
I have to analyze a factorial design with five factors (one of them nested in another one) and numeric responses. I would like to perform a nonparametric ANOVA, but of course I can't use neither Kruskall Wallis nor Friedman test (I have replicated measures). Is there a command or a code in R that could help me? Thank y...
Multi-way nonparametric anova
CC BY-SA 2.5
null
2010-10-15T15:42:56.067
2011-03-31T16:14:14.503
2010-10-15T16:41:33.940
null
null
[ "r", "anova", "nonparametric" ]
3635
2
null
3419
4
null
I might be misunderstanding your goals here, but to me it sounds like a [multi-dimensional scaling](http://en.wikipedia.org/wiki/Multidimensional_scaling) (MDS) problem. I've never used MDS myself, but my sense is that it should allow you to derive a global measure of similarity as well as dimensional measures of simi...
null
CC BY-SA 3.0
null
2010-10-15T15:50:12.507
2017-11-16T13:21:24.017
2017-11-16T13:21:24.017
196
196
null
3636
1
null
null
1
2763
I have a sample set of values that were taken over a period of time. However, the delta time between each sample is different. Do I need to account for the different time deltas in the std-dev? Is std-dev even appropriate for this kind of data? --- More info... The data are temperature samples. The time range is fro...
How to calculate the standard deviation on a sample set with irregular time periods
CC BY-SA 2.5
0
2010-10-15T15:53:01.893
2019-07-21T11:38:26.037
2019-07-21T11:38:26.037
11887
1595
[ "standard-deviation", "unevenly-spaced-time-series" ]
3637
2
null
3636
2
null
Yes, you do need to account for the irregularity of the time series because volatility scales with time. Depending upon the distribution and independence assumptions, [sometimes a "square root of time" rule can be appropriate](http://ideas.repec.org/p/fmg/fmgdps/dp439.html). Is this data sampled irregularly intraday...
null
CC BY-SA 2.5
null
2010-10-15T16:02:52.387
2010-10-15T16:02:52.387
null
null
5
null
3638
2
null
3634
4
null
Tukey's Median Polish is implemented in R as medpolish {stats}. See Chapter 6 in [Venables and Ripley](http://www.stats.ox.ac.uk/pub/MASS4/VR4stat.pdf)
null
CC BY-SA 2.5
null
2010-10-15T16:27:19.637
2011-03-31T16:14:14.503
2011-03-31T16:14:14.503
919
919
null
3639
2
null
3383
2
null
The one-way ANOVA approach you mention sounds fine to me. Sure the individual change scores aren't going to be the "true change" by any means, but they are better than nothing. If anything the resulting variance in the model should be over estimated as a consequence of this procedure. In R the easiest way to do ANO...
null
CC BY-SA 2.5
null
2010-10-15T16:34:25.457
2010-10-15T16:34:25.457
null
null
196
null
3640
1
3644
null
12
8016
Problem: I am parameterizing distributions for use as a priors and data in a Bayesian meta-analysis. The data are provided in the literature as summary statistics, almost exclusively assumed to be normally distributed (although none of the variables can be < 0, some are ratios, some are mass, and etc.). I have come ac...
How to parameterize the ratio of two normally distributed variables, or the inverse of one?
CC BY-SA 2.5
null
2010-10-15T16:45:49.320
2010-10-15T19:45:31.940
2010-10-15T19:28:25.393
1381
1381
[ "distributions", "bayesian", "variance", "random-variable", "meta-analysis" ]
3641
1
null
null
4
216
I would like to project the data in this graph for at least 4 or 5 periods. Unfortunately, that won't be possible with a moving average. A regression will result in negative values after the 3rd period. What are my forecasting options? Basically, what i'm trying to do, is predict where the boomer hump is gonna be based...
Forecasting Age distribution
CC BY-SA 2.5
null
2010-10-15T16:50:38.817
2010-10-15T19:43:31.437
2010-10-15T17:25:32.207
59
59
[ "time-series", "forecasting" ]
3642
2
null
3634
1
null
You might check out the ezBoot() function in the ez package for bootstrapping confidence intervals on your effects of interest.
null
CC BY-SA 2.5
null
2010-10-15T16:52:13.963
2010-10-15T16:52:13.963
null
null
364
null
3643
2
null
3640
0
null
Could you not assume that $y^{-1} \sim N(.,.)$ for the inverse of a normal random variable and do the necessary bayesian computation after identifying the appropriate parameters for the normal distribution. My suggestion below to use the Cauchy does not work as pointed out in the comments by ars and John. The ratio of ...
null
CC BY-SA 2.5
null
2010-10-15T17:05:22.430
2010-10-15T18:42:03.223
2010-10-15T18:42:03.223
null
null
null
3644
2
null
3640
6
null
You might want to look at some of the references under the Wikipedia article on [Ratio Distribution](http://en.wikipedia.org/wiki/Ratio_distribution). It's possible you'll find better approximations or distributions to use. Otherwise, your approach seems sound. Update I think a better reference might be: - Ratios of...
null
CC BY-SA 2.5
null
2010-10-15T17:17:18.427
2010-10-15T19:45:31.940
2010-10-15T19:45:31.940
251
251
null
3645
2
null
3634
4
null
The [vegan](http://cc.oulu.fi/~jarioksa/softhelp/vegan.html) package implements permutation testing for distance based ANOVA, which should work with multi-way, repeated measures data.
null
CC BY-SA 2.5
null
2010-10-15T17:43:27.083
2010-10-15T17:43:27.083
null
null
251
null
3646
1
3648
null
2
536
I have a univariate data set that's approximately normally distributed. I am happy to assume that the population is normally distributed, and I'd like to estimate the mean and variance of the population. My textbook suggests (as I understand it) that since my sample size is large (1000's of data points), it is reasonab...
Simple Estimates vs Model for calculating mean and variance of population
CC BY-SA 2.5
null
2010-10-15T19:27:02.353
2010-10-15T20:20:29.600
null
null
1598
[ "normal-distribution" ]
3647
2
null
3641
6
null
For demographic forecasting of any quality whatsoever you need to account for birth and death rates and, if possible, migration, breaking them down by gender (at a minimum) and, if possible, by race. These rates have all changed substantially during your time period and are likely to continue changing in the future. ...
null
CC BY-SA 2.5
null
2010-10-15T19:43:31.437
2010-10-15T19:43:31.437
null
null
919
null
3648
2
null
3646
7
null
If I understand your question, and you mean using a least squares model of the form $Y=\beta + \epsilon$ where $\epsilon\sim N(0,\sigma^2)$ these two approaches are equivalent. A simple R example will demonstrate this: ``` #generate pseudo-data set.seed(0) n <- 1000 x <- rnorm(n) # approach 1: calculation sum(x)/...
null
CC BY-SA 2.5
null
2010-10-15T19:48:34.417
2010-10-15T20:20:29.600
2010-10-15T20:20:29.600
1381
1381
null
3649
2
null
3646
3
null
I was about to make the same point as David, except illustrating using Stata rather than R: . summarize length Variable | Obs Mean Std. Dev. Min Max -------------+-------------------------------------------------------- length | 74 187.9324 22.26634 142 ...
null
CC BY-SA 2.5
null
2010-10-15T19:58:01.210
2010-10-15T19:58:01.210
null
null
449
null
3650
1
3658
null
5
802
I have a two part question; First Part: I have an urn with 20 balls, 2 of those balls are purple, and I pull out 6 balls at random. I witness 100 realizations of this process. Given the observed frequency at which I drew purple balls, how do I determine if I am really pulling balls out at random? Also given that there...
Expected distribution of random draws
CC BY-SA 2.5
null
2010-10-15T20:17:13.240
2010-10-22T16:38:05.127
2017-04-13T12:44:33.310
-1
1036
[ "distributions", "probability" ]
3651
2
null
3650
2
null
First Part: The draws from the urn follow a [hypergeometric distribution](http://en.wikipedia.org/wiki/Hypergeometric_distribution) assuming random draws. Any deviation from the theoretical probabilities vis-a-vis the observed frequencies can be evaluated using chi-square tests. Second Part: Let: $n \sim U(20,30)$ be ...
null
CC BY-SA 2.5
null
2010-10-15T20:23:22.837
2010-10-16T00:13:23.233
2010-10-16T00:13:23.233
null
null
null
3652
1
null
null
20
21738
Suppose one has two independent samples from the same population, and different methods were used on the two samples to derive point estimate and confidence intervals. In trivial cases a sensible person would just pool the two samples and use one method to do the analysis, but let's suppose for the moment that differen...
Combining two confidence intervals/point estimates
CC BY-SA 2.5
null
2010-10-15T20:24:37.687
2015-01-09T15:52:22.550
2010-10-15T23:18:35.950
449
1600
[ "confidence-interval", "meta-analysis" ]
3653
1
3657
null
15
9699
I have a multivariate regression, which includes interactions. For example, to get the estimate of the treatment effect for the poorest quintile I need to add the coefficients from the treatment regressor to the coefficient from the interaction variable (which interacts treatment and quintile 1). When adding two coeffi...
Adding coefficients to obtain interaction effects - what to do with SEs?
CC BY-SA 2.5
null
2010-10-15T20:30:05.690
2012-01-24T17:10:44.107
2010-10-15T20:31:52.317
930
834
[ "regression", "standard-deviation", "standard-error" ]
3654
2
null
3652
1
null
This is not unlike a stratified sample. So, pooling the samples for a point estimate and standard error seems like a reasonable approach. The two samples would be weighted by sample proportion.
null
CC BY-SA 2.5
null
2010-10-15T20:32:35.200
2010-10-15T20:32:35.200
null
null
485
null
3655
2
null
3652
8
null
You could do a pooled estimate as follows. You can then use the pooled estimates to generate a combined confidence interval. Specifically, let: $\bar{x_1} \sim N(\mu,\frac{\sigma^2}{n_1})$ $\bar{x_2} \sim N(\mu,\frac{\sigma^2}{n_2})$ Using the confidence intervals for the two cases, you can re-construct the standard er...
null
CC BY-SA 3.0
null
2010-10-15T20:33:13.343
2015-01-09T15:52:22.550
2015-01-09T15:52:22.550
-1
null
null
3657
2
null
3653
10
null
I think this the expression for $SE_{b_{new}}$: $$\sqrt{SE_1^2 + SE_2^2+2Cov(b_1,b_2)}$$ You can work with this new standard error to find your new test statistic for testing $H_o: \beta=0$
null
CC BY-SA 2.5
null
2010-10-15T20:44:47.467
2010-10-15T22:09:51.290
2010-10-15T22:09:51.290
1307
1307
null
3658
2
null
3650
3
null
The expected frequency of observing $k$ purple balls in $d$ draws (without replacement) from an urn of $p$ purple balls and $n-p$ other balls is obtained by counting and equals $$\frac{{p \choose k} {n-p \choose d-k} }{{n \choose d}}.$$ Test a sample (of say $100$) such experiments with a chi-squared statistic using th...
null
CC BY-SA 2.5
null
2010-10-15T22:00:06.187
2010-10-18T18:21:25.497
2010-10-18T18:21:25.497
919
919
null
3659
2
null
3652
4
null
Sounds a lot like [meta-analysis](http://en.wikipedia.org/wiki/Meta-analysis) to me. Your assumption that the samples are from the same population means you can use fixed-effect meta-analysis (rather than random-effects meta-analysis). The generic inverse-variance method takes a set of independent estimates and their v...
null
CC BY-SA 2.5
null
2010-10-15T23:18:18.057
2010-10-15T23:18:18.057
null
null
449
null
3660
2
null
3595
8
null
Most of the algorithms on [Apache Mahout](http://mahout.apache.org/) scale way beyond 20M records, even with high-dimensional data. If you only need to build a prediction model, there are specific tools like Vowpal Wabbit (http://hunch.net/~vw/) that can easily scale to billions of records on a single machine.
null
CC BY-SA 2.5
null
2010-10-16T01:09:31.757
2010-10-16T01:09:31.757
null
null
635
null
3661
1
null
null
6
2904
I have 3 observers that each take 2 measurements (length and weight) on 100 individuals; these procedures are repeated once (i.e., the same measurements are taken on the same 100 individuals by the same 3 observers), so that the data set is duplicated (i.e., early reading and late reading). - What is the best way to ...
Repeatability and measurement error from and between observers
CC BY-SA 2.5
null
2010-10-16T01:44:55.913
2010-10-18T07:17:51.227
2010-10-16T08:43:26.653
null
1603
[ "anova", "error", "measurement", "reliability", "agreement-statistics" ]
3663
2
null
3661
8
null
What you describe is a reliability study where each subject is going to be assessed by the same three raters on two occasions. Analysis can be done separately on the two outcomes (length and weight, though I assume they will be highly correlated and you're not interested in how this correlation is reflected in raters' ...
null
CC BY-SA 2.5
null
2010-10-16T08:43:54.767
2010-10-18T07:17:51.227
2017-04-13T12:44:52.277
-1
930
null
3664
2
null
3661
3
null
You need to repeat the same process separately for length and weight, as these are completely separate outcomes with different units and methods of measurement. I'd start, as so often, by plotting some exploratory graphs. In this case a set of [Bland–Altman](http://en.wikipedia.org/wiki/Bland-Altman_plot) (diffference ...
null
CC BY-SA 2.5
null
2010-10-16T08:50:42.457
2010-10-16T08:50:42.457
null
null
449
null
3665
2
null
3632
4
null
If your only interest is whether their income is over $\$$5,000 or not, and it doesn't make a difference how far from that threshold their income actually is, then I would recommend using a classification technique (not necessarily logistic regression, try a range of methods and use whatever gives best out-of-sample pe...
null
CC BY-SA 2.5
null
2010-10-16T14:58:21.727
2010-10-16T15:08:36.650
2010-10-16T15:08:36.650
919
887
null
3666
2
null
2730
10
null
[Applied Linear Statistical Models](http://rads.stackoverflow.com/amzn/click/0256117365) by Neter, Kutner, Wasserman, and Nachtscheim, has a very exhaustive (and exhausting!) treatment of ANOVA and ANCOVA. It also covers power analysis, linear regression, multilinear regression, and introduces some MANOVA. It's a very ...
null
CC BY-SA 2.5
null
2010-10-16T15:47:52.163
2010-10-16T15:47:52.163
null
null
1118
null
3667
2
null
1015
5
null
Maybe I misunderstood the question, but what you are describing sounds like a test-retest reliability study on your Q scores. You have a series of experts each going to assess a number of items or questions, at two occasions (presumably fixed in time). So, basically you can assess the temporal stability of the judgment...
null
CC BY-SA 2.5
null
2010-10-16T18:41:49.013
2010-11-01T16:32:27.973
2017-04-13T12:44:37.420
-1
930
null
3668
2
null
3632
3
null
What are you trying to predict? Is your outcome just an indicator of whether income is above 5000 dollars or not? If so, that is the best that you can predict; that is, you can't predict anyone's income, only whether he has high (above 5000) income or not. If this is your outcome and what you'd like to predict, the que...
null
CC BY-SA 2.5
null
2010-10-17T04:02:18.357
2010-10-17T04:02:18.357
null
null
401
null
3669
2
null
3653
2
null
To be more general, if you create a (row) vector for the estimate that you care about $R$ such that your estimator is equal to $R\beta$, then the variance of that estimator is $R\hat{V}R^\prime$, where $\hat{V}$ is the estimated variance-covariance matrix of your regression. Your estimate is distributed Normal or t, de...
null
CC BY-SA 2.5
null
2010-10-17T04:09:30.837
2010-10-17T04:24:19.630
2010-10-17T04:24:19.630
401
401
null
3670
2
null
3542
11
null
You might check out the documentation for the LaTeX package [booktabs](http://www.ctan.org/tex-archive/macros/latex/contrib/booktabs/booktabs.pdf); it gives general guidance and implements its design suggestions in LaTeX tables.
null
CC BY-SA 2.5
null
2010-10-17T04:16:04.893
2010-10-17T04:16:04.893
null
null
401
null
3671
2
null
3542
6
null
I hope this answer is not too off topic, but a couple of days ago I have seen this link on visualizing tables at StackExchange: [Visual Representation of Tabular Information – How to Fix the Uncommunicative Table](http://flowingdata.com/2009/04/21/visual-representation-of-tabular-information-how-to-fix-the-uncommunicat...
null
CC BY-SA 2.5
null
2010-10-17T07:36:38.073
2010-10-17T07:36:38.073
null
null
1607
null
3672
1
3674
null
7
591
Could anyone suggest some statistical measures to describe the distribution of a dendrogram? If I have two dendrograms, how could can I quantify their structural differences?
A measure to describe the distribution of a dendrogram
CC BY-SA 2.5
null
2010-10-17T11:24:28.837
2010-10-18T08:07:08.010
2010-10-18T08:07:08.010
449
1250
[ "distributions", "time-series", "clustering", "dendrogram" ]
3673
2
null
3419
7
null
You asked a difficult question, but I'm a little bit surprised that the various clues that were suggested to you received so little attention. I upvoted all of them because I think they basically are useful responses, though in their actual form they call for further bibliographic work. Disclaimer: I never had to deal ...
null
CC BY-SA 2.5
null
2010-10-17T12:06:38.520
2010-10-17T19:06:12.167
2010-10-17T19:06:12.167
930
930
null
3674
2
null
3672
5
null
See this SO question: [https://stackoverflow.com/questions/2218395/how-do-you-compare-the-similarity-between-two-dendrograms-in-r](https://stackoverflow.com/questions/2218395/how-do-you-compare-the-similarity-between-two-dendrograms-in-r)
null
CC BY-SA 2.5
null
2010-10-17T14:37:56.007
2010-10-17T14:37:56.007
2017-05-23T12:39:26.150
-1
null
null
3675
2
null
3307
3
null
I agree with @ars that you are unlikely to get one answer for this (you may also have more success on [http://mathoverflow.net](http://mathoverflow.net), since our community tends to be more applied, while this technique would have very little real-world usage). The Abrahao/Barbosa paper is a good reference. Just to ...
null
CC BY-SA 2.5
null
2010-10-17T15:45:28.087
2010-10-17T15:59:56.937
2010-10-17T15:59:56.937
5
5
null
3676
1
null
null
5
896
Background: I'm a junior researcher at an institute dealing with regional issues, particularly involving drug policy. Almost two years ago, one of our senior researchers began collecting arrest data about a nearby large city. He had been transcribing newspaper police blotter by hand until I joined a year and change ago...
"Multiple response" analysis of arrest records
CC BY-SA 2.5
null
2010-10-17T16:13:28.657
2017-02-01T23:42:59.623
null
null
1609
[ "dataset", "spss" ]
3677
2
null
633
4
null
[Ingo Ruczinski](http://biostat.jhsph.edu/~iruczins/) has contributed to promote the use of [Logic regression](http://kooperberg.fhcrc.org/logic/documents/intro.html) for data set consisting of binary variables, with an emphasis on higher-order interaction terms. The main advantage compared to usual or penalized GLMs i...
null
CC BY-SA 2.5
null
2010-10-17T18:21:12.987
2010-11-02T18:47:07.033
2010-11-02T18:47:07.033
930
930
null
3678
2
null
3676
4
null
I can't particularly comment on how to handle multiple response categories, but you need to further refine your question for people on this forum to be able to give useful advice. You mention various interests, such as some sort of drug policy intervention, and differential charges according to race, arrest location, a...
null
CC BY-SA 2.5
null
2010-10-17T18:37:01.210
2010-10-17T19:27:17.977
2010-10-17T19:27:17.977
1036
1036
null
3679
2
null
3676
2
null
It is not clear what you questions you are trying to answer but here are are several ways to deal with the multiple-response data: - Arresting Officer Convert the two columns into a single count variable (1 or 2) which indicates the no of arresting officers. You will lose the arresting officer's identities but perhaps...
null
CC BY-SA 2.5
null
2010-10-17T18:41:41.327
2010-10-17T18:41:41.327
2020-06-11T14:32:37.003
-1
null
null
3680
2
null
1621
5
null
There was a read paper last week at the Royal Statistical Society on MCMC techniques over Riemann manifolds, primarily using the Fisher information metric: [http://www.rss.org.uk/main.asp?page=1836#Oct_13_2010_Meeting](http://www.rss.org.uk/main.asp?page=1836#Oct_13_2010_Meeting) The results seem promising, though as ...
null
CC BY-SA 2.5
null
2010-10-17T20:07:00.620
2010-10-17T20:12:38.687
2010-10-17T20:12:38.687
495
495
null
3681
2
null
3676
2
null
I've examined associations between multiple response categorical variables in the past basically following the log-linear approach for marginal data outlined in the following: - Strategies for Modeling Two Categorical Variables with Multiple Category Choices (Bilder, Loughlin, 2003) Your case may be more complicated...
null
CC BY-SA 3.0
null
2010-10-17T20:10:30.190
2017-02-01T23:42:59.623
2017-02-01T23:42:59.623
11887
251
null
3682
1
3683
null
10
505
What is the meaning of $\|a\|_p=\left(\sum _{i=1}^n \left|a_i(t)\right|{}^p\right){}^{\frac{1}{p}}$? This formula is called out on the fifth page of An Improved Data Stream Summary: The Count-Min Sketch and its Applications (which can be found [here](http://www.madalgo.au.dk/img/SumSchoo2007_Lecture%20slides/Bibliograp...
What is the meaning of $\|a\|_p=\left(\sum _{i=1}^n \left|a_i(t)\right|{}^p\right){}^{\frac{1}{p}}$?
CC BY-SA 2.5
null
2010-10-17T20:29:40.313
2020-04-05T00:05:45.660
2020-04-05T00:05:45.660
11887
1515
[ "descriptive-statistics", "notation" ]
3683
2
null
3682
11
null
It's the $L^p$ norm. See for example the Wikipedia articles: - $L^p$ space - Minkowski distance If you use $p = 2$, you'll find it resolves to the more familiar Euclidean norm -- i.e. the most familiar measure used as length of the vector $a$. Other values of p give others ways of measuring length as outlined in ...
null
CC BY-SA 2.5
null
2010-10-17T20:36:56.287
2010-10-17T20:42:02.297
2010-10-17T20:42:02.297
251
251
null
3684
2
null
3614
5
null
[Characteristic functions](http://en.wikipedia.org/wiki/Characteristic_function_%28probability_theory%29) can make computations involving the sums and differences of [random variables](http://en.wikipedia.org/wiki/Random_variable) really easy. [Mathematica](http://www.wolfram.com/) has lots of functions to work with st...
null
CC BY-SA 2.5
null
2010-10-17T20:44:19.483
2010-10-17T20:44:19.483
null
null
null
null
3685
1
3692
null
76
97745
Hierarchical clustering can be represented by a dendrogram. Cutting a dendrogram at a certain level gives a set of clusters. Cutting at another level gives another set of clusters. How would you pick where to cut the dendrogram? Is there something we could consider an optimal point? If I look at a dendrogram across tim...
Where to cut a dendrogram?
CC BY-SA 2.5
null
2010-10-17T21:57:55.460
2020-03-28T07:00:29.263
2010-10-17T22:01:28.690
930
1250
[ "clustering", "dendrogram" ]
3686
2
null
3685
6
null
Perhaps one of the simplest methods would be a graphical representation in which the x-axis is the number of groups and the y-axis any evaluation metric as the distance or the similarity. In that plot you usually can observe two differentiated regions, being the x-axis value at the 'knee' of the line the 'optimal' numb...
null
CC BY-SA 2.5
null
2010-10-17T22:30:44.930
2010-10-18T06:13:33.683
2010-10-18T06:13:33.683
221
221
null
3687
2
null
3682
6
null
This paper does not appear to use $L^p$ norms in any essential way--every one of the results references the $L^1$ norm explicitly. The problem itself determines which norm to use. In this case interest focuses on the cardinality of multisets. A multiset is represented as a vector of counts of its elements, whence it...
null
CC BY-SA 2.5
null
2010-10-18T00:16:28.227
2010-10-18T00:16:28.227
null
null
919
null
3688
2
null
3595
3
null
SAS Enterprise Miner version 6.2 would have no problem handling 20 million observations, and a variety of models which can be adapted to your situation. The issue with SAS is usually the cost however. Here's a summary of what SAS EM can do: [SAS EM 6.2: What's New ](http://support.sas.com/documentation/cdl/en/whatsnew/...
null
CC BY-SA 2.5
null
2010-10-18T03:05:26.233
2010-10-18T03:12:18.987
2010-10-18T03:12:18.987
null
null
null
3689
1
3690
null
6
268
I'm interested in exploring statistical models (or modifications thereof) designed to handle a specific type of problem. Due to my ignorance of statistical terminology, I can only describe this type of problem by (contrived) examples: Suppose we're interested in estimating the likelihood that a given cell phone custome...
Coefficient / model averaging to control for exogenous circumstances in prediction
CC BY-SA 3.0
null
2010-10-18T03:08:15.450
2011-08-08T02:26:47.610
2011-08-08T02:26:47.610
919
1611
[ "time-series", "logistic", "classification", "forecasting" ]
3690
2
null
3689
5
null
I am not sure you need any special tricks as long as the relevant factors are captured by the model. To keep things simple I will discuss the issue in the context of linear regression. The same intuition carries over to the time series setting. Suppose, that you want to predict the monthly sales of cell phones for bran...
null
CC BY-SA 2.5
null
2010-10-18T03:53:26.107
2010-10-18T14:21:03.917
2010-10-18T14:21:03.917
null
null
null
3691
2
null
3685
12
null
There isn't really an answer. It's somewhere between 1 and N. However, you can think about it from a profit perspective. For example, in marketing one uses segmentation, which is much like clustering. A message (an advertisement or letter, say) that is tailored for each individual will have the highest response rate. ...
null
CC BY-SA 3.0
null
2010-10-18T04:49:46.067
2011-12-24T20:01:26.503
2011-12-24T20:01:26.503
74
74
null
3692
2
null
3685
58
null
There is no definitive answer since cluster analysis is essentially an exploratory approach; the interpretation of the resulting hierarchical structure is context-dependent and often several solutions are equally good from a theoretical point of view. Several clues were given in a related question, [What stop-criteria ...
null
CC BY-SA 3.0
null
2010-10-18T05:56:44.473
2013-12-05T19:21:11.280
2017-04-13T12:44:28.813
-1
930
null
3694
2
null
3614
4
null
Here's another way to calculate the probability distribution of the sum of two dice by hand using convolutions. To keep the example really simple, we're going to calculate the probability distribution of the sum of a three-sided die (d3) whose random variable we will call X and a two-sided die (d2) whose random variabl...
null
CC BY-SA 2.5
null
2010-10-18T07:19:52.593
2010-10-18T07:19:52.593
null
null
null
null
3695
1
3697
null
15
25795
When plotting a boxplot with python matplotblib, the lines halfway the plot is the median of the distribution. Is there a possibility to instead have the line at the average. Or to plot it next to it in a different style. Also, because it is common for the line to be the median, will it really confuse my readers if I m...
Show average instead of median in boxplot
CC BY-SA 2.5
null
2010-10-18T07:51:12.160
2010-10-18T12:02:05.757
2010-10-18T12:02:05.757
8
190
[ "data-visualization", "python", "matplotlib", "boxplot" ]
3696
2
null
3695
20
null
To answer your second question: Yes, I think it will be confusing to put the line at the mean instead of the median. The precise rules controlling the length of the 'whiskers' (if any) and treatment of outliers vary, but everyone keeps to Tukey's use of the box as displaying the median and lower and upper quartiles. Fo...
null
CC BY-SA 2.5
null
2010-10-18T08:05:49.140
2010-10-18T08:28:14.397
2010-10-18T08:28:14.397
449
449
null
3697
2
null
3695
26
null
This code makes the boxplots then places a circle marking the mean for each box. You can use a different symbol by specifying the [marker](http://matplotlib.sourceforge.net/api/pyplot_api.html?highlight=scatter#matplotlib.pyplot.scatter) argument in the call to `scatter`. ``` import numpy as np import pylab # 3 boxes...
null
CC BY-SA 2.5
null
2010-10-18T08:40:10.110
2010-10-18T08:40:10.110
null
null
251
null
3698
1
3770
null
2
1002
I am trying to understand a published analysis. This is the data of interest: D1>0 D1<0 D2>0 7 2 9 D2<0 9 15 24 total 16 17 33 The author notes that 17/33 is 51.5% and states: > "we expect about 50% of the D1's to be negative, and that is what we actually observe here (z=.08,...
Understanding published data: z-ratio for proportions
CC BY-SA 2.5
null
2010-10-18T09:08:51.310
2010-10-28T10:40:02.167
2010-10-28T10:40:02.167
null
1614
[ "contingency-tables" ]
3700
2
null
3636
0
null
Based on Shane's answer I entered some data into Excel. What I came up with is that I need to multiple the square of the different from the mean by the number of seconds until the next sample. This assumes the reading was steady just until the next reading.
null
CC BY-SA 2.5
null
2010-10-18T12:24:04.177
2010-10-18T12:24:04.177
null
null
1595
null
3701
2
null
3698
2
null
I'm not sure the discrepancy is worth worrying about. The exact p-value is clearly 1 for a 2-sided test of p=0.5 given 17 positive responses out of 33, as there's no integer closer to 33/2 than 17. With small or moderate N as here there's no good reason for not doing the exact test (even without a PC, as the cdf of the...
null
CC BY-SA 2.5
null
2010-10-18T12:27:47.530
2010-10-18T12:27:47.530
null
null
449
null
3702
1
null
null
1
1132
I am newbee and i am trying with functional data analysis. I have a 8x11 matrix data, how can i input into R as an object in this form: ``` $hgtm boy01 boy02 boy03 boy04 boy05 1 81.3 76.2 76.8 74.1 74.2 1.25 84.2 80.4 79.8 78.4 76.3 1.5 86.4 83.2 82.6 82.6 78.3 1.75 88.9 85.4 84.7 85.4 ...
Data manipulation in R for functional data analysis
CC BY-SA 2.5
null
2010-10-18T13:48:33.180
2019-12-03T03:17:04.480
2019-12-03T03:17:04.480
11887
1615
[ "r", "panel-data", "functional-data-analysis" ]
3703
2
null
3702
3
null
It looks like you want to use a named list, since each object is of different dimensions above. Here is an example with some dummy data: ``` hgtm <- matrix(1:100, ncol=5) hgtf <- matrix(1:100, ncol=5) age <- 1:10 namvan <- list(hgtm=hgtm, hgtf=hgtf, age=age) ``` Now you can reference each object by name: ``` > str(na...
null
CC BY-SA 2.5
null
2010-10-18T13:56:05.490
2010-10-18T13:56:05.490
null
null
5
null
3704
1
3712
null
3
5393
I posted this question earlier and am rewriting it in hopes of getting some guidance. I am using a weighted regression (after propensity score matching) to obtain estimates of the effects of a treatment (treat) on an outcome for different income quintiles. I include interactions of the quintiles and the treatment in th...
Adding coefficients to obtain interaction effects - can I add standard errors?
CC BY-SA 2.5
null
2010-10-18T14:21:06.687
2010-10-18T22:08:54.650
2010-10-18T17:48:59.000
449
834
[ "regression", "standard-error", "multivariate-analysis", "stata" ]
3705
2
null
3702
4
null
As to how you would get the data into R and into one of these formats, we'd need to know more about what your input file looks like and the format that it is in. However, here are some general tips on formatting the type of data that you have for analysis in any system. Singer (Applied Longitudinal Data Analysis) sugg...
null
CC BY-SA 2.5
null
2010-10-18T14:59:44.807
2010-10-18T18:24:25.100
2010-10-18T18:24:25.100
485
485
null
3706
2
null
3704
-1
null
I am quite sure it's fine to just add the standard errors on the two coefficients together. I can then obtain the t-stats by dividing the sum of the coefficients by the sum of the standard errors. If anyone disagrees please let me know.
null
CC BY-SA 2.5
null
2010-10-18T15:09:48.413
2010-10-18T15:09:48.413
null
null
834
null