Skip to content

Model with no random intercept?

3 messages · Salmon, Maëlle, Philipp Singer, Ben Bolker

#
Dear help-list,

Is it possible to have a random effect without random intercept?

My model is 
formula <- "cslt_sspref ~ 1 + epiPeriod + (epiPeriod|ss_pref)"
modelTest1 <- glmer(formula, dataCarambars, family=poisson())

But what I would like is something like
formula <- "cslt_sspref ~ 1 + epiPeriod + ((0+epiPeriod)|ss_pref)"
modelTest1 <- glmer(formula, dataCarambars, family=poisson())

i.e. only epiPeriod with a random effect of ss_pref. I have tried different syntaxes with 0, -1, etc. but I could not find the right syntax.

How can I avoid this issue and eliminate the random intercept? Maybe I cannot?

Thanks a lot in advance, best wishes

Ma?lle Salmon.
#
Your syntax is correct, you need to specify it as

cslt_sspref ~ 1 + epiPeriod + (0+epiPeriod|ss_pref)

Best,
Philipp
On 10/29/2015 06:41 AM, Salmon, Ma?lle wrote:
#
This seems like the right syntax, but it won't work correctly for
categorical input variables.  If epiPeriod is (e.g.) a two-level
factor with levels "before","after" then you might want

cslt_sspref ~ 1 + epiPeriod + (0+dummy(epiPeriod,"after")|ss_pref)

(see ?dummy) -- although I have to say I am suspicious of the
usefulness of this model ... why do you expect there to be no
variation among groups in the "before" period ... ?

  Ben Bolker
On Thu, Oct 29, 2015 at 1:32 PM, Philipp Singer <killver at gmail.com> wrote: