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
8685
2
null
7897
3
null
Unless identification of the most relevant variables is a key aim of the analysis, it is often better not to do any feature selection at all and use regularisation to prevent over-fitting. Feature selection is a tricky procedure and it is all too easy to over-fit the feature selection criterion as there are many degre...
null
CC BY-SA 2.5
null
2011-03-23T18:01:20.987
2011-03-23T18:01:20.987
null
null
887
null
8687
2
null
8677
7
null
Do you know the [qgraph](http://sites.google.com/site/qgraphproject/) project (and the related [R package](http://cran.r-project.org/web/packages/qgraph/index.html))? It aims at providing various displays for psychometric models, especially those relying on correlations. I discovered this approach for displaying correl...
null
CC BY-SA 2.5
null
2011-03-23T18:32:52.837
2011-03-23T18:32:52.837
null
null
930
null
8689
1
8713
null
19
12650
In R, if I write ``` lm(a ~ b + c + b*c) ``` would this still be a linear regression? How to do other kinds of regression in R? I would appreciate any recommendation for textbooks or tutorials?
What does linear stand for in linear regression?
CC BY-SA 2.5
null
2011-03-23T19:48:25.340
2021-04-15T23:35:10.463
2021-01-11T22:33:33.700
11887
3870
[ "r", "regression", "interaction", "intuition" ]
8690
1
8760
null
7
392
Suppose I wanted to fit a model of the form $$y_i = \beta_0 + \sum_{1 \le j \le k} \beta_j X_{i,j} + \gamma_i Z_i + \epsilon_i,$$ to some data, where the regressors $X$ and $Z$, and the regressand $y$ are observed, and where $\gamma_i$ is a Bernoulli random variable that equals one with (unknown) probability $p$ and is...
Linear model with random coefficient
CC BY-SA 2.5
null
2011-03-23T20:11:04.610
2011-03-28T12:08:49.257
2011-03-25T10:59:58.783
null
795
[ "regression" ]
8691
1
null
null
7
475
I'm comparing scores for two small groups of individuals that competed in a tournament, and I'm being told that the comparison calls for a Mann-Whitney U test. It feels wrong to me, though: my two sets of scores are fundamentally interdependent because the two groups competed against one another. Briefly: I have two gr...
Statistical analysis of competition data
CC BY-SA 2.5
null
2011-03-23T20:14:56.090
2011-03-24T10:34:54.860
null
null
null
[ "hypothesis-testing", "nonparametric" ]
8692
1
8697
null
4
12695
I want to transpose a data frame in R with `unstack`. Consider the two data frames, `a` and `b`: ``` > a count state 1 199665 RSTO 2 4147 RSTR 3 31274 S1 4 1 S2 5 2522 S3 6 118009 SF > b count state 1 31956 RSTO 2 11689 RSTR 3 6702 S1 4 2838 S2 5 6268 S3 6 672561 SF `...
Transposing data frames in R via unstack
CC BY-SA 2.5
null
2011-03-23T20:16:06.923
2017-04-23T09:34:18.440
null
null
1537
[ "r", "data-transformation" ]
8693
2
null
8689
4
null
I would be careful in asking this as an "R linear regression" question versus a "linear regression" question. Formulas in R have rules that you may or may not be aware of. For example: [http://wiener.math.csi.cuny.edu/st/stRmanual/ModelFormula.html](http://wiener.math.csi.cuny.edu/st/stRmanual/ModelFormula.html) Ass...
null
CC BY-SA 2.5
null
2011-03-23T20:23:54.697
2011-03-23T21:48:53.517
2011-03-23T21:48:53.517
2775
2775
null
8694
2
null
8691
6
null
Yes. This situation is so complicated and the results are so interdependent that the applicability of almost any standard test has to be called into question. Why not conduct a [permutation test](http://en.wikipedia.org/wiki/Resampling_%28statistics%29#Permutation_tests)? This is a natural situation for it: the null ...
null
CC BY-SA 2.5
null
2011-03-23T20:54:36.260
2011-03-23T21:19:11.903
2011-03-23T21:19:11.903
919
919
null
8695
1
null
null
2
62377
I have some issues with an exploratory factor analysis. Can anybody please tell me how to calculate the Average Variance Extracted (AVE) and the Composite Reliability from two factors, each with three items using SPSS? If not with SPSS, Stata might help too.
AVE & composite reliability with SPSS
CC BY-SA 3.0
null
2011-03-23T20:57:27.787
2018-09-28T17:10:54.200
2014-01-21T23:07:27.623
7290
null
[ "spss", "factor-analysis", "reliability", "composite" ]
8696
1
9956
null
10
3037
UPDATE: caret now uses `foreach` internally, so this question is no longer really relevant. If you can register a working parallel backend for `foreach`, caret will use it. --- I have the [caret](http://caret.r-forge.r-project.org/Classification_and_Regression_Training.html) package for R, and I'm interesting in us...
Parallelizing the caret package using doSMP
CC BY-SA 3.0
null
2011-03-23T21:04:15.040
2014-01-07T14:32:50.000
2014-01-07T14:32:50.000
2817
2817
[ "r", "parallel-computing" ]
8697
2
null
8692
8
null
Note that `rbind(a, b)` creates a single data frame, so that's not it. The unexpected behavior of `unstack(a)` results from the fact that you only have one observation (`count`) per factor level (`state`). To see what's going on, you have to look at the `unstack()` function. ``` # list source code for unstack()'s metho...
null
CC BY-SA 2.5
null
2011-03-23T21:15:39.913
2011-03-23T21:44:51.900
2011-03-23T21:44:51.900
1909
1909
null
8698
2
null
8692
2
null
Caracal has answered the question. Here are some additional pieces of information. Try this: ``` require(stats) formula(PlantGrowth) x = PlantGrowth[c(1,11,21),] y = PlantGrowth[c(1,2,11,12,21,22),] x unstack(x) y unstack(y) ``` The output: ``` > x weight group 1 4.17 ctrl 11 4.81 trt1 21 6.31 trt2 > ...
null
CC BY-SA 2.5
null
2011-03-23T21:18:52.463
2011-03-23T21:30:36.963
2011-03-23T21:30:36.963
1351
1351
null
8699
2
null
8669
0
null
Are you sure there's a Z variable? Since you have an equation of X's versus Y's, isn't one of the X's or Y's the dependent variable? For example: $$X_1 = - newa_2X_2... - newa_{11}X_{11} + newb_0 + newb_1Y_1 + newb_2Y_2 + new b_3Y_3 + newb_4Y_4$$
null
CC BY-SA 2.5
null
2011-03-23T21:45:18.903
2011-03-23T21:45:18.903
null
null
2775
null
8700
2
null
8690
1
null
Maybe I'm missing something here, but couldn't you rearrange the equation and do a logit or probit analysis on gamma?
null
CC BY-SA 2.5
null
2011-03-23T22:14:01.047
2011-03-23T22:28:41.923
2011-03-23T22:28:41.923
2775
2775
null
8701
2
null
7318
2
null
Non-parametric tests are likely to be less powerful than parametric tests and thus require a larger sample size. This is annoying because if you had a large sample size, sample means would be approximately normally distributed by the central limit theorem, and you thus wouldn't need non-parametric tests. Look at genera...
null
CC BY-SA 2.5
null
2011-03-23T22:47:02.427
2011-03-23T22:47:02.427
null
null
3874
null
8702
1
null
null
4
1104
I am examining the difference between a physical feature of different species of animals. Due to the nature of my experiments I'm using a nonlinear mixed model with the following setup: ``` lme(log10(feature) ~ log10(Body.mass) + factor(Trial.Number), random = ~1 | IndividualID, data=animals, subset=Frfactor=="low", na...
Boxplot with glme
CC BY-SA 2.5
null
2011-03-23T23:00:11.000
2012-10-18T02:02:50.437
2011-03-24T07:07:50.403
449
null
[ "r", "repeated-measures", "boxplot" ]
8703
2
null
8562
4
null
You might use a nested design (and a hierarchical/multilevel model). The top level would be Baseline v Non-Baseline, and the Non-Baseline would include your 2^3 factorial design. I unfortunately can't post my pretty picture of the nesting structure because I don't have 10 reputation yet. I'd have to read a bit to remem...
null
CC BY-SA 2.5
null
2011-03-23T23:01:21.810
2011-03-23T23:01:21.810
null
null
3874
null
8704
1
8721
null
3
107
The title defines the question. May be the concept would do...like how to go about it? Thanks.
Given pdf of $I$ and $R$ (both $I$ and $R$ are independent RV's), how to find pdf of $W =I^2\cdot R$?
CC BY-SA 2.5
null
2011-03-24T00:05:13.620
2011-03-24T14:24:39.583
2011-03-24T08:52:26.383
2645
null
[ "self-study", "independence", "density-function" ]
8706
2
null
8689
35
null
Linear refers to the relationship between the parameters that you are estimating (e.g., $\beta$) and the outcome (e.g., $y_i$). Hence, $y=e^x\beta+\epsilon$ is linear, but $y=e^\beta x + \epsilon$ is not. A linear model means that your estimate of your parameter vector can be written $\hat{\beta} = \sum_i{w_iy_i}$, whe...
null
CC BY-SA 2.5
null
2011-03-24T01:32:10.797
2011-03-24T01:32:10.797
null
null
401
null
8709
2
null
8633
1
null
If you're interested in parsing a measure of fatigue from your RT data for use as a covariate, then I'd suggest computing the slope of RT as a function of time. An additional measure of "noisiness" might be the variance of RT once the effect of time has been removed.
null
CC BY-SA 2.5
null
2011-03-24T02:07:04.620
2011-03-24T02:07:04.620
null
null
364
null
8710
1
8730
null
6
298
I have 2 alternative methods to solve a problem, and I was just wondering what people who know the math better than I think, and if there is a better method to use for this type of problem. The problem: I have a list of lat/lon positions and a value for the time interval between position updates and wish to find the SO...
Estimating speed from position updates with uncertain time intervals
CC BY-SA 2.5
null
2011-03-24T02:28:44.653
2011-03-24T21:42:40.373
2011-03-24T21:42:40.373
919
null
[ "regression", "estimation", "functional-data-analysis", "measurement-error" ]
8714
1
null
null
3
6046
Is it possible to perform logarithmic regression on multiple variables with Excel? If I just have a single independent variable than it's very easy to do this using the best-fit line option (it lets me switch from linear to logarithmic). But this feature does not work for multiple variable regression and the regression...
Performing logarithmic multiple regression with Excel?
CC BY-SA 2.5
null
2011-03-24T05:30:59.240
2011-03-24T17:34:04.710
2011-03-24T16:10:25.313
null
null
[ "regression", "excel" ]
8715
2
null
8714
6
null
If by logarithmic regression you mean the model `log(y) = m1.x1 + m2.x2 + ... + b + (Error)`, you can use `LOGEST` and `GROWTH` with multiple independent variables. Note that if you want the estimated coefficients `m1, m2, ..., b` from `LOGEST`, you'll have to enter the formula into multiple cells as an array. See Exce...
null
CC BY-SA 2.5
null
2011-03-24T06:26:38.550
2011-03-24T06:37:46.187
2011-03-24T06:37:46.187
1569
1569
null
8716
1
null
null
5
312
I have a basket of time series (stock prices). I want to find the N (fixed or not) time series that will best replicate the basket in the sense that combination of them will be best cointegrated with the basket. Beside using the N series that have the best cointegration scores (ADF test) and regressing these variables ...
Cointegration-based feature selection
CC BY-SA 2.5
null
2011-03-24T08:39:25.643
2011-04-23T20:26:08.810
2011-03-24T18:21:05.500
2116
3362
[ "cointegration" ]
8717
1
null
null
2
410
Let $X_1, X_2, ..., X_n$ be a random sample from a distribution with p.d.f., $$f(x;\theta)=\theta^2xe^{-x\theta} ; 0<x<\infty, \theta>0$$ Obtain minimum variance unbiased estimator of $\theta$ and examine whether it is attained? MY WORK: Using MLE i have found the estimator for $\theta=\frac{2}{\bar{x}}$ Or as $$X\sim ...
What will be minimum variance unbiased estimator?
CC BY-SA 2.5
null
2011-03-24T08:44:11.823
2011-03-24T16:11:25.250
2011-03-24T16:11:25.250
null
3846
[ "probability", "estimation" ]
8718
1
null
null
13
12274
I've developed a logit model to be applied to six different sets of cross-sectional data. What I'm trying to uncover is whether there are changes in the substantive effect of a given independent variable (IV) on the dependent variable (DV) controlling for other explanations at different times and across time. My questi...
Comparing logistic regression coefficients across models?
CC BY-SA 3.0
null
2011-03-24T09:06:46.867
2021-04-03T17:11:25.097
2021-04-03T17:11:25.097
11887
3883
[ "regression", "logistic", "spss", "regression-coefficients" ]
8719
2
null
8718
3
null
Are there changes across data sets? I can answer that without seeing the data! Yes. There are. How big are they? That's key. For me, the way to see is by looking. You will have odds ratios for each independent variable for each data set - are they different in ways people would find interesting? Now, it's true e...
null
CC BY-SA 2.5
null
2011-03-24T10:20:54.480
2011-03-24T10:20:54.480
null
null
686
null
8721
2
null
8704
3
null
Maybe you know that if $X$ and $Y$ are independent then the pdf of $X+Y$ is given by a convolution. You can generalize the idea of a convolution to another group than $(+,\mathbb{R})$ and the idea that pdf of $X\cdot Y$ (where $\cdot$ is the operation of the group) is given by the convolution is still valid. For the co...
null
CC BY-SA 2.5
null
2011-03-24T10:46:20.527
2011-03-24T14:24:39.583
2020-06-11T14:32:37.003
-1
223
null
8723
2
null
6920
7
null
You can always just perform gradient descent on the sum of squares cost $E$ wrt the parameters of your model $W$. Just take the gradient of it but don't go for the closed form solution but only for the search direction instead. Let $E(i; W)$ be the cost of the i'th training sample given the parameters $W$. Your updat...
null
CC BY-SA 2.5
null
2011-03-24T10:57:37.647
2011-03-24T10:57:37.647
null
null
2860
null
8724
1
8727
null
2
186
I have a database with many attributes. I would like to know which attributes has the minimum variation in the data. Is there some standard technique? It should be like clustering without split records in clusters. I would like to know what the records in particular cluster have in common. I was going to compute the m...
Exploring data attributes
CC BY-SA 2.5
null
2011-03-24T11:04:28.350
2011-03-24T12:42:28.827
null
null
2719
[ "clustering" ]
8725
1
null
null
4
1346
I tried to use the Kernel Density plot method from [Hayfield and Racine (2008)](http://www.jstatsoft.org/v27/i05/paper/) [np package](http://cran.r-project.org/web/packages/np/vignettes/np.pdf) for my own data, but somehow ended up with different type of plots and I have no idea what the difference is between my data a...
Conditional kernel density plot with R's np package
CC BY-SA 3.0
null
2011-03-24T11:50:53.710
2015-04-23T05:57:15.093
2015-04-23T05:57:15.093
9964
704
[ "r", "nonparametric", "conditional-probability", "kernel-smoothing" ]
8726
2
null
8663
0
null
$p-value=Pr(E||H)$ where E is the "data at least as extreme as what was observed" event, and $H$ is the hypothesis, usually of the form "some set of the parameters are zero". I have used the double lines $||$ to indicate that it is not a conditional probability per se, rather a probability based on the the assumption ...
null
CC BY-SA 2.5
null
2011-03-24T12:20:57.903
2011-03-24T12:20:57.903
null
null
2392
null
8727
2
null
8724
2
null
It reminds me of what is implemented in the [caret](http://caret.r-forge.r-project.org/) package for data pre-processing. It is fully described in one of the accompanying vignette, namely [Data Sets and Miscellaneous Functions in the caret Package](http://cran.r-project.org/web/packages/caret/vignettes/caretMisc.pdf). ...
null
CC BY-SA 2.5
null
2011-03-24T12:42:28.827
2011-03-24T12:42:28.827
null
null
930
null
8728
2
null
8695
5
null
The following is shamelessly extracted from the following [link](http://findarticles.com/p/articles/mi_qa3713/is_199704/ai_n8770931/pg_10/). > \begin{shamelesscopyandpaste} Finally, the "average variance extracted" measures the amount of variance that is captured by the construct in relation to the amount of variance ...
null
CC BY-SA 3.0
null
2011-03-24T13:52:21.373
2014-01-21T23:11:57.833
2014-01-21T23:11:57.833
7290
656
null
8729
1
null
null
6
4391
I'm trying to gain a better understanding of kmeans clustering and am still unclear about colinearity and scaling of data. To explore colinearity, I made a plot of all five variables that I am considering shown in the figure below, along with a correlation calculation. ![colinearity](https://i.stack.imgur.com/W5MZJ.jpg...
Colinearity and scaling when using k-means
CC BY-SA 2.5
null
2011-03-24T14:51:27.800
2014-01-08T01:52:15.047
2011-03-24T16:12:33.673
null
2635
[ "r", "clustering" ]
8730
2
null
8710
4
null
Because you trust the GPS positions (and therefore the distances computed from them) but the times have errors, regress the times against the cumulative distances. To account for acceleration and deceleration, consider a model of the form $$\text{Time} = t = \beta_0 + \beta_1 X + \beta_2 X^2 + \varepsilon$$ where $X$ i...
null
CC BY-SA 2.5
null
2011-03-24T15:33:25.113
2011-03-24T15:33:25.113
2017-04-13T12:44:53.777
-1
919
null
8732
1
null
null
8
5746
I am new to time series analysis, and would appreciate any suggestions on how best to approach the following time-series regression problem: I have hourly temperature measurements at approximately 20 locations across one site over three years, along with static ancillary information (slope, elevation, aspect, canopy co...
How to model time-series temperature data at multiple sites as a function of data at one site?
CC BY-SA 2.5
null
2011-03-24T18:26:43.530
2022-08-24T18:36:34.137
2011-03-25T15:08:06.370
null
null
[ "time-series", "regression", "multivariate-analysis", "spatio-temporal" ]
8733
1
null
null
3
1407
Most repeated measures ANOVAs have time as the repeated measure; I was wondering about using a repeated measure that is not time. Say we fed two groups of animals different diets. At the end of the experiment, we sample the tissues, and measure ~30 different compounds (e.g. different fatty acids [FA]). Animals are sam...
Repeated measures with correlated measures (not time)
CC BY-SA 2.5
null
2011-03-24T19:02:00.630
2011-03-24T21:27:29.747
2011-03-24T21:27:29.747
485
3886
[ "pca", "repeated-measures", "manova" ]
8734
1
8740
null
13
15689
Is there a well founded rule for the number of significant figures to publish? Here are some specific examples / questions: - Is there any way to relate the number of significant figures to the coefficient of variation? For example, if the estimate is 12.3 and the CV is 50%, does that mean that the information repres...
Number of significant figures to put in a table?
CC BY-SA 2.5
null
2011-03-24T19:15:34.247
2011-03-26T23:21:47.630
2011-03-26T23:21:47.630
1381
1381
[ "tables" ]
8736
2
null
8734
0
null
I'd suggest 12 (1.2, 123.4). Omit the .3 since it's nearly meaningless, but many people when they see (1.2, 120) will assume that the last '0' in 120 is significant.
null
CC BY-SA 2.5
null
2011-03-24T19:47:02.827
2011-03-24T19:47:02.827
null
null
2658
null
8737
2
null
8733
0
null
It's interesting... how do you compare the compounds with each other? Repeated measures don't have to be necessarily over time, but they need to be measures of the same thing or things that can be treated as if they are the same. You could certainly measure the same compound in different areas of the body and that wo...
null
CC BY-SA 2.5
null
2011-03-24T20:08:10.450
2011-03-24T20:08:10.450
null
null
601
null
8738
1
8741
null
9
832
It's pretty tough to search the Web for info on something when you don't know what words are commonly used to describe it. In this case, I'm wondering what it's called when you include another predictor in a time series. As an example, say I'm modeling a variable $X$ using AR(3): $ X_t = \varphi_1 X_{t-1} + \varphi_2 X...
What is the term for a time series regression having more than one predictor?
CC BY-SA 2.5
null
2011-03-24T20:25:16.957
2011-04-07T21:01:14.247
null
null
1583
[ "time-series", "terminology" ]
8739
2
null
8733
1
null
Have a look in a Multivariate text for MANOVA--multivariate ANOVA. Here is a website... [http://faculty.chass.ncsu.edu/garson/PA765/manova.htm](http://faculty.chass.ncsu.edu/garson/PA765/manova.htm) Though, that's a lot of dependent variables and it could be hard to interpret. It might be simpler to do some sort of d...
null
CC BY-SA 2.5
null
2011-03-24T20:29:46.690
2011-03-24T21:05:57.457
2011-03-24T21:05:57.457
485
485
null
8740
2
null
8734
19
null
I doubt there's a universal rule so I'm not going to make any up. I can share these thoughts and the reasons behind them: - When summaries reflect the data themselves--max, min, order statistics, etc.--use the same number of significant figures used to record the data in the first place. This provides a consistent r...
null
CC BY-SA 2.5
null
2011-03-24T20:37:17.667
2011-03-24T20:37:17.667
null
null
919
null
8741
2
null
8738
7
null
ARIMAX (Box-Tiao) is what it is called when you add covariates to Arima models, is is basically arima + X. [http://www.r-bloggers.com/the-arimax-model-muddle/](http://www.r-bloggers.com/the-arimax-model-muddle/) Also search for Panel data or TSCS: 'Time-series–cross-section (TSCS) data consist of comparable time serie...
null
CC BY-SA 2.5
null
2011-03-24T20:41:18.543
2011-03-24T20:54:54.370
2011-03-24T20:54:54.370
1893
1893
null
8742
1
8745
null
2
2800
There is a bayesian network Asia: ![enter image description here](https://i.stack.imgur.com/sCh2D.png) I am computing based on ``` A (visit to Asia) S (smoker) T (tuberculosis) L (lung cancer) B (bronchitis) E (tuberculosis versus lung cancer/bronchitis) D (dyspnoea) X (chest X-ray) P(A)=0.01 P(S)=0.50 P(T)=0.0104 ...
Bayes Network computing conditional probabilities
CC BY-SA 2.5
null
2011-03-24T21:12:58.117
2011-03-27T01:30:17.867
2011-03-27T01:30:17.867
3681
3681
[ "bayesian", "conditional-probability" ]
8743
2
null
8742
1
null
You have to compute [joint probabilities](http://en.wikipedia.org/wiki/Joint_probability) first, and then the [marginal probabilities](http://en.wikipedia.org/wiki/Marginal_distribution) you are interested in, thanks to [sum-product](http://en.wikipedia.org/wiki/Belief_propagation).
null
CC BY-SA 2.5
null
2011-03-24T22:58:02.023
2011-03-25T15:18:57.543
2011-03-25T15:18:57.543
1351
1351
null
8744
1
null
null
32
23591
I have some points $X=\{x_1,...,x_n\}$ in $R^p$, and I want to cluster the points so that: - Each cluster contains an equal number of elements of $X$. (Assume that the number of clusters divides $n$.) - Each cluster is "spatially cohesive" in some sense, like the clusters from $k$-means. It's easy to think of a lot...
Clustering procedure where each cluster has an equal number of points?
CC BY-SA 3.0
null
2011-03-24T23:07:21.220
2018-05-07T02:46:47.837
2018-01-14T21:04:04.177
7828
3891
[ "machine-learning", "clustering", "k-means", "unsupervised-learning" ]
8745
2
null
8742
3
null
For your four example questions, it looks rather easy, if I am reading this correctly. The first asks for the probability the individual has tuberculosis or cancer given not having tuberculosis and not having cancer. That should be 0. The second, third and fourth ask for the probability the individual has tuberculosis...
null
CC BY-SA 2.5
null
2011-03-24T23:54:20.790
2011-03-24T23:54:20.790
null
null
2958
null
8746
2
null
8738
5
null
This is called a Transfer Function Model. It has also been referred to as a Dynamic Regression Model.
null
CC BY-SA 2.5
null
2011-03-24T23:59:50.460
2011-03-24T23:59:50.460
null
null
3382
null
8747
1
null
null
4
304
I am working on something to test advertisements. I have 3 independent variables I want to test (with mixed numbers of variations of each variable), and I would like to find the best combination of the three by looking at their effect on a single dependent variable (the percentage who purchase). ``` TITLE IMAGE D...
A test for assessing advertisement efficiency
CC BY-SA 3.0
null
2011-03-25T01:15:45.307
2011-04-12T04:34:57.197
2011-04-12T04:34:57.197
183
null
[ "chi-squared-test", "conjoint-analysis" ]
8748
1
8758
null
8
272
I am working in hospital processing infection data, and start to read more and more articles on regressions and statistics, having realized that my mathematics background is not sufficient for me to handle all the maths inside the article. I plan to do some self-study. I have seen from [here](http://www.biostat.jhsph.e...
Introduction to maths for a junior in epidemiology
CC BY-SA 2.5
null
2011-03-25T02:55:34.180
2011-03-25T12:14:55.213
2011-03-25T09:29:26.643
null
588
[ "references" ]
8749
1
8928
null
22
1322
I need to implement a program that will classify records into 2 categories (true/false) based on some training data, and I was wondering at which algorithm/methodology I should be looking at. There seem to be a lot of them to choose from -- Artificial Neural Network, Genetic Algorithm, Machine Learning, Bayesian Optimi...
How to choose between learning algorithms
CC BY-SA 2.5
null
2011-03-25T03:04:24.757
2011-03-29T15:52:01.003
2011-03-25T13:48:01.460
919
800
[ "machine-learning", "bayesian", "optimization", "genetic-algorithms" ]
8750
1
8751
null
13
23587
If I have an arima object like `a`: ``` set.seed(100) x1 <- cumsum(runif(100)) x2 <- c(rnorm(25, 20), rep(0, 75)) x3 <- x1 + x2 dummy = c(rep(1, 25), rep(0, 75)) a <- arima(x3, order=c(0, 1, 0), xreg=dummy) print(a) ``` . ``` Series: x3 ARIMA(0,1,0) Call: arima(x = x3, order = c(0, 1, 0), xreg ...
How can I calculate the R-squared of a regression with arima errors using R?
CC BY-SA 2.5
null
2011-03-25T03:29:12.967
2017-11-12T17:20:50.220
2017-11-12T17:20:50.220
11887
179
[ "r", "regression", "time-series", "arima", "r-squared" ]
8751
2
null
8750
24
null
Once you have ARMA errors, it is not a simple linear regression any more. So you would have to define what you mean by $R^2$. Perhaps the squared correlation of fitted to actuals? In that case: ``` cor(fitted(a),x3)^2 ``` The `fitted()` function will only work if you have loaded the `forecast` package, but it looks li...
null
CC BY-SA 2.5
null
2011-03-25T05:19:58.357
2011-03-25T05:19:58.357
null
null
159
null
8752
1
null
null
9
385
I want to perform quadrat count analysis on several point processes (or one marked point process), to then apply some dimensionality reduction techniques. The marks are not identically distributed, i.e., some marks are appearing quite often, and some are pretty rare. Thus, I cannot simply divide my 2D space in a regula...
How to construct quadrats for point processes that differ greatly in frequency?
CC BY-SA 3.0
0
2011-03-25T06:00:09.103
2017-06-29T16:53:05.470
2015-12-20T18:52:58.673
7290
3699
[ "multivariate-analysis", "normalization", "ecology", "point-process" ]
8753
2
null
8747
4
null
In marketing-oriented statistics the analysis you need is called conjoint analysis. You construct a number of product "scenarios" which are various "mixes" of attributes such your 3 attributes, each being allowed to vary across some "levels". The Conjoint will tell you what's the best scenario and what are "utility" co...
null
CC BY-SA 2.5
null
2011-03-25T07:09:32.060
2011-03-25T07:09:32.060
null
null
3277
null
8754
1
8768
null
24
5040
An interim analysis is an analysis of the data at one or more time points prior the official close of the study with the intention of, e.g., possibly terminating the study early. According to Piantadosi, S. ([Clinical trials - a methodologic perspective](http://eu.wiley.com/WileyCDA/WileyTitle/productCd-0471727814.html...
Why is bias affected when a clinical trial is terminated at an early stage?
CC BY-SA 2.5
null
2011-03-25T07:45:24.537
2011-03-25T16:18:10.147
null
null
3019
[ "clinical-trials", "bias" ]
8755
1
8773
null
6
35580
I have some data to analyze where $y$ is dependent of $x$ - a linear regression was used. It's a question from an exam, so I think it should be solvable. The regression was used to estimate the mean miles per gallon (response) from the amount of miles driven (predictor). I have the following statistics available: - Co...
Calculating the mean using regression data
CC BY-SA 2.5
null
2011-03-25T08:22:34.893
2011-04-29T00:56:50.313
2011-04-29T00:56:50.313
3911
1205
[ "regression", "self-study", "mean" ]
8757
2
null
8692
3
null
To get unstacking of `a` similar to `rbind(a,b)` you can simply transpose the result: ``` > t(unstack(a)) RSTO RSTR S1 S2 S3 SF res 199665 4147 31274 1 2522 118009 ``` You will get a `matrix` instead of `data.frame` though. It is also possible to use the `cast` function from package reshape: ``` > cas...
null
CC BY-SA 2.5
null
2011-03-25T09:15:16.203
2011-03-25T09:15:16.203
null
null
2116
null
8758
2
null
8748
5
null
Jeff Gill has a good book, on Essential Mathematics for Social and Political Research: [http://www.amazon.com/Essential-Mathematics-Political-Research-Analytical/dp/052168403X/ref=sr_1_2?ie=UTF8&s=books&qid=1301047912&sr=8-2](http://rads.stackoverflow.com/amzn/click/052168403X) I found it quite useful for getting a goo...
null
CC BY-SA 2.5
null
2011-03-25T10:13:50.523
2011-03-25T10:13:50.523
null
null
656
null
8759
2
null
8754
1
null
Well, my knowledge on this comes from the Harveian oration in 2008 [http://bookshop.rcplondon.ac.uk/details.aspx?e=262](http://bookshop.rcplondon.ac.uk/details.aspx?e=262) Essentially, to the best of my recollection the results will be biased as 1) stopping early usually means that either the treatment was more or less...
null
CC BY-SA 2.5
null
2011-03-25T10:18:25.167
2011-03-25T10:18:25.167
null
null
656
null
8760
2
null
8690
7
null
I will try to answer the questions 2 to 4. Suppose that we observe sample $(y_i,\mathbf{x}_i,z_i,\gamma_i,\varepsilon_i)$. Suppose that our model is $$y_i=\mathbf{x}_i\beta+\gamma_iz_i+\varepsilon_i$$ and $$E(\varepsilon_i|\mathbf{x}_i,z_i,\gamma_i)=0.$$ The least squares estimate of the regression will be \begin{al...
null
CC BY-SA 2.5
null
2011-03-25T10:26:13.193
2011-03-28T12:08:49.257
2011-03-28T12:08:49.257
2116
2116
null
8762
2
null
8744
2
null
I suggest the recent paper [Discriminative Clustering by Regularized Information Maximization](http://las.ethz.ch/files/gomes10discriminative.pdf) (and references therein). Specifically, Section 2 talks about class balance and cluster assumption.
null
CC BY-SA 2.5
null
2011-03-25T11:07:50.053
2011-03-26T09:01:37.207
2011-03-26T09:01:37.207
3785
3785
null
8763
2
null
8754
1
null
I would disagree with that claim, unless by "bias" Piantadosi means that part of the accuracy which is commonly called bias. The inference won't be "biased" because you chose to stop per se: it will be "biased" because you have less data. The so called "likelihood principle" states that inference should only depend o...
null
CC BY-SA 2.5
null
2011-03-25T11:15:05.500
2011-03-25T11:15:05.500
null
null
2392
null
8764
2
null
8748
3
null
As far as learning the information on slide 6 in the slideshow you linked to, I would suggest [A Mathematical Primer for Social Statistics](http://www.sagepub.com/books/Book232153) by John Fox (not free but cheap, [Google book link](http://books.google.com/books?id=S4_VhrdIKS4C)). All of those sage green books are aime...
null
CC BY-SA 2.5
null
2011-03-25T12:14:55.213
2011-03-25T12:14:55.213
null
null
1036
null
8766
2
null
8380
1
null
This sounds like something very similar to a method I have seen Jerry Reiter using multiple imputation for missing data. However I can't quite remember the name of the paper. But these terms will probably be able to get you in the right(er) direction (pardon the pun). So basically you have three variables $X$, $Y$, a...
null
CC BY-SA 2.5
null
2011-03-25T13:18:27.827
2011-03-25T13:18:27.827
null
null
2392
null
8767
2
null
8754
0
null
there will be bias (in "statistical sense") if termination of studies is not random. In a set of experiments run to conclusion, the "early on" results of (a) some experiments that ultimately find "no effect" will show some effect (as a result of chance) and (b) some experiments that ultimately do find an effect will s...
null
CC BY-SA 2.5
null
2011-03-25T13:53:13.750
2011-03-25T13:58:46.677
2011-03-25T13:58:46.677
11954
11954
null
8768
2
null
8754
13
null
First of all, you have to note the context: this only applies when the trial was stopped early due to interim monitoring showing efficacy/futility, not for some random outside reason. In that case the estimate of the effect size will be biased in a completely statististical sense. If you stopped for efficacy, the estim...
null
CC BY-SA 2.5
null
2011-03-25T14:10:28.553
2011-03-25T14:56:53.367
2011-03-25T14:56:53.367
279
279
null
8769
1
null
null
4
373
I am taking a course in data mining. I am not sure how a non linear SVM when transformed to high dimensional space becomes a linear classification problem. It would be good if someone can provide me an intuition on this.
Linear behaviour of nonlinear SVM in higher dimensional space
CC BY-SA 2.5
null
2011-03-25T14:54:47.357
2012-06-04T21:12:22.990
2011-03-25T14:58:14.440
null
3897
[ "svm" ]
8770
2
null
8769
2
null
You should look at the problem the other way arround. SVM algorithms solve Linear classification problems in feature space. Depending on the kernel you use, the boundaries in the original space might not be linear.
null
CC BY-SA 2.5
null
2011-03-25T15:09:20.313
2011-03-25T15:09:20.313
null
null
3362
null
8771
1
null
null
1
1673
Given a factor with a number of levels, say for example, versions of a banner advertisement on a web page, where the measurement of interest is the click through rate (# clicks / # of times banner add was viewed), is there a principled way to determine the best performing ad, controlling for multiple testing? Hsu's [M...
Multiple comparisons with binary data: Hsu's MCB method
CC BY-SA 2.5
null
2011-03-25T15:10:02.870
2011-03-26T17:18:46.097
2011-03-26T17:18:46.097
null
2040
[ "r", "multiple-comparisons", "binary-data" ]
8772
2
null
8742
1
null
@darkcminor: I wonder if the following short tutorial would help you (look especially at the chain rule and the section on inference). I have not looked at these for a long time, but I believe with a few principles you can figure out the values of any query. Some of them will just be onerous done by hand. [http://www.c...
null
CC BY-SA 2.5
null
2011-03-25T15:13:51.963
2011-03-25T15:13:51.963
null
null
2040
null
8773
2
null
8755
7
null
Contrary to @whuber's claim, the mean of x and y are contained in the information given. Okay, so you have the line equation $$y_i=\alpha +x_i\beta + e_i$$ estimates $\hat{\beta}=r\frac{s_y}{s_x}$ and $\hat{\alpha}=\overline{y}-\hat{\beta}\overline{x}$. where $r$ is the correlation. The question doesn't state whether ...
null
CC BY-SA 2.5
null
2011-03-25T15:28:23.537
2011-03-25T15:28:23.537
null
null
2392
null
8774
1
null
null
5
3350
What is the difference between `independence.test` in R and CATT (Cochrane and Armitage) tests? How these tests are calculated? Where do we and how do we define x=0.0 0.5 1.0 (genetic studies) for both of the tests?
What is the difference between independence.test in R and Cochrane and Armitage trend test?
CC BY-SA 3.0
null
2011-03-25T16:15:37.153
2012-03-15T15:11:13.880
2012-03-15T15:11:13.880
930
3870
[ "ordinal-data", "genetics", "association-measure" ]
8775
2
null
8754
3
null
Here is an illustration of how bias might arise in conclusions, and why it may not be the full story. Suppose you have a sequential trial of a drug which is expected to have a positive (+1) effect but may have a negative effect (-1). Five guinea pigs are tested one after the other. The unknown probability of a posit...
null
CC BY-SA 2.5
null
2011-03-25T16:18:10.147
2011-03-25T16:18:10.147
null
null
2958
null
8776
2
null
8718
1
null
Another tool that may be useful is the standardarized regression coefficient, or at least a rough-and-ready pseudo-version. You can obtain one such version by multiplying your obtained coefficient by the standard deviation of the predictor. (There are other versions and some debate about the best one, e.g. see Menard...
null
CC BY-SA 3.0
null
2011-03-25T16:37:41.953
2013-10-02T16:54:52.130
2013-10-02T16:54:52.130
7290
2669
null
8777
1
null
null
25
21498
In [genome-wide association studies](https://en.wikipedia.org/wiki/Genome-wide_association_study) (GWAS): - What are the principal components? - Why are they used? - How are they calculated? - Can a genome-wide association study be done without using PCA?
In genome-wide association studies, what are principal components?
CC BY-SA 4.0
null
2011-03-25T16:39:10.923
2020-09-14T18:12:48.993
2018-11-13T13:12:32.697
28666
3870
[ "pca", "genetics", "gwas" ]
8778
2
null
8380
1
null
One approach would be to use the second dataset to make a secondary model that predicts the exact variables as a function of the noisy variables and use this in operation to provide the inputs for the primary model trained on the first dataset (which predicts the target given the exact variables). However, to do this ...
null
CC BY-SA 2.5
null
2011-03-25T16:48:20.410
2011-03-25T16:48:20.410
null
null
887
null
8779
1
null
null
20
11452
This problem is actually about fire detection, but it is strongly analogous to some radioactive decay detection problems. The phenomena being observed is both sporadic and highly variable; thus, a time series will consist of long strings of zeroes interrupted by variable values. The objective is not merely capturing ev...
Analysis of time series with many zero values
CC BY-SA 2.5
null
2011-03-25T18:35:44.733
2017-11-08T11:21:00.140
2017-11-08T11:21:00.140
1352
3898
[ "time-series", "correlation", "crostons-method", "intermittent-time-series" ]
8780
2
null
8777
30
null
In this particular context, PCA is mainly used to account for population-specific variations in alleles distribution on the SNPs (or other DNA markers, although I'm only familiar with the SNP case) under investigation. Such "population substructure" mainly arises as a consequence of varying frequencies of minor alleles...
null
CC BY-SA 4.0
null
2011-03-25T19:32:21.563
2020-09-14T18:12:48.993
2020-09-14T18:12:48.993
930
930
null
8781
2
null
4276
1
null
Since there is quite some variation in how the steps look, you could try a statistical approach. Which could, for example, be done in the following steps: - Generate the feature vector. Filter the signal by a number of filters, each having a different frequency response. A set foo (haar)-wavelets might be a reasonable...
null
CC BY-SA 2.5
null
2011-03-25T20:20:58.920
2011-03-25T20:20:58.920
null
null
3867
null
8782
2
null
8779
12
null
To restate your question “ How does the analyst deal with long periods of no demand that follow no specific pattern?” The answer to your question is Intermittent Demand Analysis or Sparse Data Analysis. This arises normally when you have "lots of zeros" relative to the number of non-zeros.The issue is that there are tw...
null
CC BY-SA 2.5
null
2011-03-25T23:55:45.633
2011-03-25T23:55:45.633
null
null
3382
null
8783
1
null
null
3
3949
I am wondering that how one can calculate [KL-divergence](http://en.wikipedia.org/wiki/Kullback%E2%80%93Leibler_divergence) on two probability distributions. For example, if we have ``` t1 = 0.4, 0.2, 0.3, 0.05, 0.05 t2 = 0.23, 0, 0.14, 0.17 ``` The formula is bit complicated for me :(
KL divergence calculation
CC BY-SA 2.5
null
2011-03-26T00:33:57.720
2011-04-08T20:44:20.170
2011-04-08T20:44:20.170
919
3900
[ "distributions", "machine-learning", "distance-functions", "information-retrieval" ]
8784
1
null
null
14
4303
This is a follow up question from [the one I asked a couple of days ago](https://stats.stackexchange.com/questions/8718/comparing-logistic-regression-coefficients-across-models/). I feel it puts a different slant on the issue, so listed a new question. The question is: can I compare the magnitude of coefficients across...
Comparing logistic coefficients on models with different dependent variables?
CC BY-SA 2.5
null
2011-03-26T01:07:46.037
2011-04-28T00:05:39.210
2017-04-13T12:44:23.203
-1
3883
[ "regression", "logistic" ]
8785
2
null
8783
4
null
Using brute force and the first formula [here](http://en.wikipedia.org/wiki/Jensen%E2%80%93Shannon_divergence) based on the first formula for the [Kullback-Leibler divergence](http://en.wikipedia.org/wiki/Kullback%E2%80%93Leibler_divergence), you are starting from two multisets each with 5 values, 3 of which are shared...
null
CC BY-SA 2.5
null
2011-03-26T01:09:49.170
2011-03-26T01:09:49.170
null
null
2958
null
8786
2
null
8749
8
null
I would use probability theory to start with, and then pick whichever algorithm best calculates what probability theory tells you to do. So you have training data $T$, and some new precursors $X$, and an object to classify $Y$, as well as your prior information $I$. So you want to know about $Y$. Then probability the...
null
CC BY-SA 2.5
null
2011-03-26T05:43:34.727
2011-03-27T00:34:48.983
2011-03-27T00:34:48.983
2392
2392
null
8787
1
null
null
5
548
I'm looking for any reference about Generalized Linear Latent and Mixed Model (GLLAMM) for Crossed Factors involving both Measurement Model and Structured Model of GLLAMM (See the problem below). Any help in this regard will be highly appreciated. Problem: A researcher observed four responses Y1, Y2, Y3, and Y4 along w...
Generalized linear latent and mixed model (GLLAMM) for crossed factors
CC BY-SA 2.5
null
2011-03-26T05:58:44.600
2012-09-20T00:48:23.793
2012-09-20T00:31:58.377
5739
3903
[ "mixed-model", "stata", "gllamm" ]
8788
1
null
null
2
2733
I have a problem when I run the Komogorov-Smirnov test. I have to samples of daily prices distributions estimated with density(). Now I would like to compare these two distributions with each other. data.1: ``` Date price 01.01.2010 1.2 02.01.2010 1.5 etc. ``` data.2: ``` Date price 01.01.2...
Goodness-of-fit test using Kolmogorov-Smirnov
CC BY-SA 2.5
null
2011-03-25T11:57:14.800
2011-04-08T20:44:41.933
2011-04-08T20:44:41.933
919
null
[ "r", "distributions" ]
8789
2
null
8788
5
null
ks.test receives values, not densities. So you don't need to call density(). Probably what you should do is simply: ``` ks.test(data.1$return, data.2$return) ``` and the reason why you get p=1 is that you passed `return.density.1$x` instead of `return.density.1$y`. `density(foo)$x` is the n coordinates of the points w...
null
CC BY-SA 2.5
null
2011-03-25T12:23:49.427
2011-03-26T14:54:51.527
2011-03-26T14:54:51.527
919
2280
null
8790
2
null
8788
7
null
First of all, you don't calculate the ks on an estimated density, as the ks test works on the empiric cumulative distribution function (ecdf). So you add the raw data: ``` ks.test(data.1$return, data.2$return) ``` Second, the `$x` is not the density, but the uniformly distributed grid constructed by the density functi...
null
CC BY-SA 2.5
null
2011-03-25T12:29:53.250
2011-03-25T12:29:53.250
null
null
1124
null
8791
1
null
null
6
104
The best way I can think to describe this question is by example: Imagine there is a ship sailing around the pacific ocean on an unknown path (possibly random.) Other ships passing by sometimes see this ship and radio in its location to me. Some of these scout ships have better instruments or a more trustworthy crew th...
Weighted discrete measurements of a value changing over time
CC BY-SA 2.5
null
2011-03-26T01:54:14.677
2011-03-30T19:16:40.193
2011-03-30T19:16:40.193
919
180918
[ "time-series", "predictive-models" ]
8792
2
null
8791
2
null
Sounds like you might want to look at [(Weighted) Moving Average](http://en.wikipedia.org/wiki/Moving_average).
null
CC BY-SA 2.5
null
2011-03-26T01:59:01.030
2011-03-26T01:59:01.030
null
null
null
null
8793
2
null
8784
1
null
Let us say the interest lies in comparing two groups of people: those with $X_{1} = 1$ and those with $X_{1} = 0$. The exponential of $\beta_{1}$, the corresponding coefficient, is interpreted as the ratio of the odds of success for those with $X_{1} = 1$ over the odds of success for those with $X_{1} = 0$, conditional...
null
CC BY-SA 2.5
null
2011-03-26T10:34:21.970
2011-03-26T10:34:21.970
null
null
3019
null
8794
2
null
8784
2
null
I assume that by "my independent variable is the economy" you're using shorthand for some specific predictor. At one level, I see nothing wrong with making a statement such as > X predicts Y1 with an odds ratio of _ and a 95% confidence interval of [ _ , _ ] while X predicts Y2 with an odds ratio of _ and a 95%...
null
CC BY-SA 3.0
null
2011-03-26T12:21:03.737
2011-04-23T15:38:48.887
2011-04-23T15:38:48.887
2669
2669
null
8795
1
8809
null
9
602
If you flip a coin and get 268 heads and 98 tails, you can calculate the probability that coin is fair several ways. A simple, heuristic observation would have most likely conclude that such a coin is unfair. I've calculated the p-value in R with: ``` > coin <- pbinom(98, 366, 0.5) > coin*2 [1] 2.214369e-19 ``` This v...
Can a fair coin test be applied to a coin that often lands on its edge?
CC BY-SA 2.5
null
2011-03-26T13:29:21.417
2011-03-27T23:31:20.117
2011-03-27T23:31:20.117
3306
3306
[ "probability" ]
8796
2
null
5997
1
null
You can try playing with spam filtering, that's quite a common use of Naive Bayesian Classifiers.
null
CC BY-SA 2.5
null
2011-03-26T14:30:20.593
2011-03-26T14:30:20.593
null
null
3442
null
8797
1
null
null
2
1265
I've made a little questionnaire where participants can rate an answer between 1 and 5. I calculated the mean value, the average value and the standard deviation. Now I was asking myself if it is possible to calculated a confidence interval for these results and if yes, if this would tell me anything. So I just tested ...
Understanding confidence interval
CC BY-SA 2.5
null
2011-03-26T15:37:23.837
2011-03-28T13:54:58.437
2011-03-26T17:16:41.450
null
3908
[ "confidence-interval" ]
8798
1
14644
null
11
6363
In the absence of good a priori guesses about the number of components to request in Independent Components Analysis, I'm looking to automate a selection process. I think that a reasonable criterion might be the number that minimizes the global evidence for correlation amongst the computed components. Here's pseudocod...
How do I select the number of components for independent components analysis?
CC BY-SA 2.5
null
2011-03-26T15:55:40.037
2016-08-31T17:10:38.983
2011-03-26T17:16:12.450
null
364
[ "independent-component-analysis" ]
8799
1
null
null
4
17943
I have made a very simple questionnaire that asks questions that are independent of each other. Every question can be answered with a rating between 1 and 5 where 1 means I strongly disagree and 5 I strongly agree. Now I was wondering with statistical methods I could use to evaluate the results. I know maybe I should h...
How to evaluate a simple questionnaire with statistical methods?
CC BY-SA 2.5
null
2011-03-26T15:57:41.113
2011-03-26T19:04:16.593
2011-03-26T16:46:53.343
930
3908
[ "survey" ]