# [R-sig-ME] MCMCglmm Starting Value structure

Robin Jeffries rjeffries at ucla.edu
Tue Jun 7 19:34:46 CEST 2011

```I am having some difficulty defining the correct structure for the
starting values in MCMCglmm.
Several prior google searches for examples of starting values for
MCMCglmm resulted only in one unhelpful L-serv posting where the
poster was subsequently told to RTM and quit posting. I hope that I
show that I have spent time trying to find the answer on my own prior
to posting.

My prior structure is:

prior1 = list(R = list(V = 1, nu = .002),
G = list(
G1 = list(V = diag(3), n=4),
G2 = list(V = diag(3), n=4),
G3 = list(V = 1, nu=1),
G4 = list(V = 1, nu=1)
))

To set up starting values I first set Rc and Gc to be vectors of
length 1 and 20 respectively. I then tried the starting value
structure as

start2a = list( R = Rc,
G = list(
G1 = Gc[1:9],
G2 = Gc[10:18],
G3 = Gc,
G4 = Gc),
QUASI=FALSE)

which gives me the error "V is the wrong dimension for some
startG/startR elements"
So I tried to structure it exactly as the priors (with lists and matricies)

start2b = list(R = list(V =Rc),
G = list(
G1 = list(V = matrix(Gc[1:9], nrow=3, ncol=3)),
G2 = list(V = matrix(Gc[10:18], nrow=3, ncol=3)),
G3 = list(V = Gc),
G4 = list(V = Gc)
))

and got the same error message.

Since the help file/notes/vignette says that "the starting values is a
list of 4 possible elements, where G itself is also a list with as
many elements as RE components" I tried a combination of the above
two:

start2c = list(
R = Rc,
G = list(
G1 = matrix(Gc[1:9], nrow=3, ncol=3),
G2 = matrix(Gc[10:18], nrow=3, ncol=3),
G3 = Gc,
G4 = Gc),
QUASI=FALSE)

but then was greeted with the error "Error in start\$G[[r]] : subscript
out of bounds"

If someone could help me out with what the structure of the starting
values is supposed to look like, it would be appreciated.

Robin Jeffries
MS, DrPH Candidate
Department of Biostatistics
UCLA
530-633-STAT(7828)

```