[R-sig-ME] Exponent random effect in nlmer
thierry.onkelinx at inbo.be
Tue Oct 11 12:06:07 CEST 2016
y centred on 0 and a valid range (0, 1) seems to be conflicting statements.
Here a some solutions depending on y
- y stems from a binomial process
- use a binomial glmm.
- y is continuous and you are willing to transform y
- 0 < y < 1
- apply a logit transformation on y. lmer(plogis(y) ~ f + (1 | id) )
- 0 <= y < 1
- apply a log transformation on y. lmer(log(y) ~ f + (1 | id) )
- 0 < y <= 1
- apply a log transformation on 1 - y. lmer(log(1 - y) ~ f + (1 |
- y is continuous are not willing to transform y
- use a beta regression with 0 and/or 1 inflation in case you have 0 or
1 in the data. Have a look at the gamlss package to fit this model.
ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek / Research Institute for Nature and
team Biometrie & Kwaliteitszorg / team Biometrics & Quality Assurance
To call in the statistician after the experiment is done may be no more
than asking him to perform a post-mortem examination: he may be able to say
what the experiment died of. ~ Sir Ronald Aylmer Fisher
The plural of anecdote is not data. ~ Roger Brinner
The combination of some data and an aching desire for an answer does not
ensure that a reasonable answer can be extracted from a given body of data.
~ John Tukey
2016-10-11 11:29 GMT+02:00 Cole, Tim <tim.cole op ucl.ac.uk>:
> I have a model of the form
> m1 <- lmer(y ~ f + (1 | id) )
> where y is a continuous variable centred on zero, f is a unordered factor
> with coefficients b such 0 < b < 1, and there is a signficant random
> subject intercept.
> The random intercept can lead to predicted values outside the valid range
> (0, 1). For this reason I'd like to reformulate the model as
> m2 <- nlmer(y ~ (f - 1) ^ exp(1 | id) ) (using a invalid but I hope
> obvious notation), where the random effect is now a power centred on 1.
> This would constrain the fitted values to be within c(0, 1).
> My question is: can this be done in nlmer, and if so how? Please can
> someone point me in the right direction?
> Tim Cole
> Tim.cole op ucl.ac.uk<mailto:Tim.cole op ucl.ac.uk> Phone +44(0)20 7905 2666
> Fax +44(0)20 7905 2381
> Population, Policy and Practice Programme
> UCL Great Ormond Street Institute of Child Health, London WC1N 1EH, UK
> [[alternative HTML version deleted]]
> R-sig-mixed-models op r-project.org mailing list
[[alternative HTML version deleted]]
More information about the R-sig-mixed-models