[R-sig-ME] transform glmer model into MCMCglmm: how to define the priors?

Anne Krause anne.krause at frequenz.uni-freiburg.de
Tue Mar 17 18:06:48 CET 2015


Dear list members,
I am a linguist who would like to use MCMCglmm in order to
model change in language morphology. I have a 3-level
dependent variable (unordered) which are 3 realisations of
a morphological form in German. Say, I call them A, B, and
C - A and B share the same vowel, B and C share the
suffixation.
I did not know about MCMCglmm until recently; therefore I
worked with two glmer models, looking at vowel and
suffixation separately. However, I have been criticised for
the clumsy model interpretation, and I am sure that the
output of a MCMCglmm would be more straightforward and
convincing.

My glmer looks like this:
model <- glmer(vowel~frequency+year+recency+
                  frequency*recency+
                  (1|verb)+(1|author), data=imp,
                  family=binomial)
- where “vowel” differentiates between AB on the one hand
and C on the other hand,
- “frequency” and “year” are numeric fixed variables and
“recency” a categorical fixed variable (7 levels),
- “verb” and “author” are categorical random variables

The model for the dependent variable “suffix” is
practically the same (part of the criticism), “suffix”
distinguishing between A on the one hand and BC on the
other hand.

Trying to transform this into an MCMCglmm, I managed to get
as far as this:
model2 <- MCMCglmm(form~trait:frequency+trait:recency+
                  trait:year-1, 
                  random=~us(trait):author, 
                  rcov=~us(trait):units,
                  data=imp, family="categorical",)
(“form” now distinguishing between all 3 three levels of
the dependent variable A, B, and C)

I am well aware that this model is running without priors.
Whichever prior I tried gave me the error “V is the wrong
dimension for some prior$G/prior$R elements” and I have no
idea (after reading through the general description, the
tutorial, the course notes and entries in this mailing
list) how these priors are defined. I guess there is no
rule of thumb, but I hope this short explanation of my
variables is enough for someone of you to point out a
solution (or a starting point for me). I also need to
include the second random from above (“verb”) and the
interaction between “frequency” and “recency”.

Even though model2 is running, I cannot call the summary
for it (error: “Error in get(as.character(FUN), mode =
"function", envir = envir) :   object 'C:\Users\Anne
Krause\some_directory.Rdata' of mode 'function' was not
found”), which probably has to do with the fact that I did
not include priors (?!).

Thank you so much in advance for help and/ or comments,
pointers or the like!

Best, Anne
____________________________________

Anne Krause
Research Training Group GRK DFG 1624
"Frequency Effects in Language"
University of Freiburg
Belfortstraße 18
79098 Freiburg

Phone: 0761/203-97670
frequenz.uni-freiburg.de/krause



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