Get lsmeans from lm model with fix nested effects

567 Views Asked by At

I have a model as:

model <- lm (Data$Body_wt ~ Area + Owner%in%Area +  Breed + Rank + Age + Breed*Area, Data)

if I now want lsmean of:

lsmeans(model, ~ Breed +Area) 

I do not get a result (just empty rows); but if I put:

lsmeans(model, ~ Age)

I do get result. However, I want results for my

lsmeans(model, ~ Breed +Area) 

what should I do? I get it in SAS but not with R?

1

There are 1 best solutions below

0
On

Try the following:

lsmeans(model, ~ Breed*Area)