Rajat
Rajat

Reputation: 11

how to get the P-values in linear mixed model in R

I have 2 groups of myope and non-myope (34 participants) to measure the contrast sensitivity (CS) in 4 different cells over a time period.

I want to compare CS in different cells in 2 groups over that time.

Now my question is: how should I write my command to have 3 P-values for Time, Cell and group? I used this method, but i didn't give me any P-values:

NNtset1 = read.csv(file.choose())
LMM_alldata = lm(CS~Time+Class+(1|Groups),data=NNtset1,REML=FALSE)
summary(LMM_alldata)

Upvotes: 0

Views: 268

Answers (1)

Łukasz Deryło
Łukasz Deryło

Reputation: 1860

Run the same code, but with lmerTest package attached and lmer function instead of lm, like this:

library(lmerTest)
LMM_alldata = lmer(CS~Time+Class+(1|Groups),data=NNtset1,REML=FALSE)
summary(LMM_alldata)

Upvotes: 2

Related Questions