Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 147695

Use this tag for any *on-topic* question that (a) involves `R` either as a critical part of the question or expected answer, & (b) is not *just* about how to use `R`.

0 votes

Regression within categorical variable in R

You want to perform a planned contrasts. Make sure this is supported by theory and that you do not run out of degrees of freedom by including too many contrasts.
Jay Schyler Raadt's user avatar
2 votes
0 answers
1k views

Scaling of linear discriminant from lda in MASS

I was attempting to replicate in R an example my instructor used in class from SPSS. …
Jay Schyler Raadt's user avatar
-1 votes

Constraining latent variance of the slope across groups in lavaan

Your data might have issues. Although you wish to fit a growth model, some participants (n=6) do not have any growth at all and thus have no within-person variance. Fully 135 of participants have less …
Jay Schyler Raadt's user avatar
3 votes
Accepted

Auto correlation function in R what are the error lines

statistical significance, where the null hypothesis is: $$H_0: r_k=0$$ The test statistic is: $$\mid r_k\mid>\frac{1.96}{\sqrt{n}}$$ See Cowpertait & Metcalfe (2009) for more about time series analysis in R. …
Jay Schyler Raadt's user avatar
1 vote

How to calculate Odds Ratio with R

Without more context for the meaning of your variables, it is hard to help you interpret your results. You want to do an odds ratio, but why? Normally, though, you can interpret the odds ratio as an e …
Jay Schyler Raadt's user avatar
1 vote

How to evaluate all possible contrasts of an interaction effect

Now, use R to do a logistic regression and analyze it: mod=glm(Change~Type1+Type2,family='binomial') summary(mod) confint(mod) exp(coef(mod))/(1+exp(coef(mod))) This creates model, summarizes it, gives …
Jay Schyler Raadt's user avatar
0 votes

Predictive model from sequential data R

For dichotomous outcomes in a lonitudinal model, try using a glmm in glmer function in r. I can enhance this answer based on your comments. …
Jay Schyler Raadt's user avatar
1 vote
1 answer
2k views

Interpreting ARIMA for Interrupted Time Series Analysis

I want to test for efficacy of an intervention. I have pre- and post-intervention data and I used auto.arima to find the best fit for the two data sets. I'm stuck in the actual use of these models no …
Jay Schyler Raadt's user avatar
0 votes

What am I modeling with R vs. SPSS mixed model?

Normally, CrossValidated is not for programming questions. That would be Stack Overflow, but it looks like your SPSS syntax does not include a random component nor have you specified a covariance stru …
Jay Schyler Raadt's user avatar
0 votes
Accepted

Is there a acceptable replacement for Poisson regression for this case?

Using a log transformation would help excpet you have some 0's. There is support for applying a small constant and then doing a log transformation when you have 0's in your data (https://robjhyndman.c …
Jay Schyler Raadt's user avatar
2 votes

Which model for my data?

Because your model uses longitudinal data, it is best to check for the Intraclass Correlation Coefficient (ICC) before assuming independence. However, this particualr model has a small sample size, so …
Jay Schyler Raadt's user avatar
3 votes
Accepted

How to compare paired percentages (can I use the Wilcoxon signed-rank test?)

Wilcoxon signed rank test and all such univariate analyses (ANOVA, t-Test, etc.) can be analyzed using regression. You will probably need to do a log transformation in the percentages if they are your …
Jay Schyler Raadt's user avatar
0 votes

Nested mixed model with longitudinal data and variables with very few observations

I would say that doing ICC by hand for all the levels will be easier because extracting the values from the functions is not always straightforward in R. …
Jay Schyler Raadt's user avatar
2 votes
1 answer
79 views

Multiple-R from just b coefficients

Packages from my preferred software (Amelia and Zelig from R) give me estimates of a linear model after multiple imputation, but do not provide multiple R. … Is there a way to calculate multiple-R from just the b coefficients? Below is the overall model provided through Zelig. …
Jay Schyler Raadt's user avatar
3 votes
1 answer
3k views

How many lags for ADF test based on ACF, PACF

I have 8 time series data. How do I determine how many lags to use in ur.df from library(urca)? Is it right to visually inspect the results of acf() and pacf()? What does it mean if, for the same da …
Jay Schyler Raadt's user avatar