# lmer

1. ### Help needed with Repeated Measures ANOVA - how to correctly specify nested effect?

Hi everyone, I need some advice regarding nested effects. My data set has the following variables: HeatingRate = dependent variable Individual (n = 4) = fixed Temperature gradient (n = 3) = fixed Trial (n = 3 per temperature gradient per individual) = random I'm interested in knowing whether...
2. ### lmer set-up (t-test with covariate?) ?

I have 139 subjects (ID), with measurements taken at two time points (Time1, Time2), at 148 brain regions, a dependent measure called volume, and a covariate called thickness. Each subject has 148 brain regions with volume and thickness measured twice I am trying to find out if there is a...
3. ### Which non-parametric test should I use while running GLM?

I'm trying to analyze some experimental data about animal behaviour using R and would need some help or advice regarding which non-parametric test should I use. The variables I have are: - Response variable: "Vueltasmin", a numeric one - Explicatory variable: "Condicion", a factor with 6 levels...
4. ### R lme4: Plotting three-way interaction / conditional coefficient plot

Hi all, I'm trying to visualize a three-way interaction from a rather complex linear mixed model in R (lmer function from the lme4 package; the model has a complex random-effects structure). The interaction consists of two continuous variables and one categorical variable (two experimental...
5. ### lmer multilevel model

Hi to all, I want to look at the change in the percentage of income savings measured in dollars using repeated measures data for older adults. I want to compare three groups based on their father's occupation while growing up. I want to estimate different slopes and intercepts for the...
6. ### Help with R GLM Formula for paired/nested model

I have an experimental design as follows: Two treatments, carried out on the same sample. The samples are collected from soil at five depths, in five different pits, from five different fields. I want to: (1) see if the treatment has an effect on the species richness found in the soil...
7. ### Two way repeated measures with zeros, non integer values, and non-normal distribution

I would really appreciate some help with a few models I am trying to run. Essentially my data looks at how often a subject was visited depending on treatment and subject type across two years. The data looks like this: Year | Subject | SubjectType | Treatment | BlockNum | NumberOfVisits |...
8. ### Mixed model analysis

I would greatly appreciate any help constructing a model to analyze the variation in strontium-to-carbon ratios in 204 fish otoliths (1 otolith per fish). I believe lmer is an appropriate R package, but am having difficulty implementing the model. The model includes terms to account for the...
9. ### Profile Confidence Interval in lmer model .

When I fit lmer model with my data , there is no warning message. But when I tried to construct confidence interval by confint , it shows the following warning message : Warning messages: 1: In FUN(X[[i]], ...) : non-monotonic profile 2: In nextpar(mat, cc, i, delta, lowcut...
10. ### Testing Parameters of Mixed Model .

This pdf illustrates nicely how is to test the random effect of multilevel model . But I am simulating data from a two-level model and estimating the parameters of the model for various combination of the parameters. For each condition , I generated 1000 simulated data sets. I have used R for...
11. ### How can I calculate Standard Errors of Variance Estimates .

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...
12. ### Standard Error of variance component from the output of lmer .

I want to extract the "standard error" of variance component from the output of "lmer" . library(lme4) model <- lmer(Reaction ~ Days + (1|Subject), sleepstudy) The following produces estimates of variance component : s2 <- VarCorr(model)\$Subject[1] It is **NOT**...
13. ### Difference between two lmer model .

Can you please explain where is the difference between the following two models : fm1 <- lmer(Reaction ~ Days + (Days | Subject), sleepstudy) fm2 <- lmer(Reaction ~ Days + (1|Subject) + (0+Days|Subject), sleepstudy) I noticed there is some discrepency in the estimate for random effect...
14. ### How is the confidence interval for variance component in "lmer" function computed ?

Here is the R code : library(lme4) fm1 <- lmer(Reaction ~ Days + (Days | Subject), sleepstudy) confint.merMod(fm1,oldNames=FALSE) And the output is 2.5 % 97.5 % sd_(Intercept)|Subject 14.3814761 37.715996...
15. ### Interpretation of various output of "lmer" function in R

library(lme4) fm1 <- lmer(Reaction ~ Days + (Days | Subject), sleepstudy) The notation (Days | Subject) says to allow the intercept and Days to vary randomly for each level of Subject . Can you please explain me the result of the following commands ...
16. ### Confidence interval of parameters of mixed-model in R

Hi , can anyone please explain me the following output produces in R when I ran the command confint(lmer()) . Here is the R code : library(lme4) fm1 <- lmer(Reaction ~ Days + (Days | Subject), sleepstudy) confint(fm1) And the output is : Computing profile confidence...
17. ### Calculating Non-Coverage Probability .

Hi , I have a two-level model with one explanatory variable (X) on the respondent level, and one group-level explanatory variable (Z) . I am following this paper http://joophox.net/publist/methodology05.pdf I am simulating data from the model . Three conditions are varied in the simulation...
18. ### Have I correctly specified my model in glmer ?

The following multilevel logistic model with one explanatory variable at level 1 (individual level) and one explanatory variable at level 2 (group level) : \text{logit}(p_{ij})=\pi_{0j}+\pi_{1j}x_{ij}\ldots (1) \pi_{0j}=\gamma_{00}+\gamma_{01}z_j+u_{0j}\ldots (2)...
19. ### Specifying formula of lmer() function in R .

Am I specifying my lmer model correctly ? Say I have one independent variable (X) at individual level and one independent variable (Z) at group level. Both are continuous variable . If the model is...
20. ### Example of lmer() function in R documentation .

How is the following code working ? (fm1 <- lmer(angle ~ recipe * temperature + (1|recipe:replicate), cake, REML= FALSE)) In the formula of lmer : What does 1 before vartical bar , (1|recipe:replicate) , indicate ? How does "recipe:replicate" after vartical bar work ? I...