Skip to content
Back to formatted view

Raw Message

Message-ID: <5338385B.8080305@gmail.com>
Date: 2014-03-30T15:29:31Z
From: Ben Bolker
Subject: lsmeans for multiple response variables
In-Reply-To: <CAPEW02YGZcyCLdb3oDxMVUBuQ-Y+N5xG7tqTi_OX9Zib_xfGUw@mail.gmail.com>

On 14-03-30 12:47 AM, Paul Tanger wrote:
> Hi,
> Not sure this is the best place to ask since I'm fitting a fixed effect
> model.. please advise if there is a better forum..
> I'm trying to get lsmeans for a set of response variables, but I'm getting
> this error and I can't figure out how to get it working.. it just spits out
> the lsmeans for the first response.
> Here is an example:

  The short answers are that (1) this is indeed not a mixed-model question;
try r-help at r-project.org or Stack Overflow (2) you may not be aware that
you're fitting two separate linear models here --  from ?lm

   If ?response? is a matrix a linear model is fitted separately by
     least-squares to each column of the matrix.

This is a relatively less-used feature, so presumably lsmeans()
doesn't expect it.  You could fit the two models separately, or
use lapply() ... or request of the lsmeans maintainer that they
change lsmeans to allow such support.

  Ben Bolker