[R] Creating a model with fixed and random variables
cbarl3y
chubbar9 at uwyo.edu
Fri Aug 2 17:18:05 CEST 2013
I am trying to recreate a model that would mimic results a peer obtained
using SAS, but in R. The goal of this model would be to determine if there
is any variation among parental sets and lines (essentially is there a
significant p-value for the variables “set” and “line”). The problems I am
having are:
1) The usage of nested data “Line%in%Set”
2) Having to have both fixed and random variables Fixed=Set Random=Line and
Block
3) Results I have obtained usually contain significant Blocking effects.
Code I have used thus far without being able to replicate the data includes:
Fm<-lmer(Score~(1|Line%in%Set)+Set+(1|Block))
(I figured out how to get a p-value, but it didn't yield the same results
as those obtained in SAS)
Model<-lm(Score~Line%in%Set+Set+Block)
Overall, I realize that I might be completely off in the way I am attempting
to create this model and any suggestions will be extremely helpful! Also,
if it would be more helpful I can add a dput() of my data.
--
View this message in context: http://r.789695.n4.nabble.com/Creating-a-model-with-fixed-and-random-variables-tp4672905.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list