All Questions
3,928 questions
378
votes
26
answers
136k
views
Python as a statistics workbench
Lots of people use a main tool like Excel or another spreadsheet, SPSS, Stata, or R for their statistics needs. They might turn to some specific package for very special needs, but a lot of things can ...
202
votes
1
answer
162k
views
Crossed vs nested random effects: how do they differ and how are they specified correctly in lme4?
Here is how I have understood nested vs. crossed random effects:
Nested random effects occur when a lower level factor appears only within a particular level of an upper level factor.
For ...
173
votes
4
answers
481k
views
When is R squared negative? [duplicate]
My understanding is that $R^2$ cannot be negative as it is the square of R. However I ran a simple linear regression in SPSS with a single independent variable and a dependent variable. My SPSS output ...
72
votes
8
answers
62k
views
Is PCA followed by a rotation (such as varimax) still PCA?
I have tried to reproduce some research (using PCA) from SPSS in R. In my experience, principal() function from package psych ...
51
votes
7
answers
7k
views
Why is "statistically significant" not enough?
I have completed my data analysis and got "statistically significant results" which is consistent with my hypothesis. However, a student in statistics told me this is a premature conclusion. Why? Is ...
46
votes
7
answers
24k
views
How to deal with hierarchical / nested data in machine learning
I'll explain my problem with an example. Suppose you want to predict the income of an individual given some attributes: {Age, Gender, Country, Region, City}. You have a training dataset like so
<...
43
votes
1
answer
62k
views
Doing principal component analysis or factor analysis on binary data
I have a dataset with a large number of Yes/No responses. Can I use principal components (PCA) or any other data reduction analyses (such as factor analysis) for this type of data? Please advise how I ...
42
votes
4
answers
80k
views
When to use fixed effects vs using cluster SEs?
Suppose you have a single cross-section of data where individuals are located within groups (e.g. students within schools) and you wish to estimate a model of the form ...
42
votes
8
answers
26k
views
Under what conditions should one use multilevel/hierarchical analysis?
Under which conditions should someone consider using multilevel/hierarchical analysis as opposed to more basic/traditional analyses (e.g., ANOVA, OLS regression, etc.)? Are there any situations in ...
41
votes
3
answers
10k
views
What's the relation between hierarchical models, neural networks, graphical models, bayesian networks?
They all seem to represent random variables by the nodes and (in)dependence via the (possibly directed) edges. I'm esp interested in a bayesian's point-of-view.
39
votes
3
answers
109k
views
Difference between binomial, negative binomial and Poisson regression
I am looking for some information about the difference between binomial, negative binomial and Poisson regression and for which situations are these regression best fitted.
Are there any tests I can ...
36
votes
2
answers
15k
views
What's the difference between "deep learning" and multilevel/hierarchical modeling?
Is "deep learning" just another term for multilevel/hierarchical modeling?
I'm much more familiar with the latter than the former, but from what I can tell, the primary difference is not in their ...
35
votes
5
answers
91k
views
Fisher's Exact Test in contingency tables larger than 2x2
I was taught to only apply Fisher's Exact Test in contingency tables that were 2x2.
Questions:
Did Fisher himself ever envision this test to be used in tables larger than 2x2 (I am aware of the tale ...
33
votes
1
answer
47k
views
Best factor extraction methods in factor analysis
SPSS offers several methods of factor extraction:
Principal components (which isn't factor analysis at all)
Unweighted least squares
Generalized least squares
Maximum Likelihood
Principal Axis
Alpha ...
32
votes
3
answers
31k
views
What does "independent observations" mean?
I'm trying to understand what the assumption of independent observations means. Some definitions are:
"Two events are independent if and only if $P(a \cap b) = P(a) * P(b)$." (Statistical Terms ...
30
votes
3
answers
78k
views
Choice between Type-I, Type-II, or Type-III ANOVA [duplicate]
We have a dataset with three variables (dV: self-reported measure on scale 1-5, assumed to be metric; iV1: factor with 4 levels; iV2: factor with 8 levels). We are interested whether the dV differs in ...
25
votes
2
answers
15k
views
Why is a $p(\sigma^2)\sim\text{IG(0.001, 0.001)}$ prior on variance considered weak?
Background
One of the most commonly used weak prior on variance is the inverse-gamma with parameters $\alpha =0.001, \beta=0.001$ (Gelman 2006).
However, this distribution has a 90%CI of ...
25
votes
3
answers
624
views
Equations in the news: Translating a multi-level model to a general audience
The New York Times has a long comment on the 'value-added' teacher evaluation system being used to give feedback to New York City educators. The lede is the equation used to calculate the scores - ...
24
votes
1
answer
2k
views
After bootstrapping regression analysis, all p-values are multiple of 0.001996
I'm running various multiple regression analyses in SPSS 27, and with those that are not bootstrapped, the p-values vary such that I do not find the same p-value twice within a regression (e.g., the p-...
24
votes
1
answer
55k
views
Methods to compute factor scores, and what is the "score coefficient" matrix in PCA or factor analysis?
As per my understanding, in PCA based on correlations we get factor (= principal component in this instance) loadings which are nothing but the correlations between variables and factors. Now when I ...
23
votes
2
answers
26k
views
CHAID vs CRT (or CART)
I am running a decision tree classification using SPSS on a data set with around 20 predictors (categorical with few categories). CHAID (Chi-squared Automatic Interaction Detection) and CRT/CART (...
23
votes
2
answers
32k
views
How to cluster time series?
I have a question about cluster analysis. There are 3000 companies, which have to be clustered according to their power usage over 5 years. Each company has values for every hour during 5 years. I ...
22
votes
4
answers
12k
views
How to calculate the confidence interval of the mean of means?
Imagine that you repeat an experiment three times. In each experiment, you collect triplicate measurements. The triplicates tend to be fairly close together, compared to the differences among the ...
22
votes
2
answers
836
views
Fisher information in a hierarchical model
Given the following hierarchical model,
$$
X \sim {\mathcal N}(\mu,1),
$$
and,
$$
\mu \sim {\rm Laplace}(0, c)
$$
where $\mathcal{N}(\cdot,\cdot)$ is a normal distribution. Is there a way to get an ...
21
votes
6
answers
13k
views
R package for multilevel structural equation modeling?
I want to test a multi-stage path model (e.g., A predicts B, B predicts C, C predicts D) where all of my variables are individual observations nested within groups. So far I've been doing this through ...
21
votes
1
answer
21k
views
Difference between multilevel modelling and mixed effects models?
What is the difference between Multilevel/Hierarchical Modelling and Mixed Effects Models?
Wikipedia considers them to be the same, i.e. two different names for the same thing. But I think they are ...
20
votes
4
answers
29k
views
Visualizing Likert responses using R or SPSS
I have 82 respondents in 2 groups (43 in Group A and 39 in Group B) that completed a survey of 65 Likert questions each ranging from 1 – 5 (strongly agree - strongly disagree). I therefore have a ...
20
votes
3
answers
13k
views
Random forest on multi-level/hierarchical-structured data
I am quite new to machine learning, CART-techniques and the like, and I hope my naivete isn't too obvious.
How does Random Forest handle multi-level/hierarchical data structures (for example when ...
20
votes
1
answer
5k
views
Clustered standard errors vs. multilevel modeling?
I've skimmed through several books (Raudenbush & Bryk, Snijders & Bosker, Gelman & Hill, etc.) and several articles (Gelman, Jusko, Primo & Jacobsmeier, etc.), and I still haven't ...
19
votes
6
answers
8k
views
Interpreting discrepancies between R and SPSS with exploratory factor analysis
I am a graduate student in computer science. I have been doing some exploratory factor analysis for a research project. My colleagues (who are leading the project) use SPSS, while I prefer to use R. ...
18
votes
1
answer
2k
views
How to respond to reviewers asking for p-values in bayesian multilevel model?
We were asked by a reviewer to provide p-values as to better understand the model estimates in our bayesian multilevel model. The model is a typical model of multiple observations per participant in ...
17
votes
1
answer
8k
views
Compute partial $\eta^2$ for all fixed effects anovas from a lme4 model
Disclamer: I wasn't sure where to post this question: CV or SO, but eventually decided to try here first
I've been asked by one of the reviewers to add effects sizes (preferably $\eta^2_p$ which is ...
17
votes
1
answer
3k
views
Writing out the mathematical equation for a multilevel mixed effects model
The CV Question
I'm trying to give (a) detailed and concise mathematical representation(s) of a mixed effects model. I am using the lme4 package in R. What is the ...
16
votes
2
answers
22k
views
How to get pooled p-values on tests done in multiple imputed datasets?
Using Amelia in R, I obtained multiple imputed datasets. After that, I performed a repeated measures test in SPSS. Now, I want to pool test results. I know that I can use Rubin's rules (implemented ...
16
votes
3
answers
15k
views
How to handle with missing values in order to prepare data for feature selection with LASSO?
My situation:
small sample size: 116
binary outcome variable
long list of explanatory variables: 44
explanatory variables did not come from the top of my head; their choice was based on the ...
16
votes
2
answers
10k
views
How is ARMA/ARIMA related to mixed effects modeling?
In panel data analysis, I have used multi-level models with random/mixed effects to deal with auto-correlation issues (i.e., observations are clustered within individuals over time) with other ...
16
votes
1
answer
23k
views
Product Demand Forecasting for Thousands of Products Across Multiple Stores
I'm currently working on a demand forecasting task, with data on tens of thousands of products across a couple thousand stores. More specifically,I have a few years' worth of daily sales data per ...
15
votes
3
answers
28k
views
My distribution is normal; Kolmogorov-Smirnov test doesn't agree
I have a problem with the normality of some data I have:
I've done a Kolmogorov test which says it isn't normal with p=.0000,
I don't understand: the skewness of my distribution =-.497, and the ...
15
votes
1
answer
12k
views
OLS with clustered standard errors vs. multilevel modeling when the main interest is at the individual level [duplicate]
Possible Duplicate:
Under what conditions should one use multilevel/hierarchical analysis?
I have been reading various papers dealing with multilevel analysis, and to be honest, I am still ...
15
votes
3
answers
155k
views
How to deal with non-binary categorical variables in logistic regression (SPSS)
I have to do binary logistic regression with a lot of independent variables. Most of them are binary, but a few of the categorical variables have more than two levels.
What is the best way to deal ...
15
votes
3
answers
1k
views
Predicting variance of heteroscedastic data
I am trying to do a regression on heteroscedastic data where I'm trying to predict the error variances as well as the mean values in terms of a linear model. Something like this:
$$\begin{align}\\
y\...
14
votes
4
answers
13k
views
Comparing logistic regression coefficients across models?
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 ...
14
votes
5
answers
4k
views
What precisely does it mean to borrow information?
I often people them talk about information borrowing or information sharing in Bayesian hierarchical models. I can't seem to get a straight answer about what this actually means and if it is unique to ...
14
votes
2
answers
5k
views
Is multilevel modelling simpler, more practical, or more convenient using Bayesian methods or frequentist methods?
In this community wiki page a twice-upvoted comment asserted by @probabilityislogic asserted that "Multi-level modelling is definitely easier for bayesian, especially conceptually." Is that true, and ...
14
votes
3
answers
5k
views
Illustrative datasets and analysis for multilevel modelling
I recently took an introductory course on multilevel modelling. Most of the datasets and examples we used were from the social sciences. I've just got a 2 week internship in a biostatistics department,...
14
votes
3
answers
5k
views
Multilevel model vs. separate models for each level
What are the advantages and disadvantages of running separate models vs. multilevel modeling?
More particularly, suppose a study examined patients nested within doctors' practices nested within ...
14
votes
2
answers
5k
views
Why use a beta distribution on the Bernoulli parameter for hierarchical logistic regression?
I'm currently reading Kruschke's excellent "Doing Bayesian Data Analysis" book. However, the chapter on hierarchical logistic regression (Chapter 20) is somewhat confusing.
Figure 20.2 describes a ...
14
votes
2
answers
4k
views
Hierarchical Bayesian Model (?)
Please apologize my butchering of statistical lingo :) I have found a couple of questions on here that are related to advertising and click through rates. But none of them helped me very much with my ...
14
votes
2
answers
2k
views
Is there a method for constructing decision trees that takes account of structured/hierarchical/multilevel predictors?
Is there a method for constructing decision trees that takes account of structured/hierarchical/multilevel predictors, that would allow me to impose domain knowledge or constraints on interactions for ...
14
votes
1
answer
2k
views
Comparison of the jacknife vs the bootstrap
I am interested in understanding the relative pros and cons of bootstrap versus jacknife resampling. Both are used in iterative algorithmic approaches to estimating the precision of a prediction or ...