# Tag Info

4

If you use type 3 for ANOVAs it is critical in R that you set the contrast to effect coding (i.e., "contr.sum"). The default contrast in R is dummy coding (or in R parlance, treatment coding) in which 0 represents the first factor level. This doesn't make too much sense when having interactions as explaind on the page I linked to. To set effect coding, ...

2

lme in nlme is designed for linear mixed effects models, meaning that the outcome variable at least approximates a continuous outcome. However, what exactly Cookie-Lookup is will determine what package you need to find. Here are a few things to choose from: Does the 0, 1, 2 in the outcome represent a count? If so, then you can use lme4 and model the data ...

2

I believe error structure in this respect is referring to the "element of randomness" in your model. For example, in least squares regression, we often assume that the error term of the model (i.e. residuals) follows a normal distribution $$Y = \beta_0 + \beta_1X_1 + \epsilon, \:\:\: \epsilon \sim N(0,\sigma^2)$$ Without the error term, our model would be ...

2

Q1: Yes - just like any regression model. Q2: Just like general linear models, your outcome variable does not need to be normally distributed as a univariate variable. However, LME models assume that the residuals of the model are normally distributed. So a transformation or adding weights to the model would be a way of taking care of this (and checking ...

2

You seem quite mislead about the assumptions surrounding multi-level models. There is not an assumption of homogeneity of variance in a general sense but there is one across groups. Residuals should be roughly normally distributed. And categorical predictors are used in regression all of the time (the underlying function in R that runs an ANOVA is the linear ...

2

Probably what you will need to use is the Parametric Bootstrap Cross-fitting Method. Here is the basic procedure: Fit each model to the data. Estimate the models' parameters and extract your favorite measure of goodness of fit. We will call the model with the higher value for this GoF measure $A$ and the other model $B$. Calculate the difference $d$ ...

1

I'm certainly no ANOVA expert but I guess the other way to do this analysis is to switch to a regression framework and use lme4 which doesn't mind unbalanced data and will itself work out what it 'between' and what is 'within'. I believe the relevant line for an additive model would be mod0 <- lmer(top_start ~ (1 | id) + task + org + sex, data=df) ...

1

I'm not convinced this will work, but maybe it will stimulate someone who knows more R/statistics to provide a better answer. This code assumes you've created a new time variable called "time" which is centered on the time-point dividing periods: attach(data) time0 <- time*I(time>=0) library(nlme) model1 <- lme(outcome ~ time + group*time0, ...

1

You can estimate the intraclass correlation coefficient (ICC) (wikipedia link). It tells you how correlated the behavioral responses are for the same individual. It is defined as: $$ICC = \tau^2 / (\tau^2 + \sigma^2),$$ where $\tau^2$ is the "intercept" variance and $\sigma^2$ is the residual variance. Substituting the estimated values into the equation ...

1

(1) your constant = 2480! Where does that fit on the graph? (2) Graph doesn't have axis labels /legend. Looks like fitted data. (3) is time a linear term in this model? why? Have you tried fitting quadratic terms, cubic terms, quartic terms... - unless the change in scale is distorting the graph, the time trend is clearly non-linear and using a simple ...

1

I had to think hard about what you were asking. At first I thought along the lines of @user11852, that you were wanting every observation to have its own unique random effect. That would make the model hopelessly unidentified, as there would be no conceivable way to distinguish random effect variation from the model error. But I believe that in the scope of ...

1

d1 <- data.frame(j, y=g00+u0j+(g10+u1j)*x1+e, x1) # You need to add error terms My intuition is that when we simulatated a mixed model data set without error terms, sometimes it may be difficult to converge. This is likely to be a zero residual problem.

1

I think I can answer your questions at least concerning the unadjusted repeatability estimates, i.e., the classical intra-class correlations (ICCs). As for the "adjusted" repeatability estimates, I skimmed over the paper you linked and didn't really see where the formula that you apply can be found in the paper? It is also not immediately obvious to me what ...

Only top voted, non community-wiki answers of a minimum length are eligible