Consider the following data frame:
dat <- data.frame(x=c(0,128.96,0,397.37,56.80,0,801.79,340.79),
d=c(1,0,0,0,0,1,0,1), A=c(0,1,0,1,1,0,1,1), B=c(0,1,0,1,1,0,1,1))
For each value of the column y which satisfies...
The following model assumes that the covariance between the random intercepts and random slopes across Subjects is Zero .
lmer(Reaction ~ Days + (Days||Subject), sleepstudy)
How can I write the same model by "lme" function under nlme pacakge assuming zero covariance between the random...
I am trying to fit a random slope model by "varComp" in R . For the following example , that is in "lmer" syntax , how can I write it in "varComp" syntax :
fm1 <- lmer(Reaction ~ Days + (Days||Subject), sleepstudy)
I am not understanding...
I would really appreciate some advice on how to deal with my data.
I would like to compare data calculated from an index which is bounded by -1 and +1.
I was surprised to see that previously published use of this index has been analysed using standard ANOVA, because I was led to...
I want to extract the "standard error" of variance component from the output of "lmer" .
In Chapter 12 , Experiments with Random Factors , of the book Design and Analysis of Experiments, written by Douglas C. Montgomery , at the end of the chapter , Example 12-2 is done by SAS . In Example...
I want to extract standard deviation of residual from `glmer()` function in R .
So I wrote :
lmer_obj = glmer(Y ~ X1 + X2 + (1|Subj), data = D, family = binomial)
I noticed that the last command `sigma(lmer_obj)` returns always "1" irrespective of data ...
Hello, newbie here. I have just started with R and am having trouble with how to enter a seemingly very simple probability question in R. The question is:
There is a big court case, and 20% of the adult population believe the accused is innocent prior to jury selection. Assume that the 12...
I am currently attempting to fit confidence interval lines to a regression model in R, but every time I try to for example add a +2 confidence interval line, I end up with two of them! I have been over my code many times and can't find any obvious mistakes. This is the code I...