[R-sig-ME] Model with no random intercept?

Ben Bolker bbolker at gmail.com
Fri Oct 30 01:24:13 CET 2015


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:
> 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:
>>
>> 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.
>>
>> _______________________________________________
>> R-sig-mixed-models at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>
>
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models



More information about the R-sig-mixed-models mailing list