Thank you Jarrod for the info.

A follow up question on prior specification. Assuming I'm reading Ch 3.6.1
of the course notes correctly, the following prior structure should work:

prior2 = list(R = list(V = 1, n = 0, fix = 1),G = list(
 G1 = list(V = diag(181)*0.01, n = 182 ),
 G2 = list(V = diag(268)*0.01, n = 269),
 G3 = list(V = diag(1823)*0.01, n = 1824)
))


Where my model looks like this:
MCMCglmm(loginc ~ Date +  holiday,
random=~ Factor1 + Factor2 + Factor3,
data=Ninc, pr=TRUE, pl=TRUE, prior=prior2)

where Factor 1 has 181 levels (more, but only that many are observed on this
dataset), Factor 2 has 268 levels, and factor3 has 1823 levels.

However i'm still getting the following error message
"V is the wrong dimension for some priorG/priorR elements"

Can you advise what I'm doing wrong?



Robin Jeffries
MS, DrPH Candidate
Department of Biostatistics
UCLA
530-624-0428



On Fri, Feb 4, 2011 at 2:09 PM, Jarrod Hadfield <j.hadfield@ed.ac.uk> wrote:

> Hi,
>
> If you specify pr=TRUE in the call to MCMCglmm the posterior distribution
> of random effects will be stored. They are in m$Sol in columns after the
> fixed effects.  You can obtain your predictions "by hand" by extracting the
> relevant random effects. Alternatively you can use the predict function, but
> currently this will only predict the data points used in model fitting.  In
> your case you want to use the random effects in the prediction rather than
> marginalising them so specify marginal=NULL in the call to predict. To
> obtain prediction intervals instead of confidence intervals specify
> interval="prediction" in the call to predict. This obtains prediction
> intervals using posterior predictie simulation so can be slow.
>
> Cheers,
>
> Jarrod
>
>
>
>
>
> Quoting Ben Bolker <bbolker@gmail.com>:
>
>  -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>>  I believe that if m is a an MCMCglmm fit, m$Liab will get you the
>> "Posterior distribution of latent variables" (see ?MCMCglmm); I'm not
>> sure whether there is useful information about the structure encoded in
>> the object, but see if colnames(m$Liab) gets you something helpful.
>>
>>  Ben Bolker
>>
>>
>> On 02/04/2011 02:50 PM, Robin Jeffries wrote:
>>
>>> Or alternatively, can I get the samples of the individual random effects
>>> out
>>> of MCMC glmm?
>>>
>>>
>>>
>>
>>
>>>
>>> On Fri, Feb 4, 2011 at 11:01 AM, Robin Jeffries <rjeffries@ucla.edu>
>>> wrote:
>>>
>>>  Hello,
>>>>
>>>> I'm very new at using MCMCglmm, so my apologies if my question is
>>>> rudimentary. I can't even create a sufficient toy example to assist my
>>>> explanation of what I'm trying to achieve. I've been working in lmer on
>>>> this
>>>> for a little while, but since my end result is prediction for specific
>>>> levels of my random effects, L-serv consensus seems to be that I switch
>>>> to
>>>> MCMCglmm.
>>>>
>>>>
>>>> I'm running prediction models on some gaussian (and separately binomial)
>>>> outcome where I have random intercepts and slopes - within factors.
>>>>
>>>> random=~ us(1+slope1 + slope2):Factor1 + us(1+slope1):Factor 2 + Factor3
>>>>
>>>> The short question is how do I create prediction intervals for specific
>>>> levels of Factors 1-3?
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> Robin Jeffries
>>>> MS, DrPH Candidate
>>>> Department of Biostatistics
>>>> UCLA
>>>> 530-624-0428
>>>>
>>>>
>>>>
>>>        [[alternative HTML version deleted]]
>>>
>>> _______________________________________________
>>> R-sig-mixed-models@r-project.org mailing list
>>> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>>>
>>
>> -----BEGIN PGP SIGNATURE-----
>> Version: GnuPG v1.4.10 (GNU/Linux)
>> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>>
>> iEYEARECAAYFAk1MWmMACgkQc5UpGjwzenMwQQCeKlhelTFBDkeilyB+hb7aJ+HV
>> FTUAoI5BeDVfdcMW+UpkJhnGlC3hDc68
>> =y+W5
>> -----END PGP SIGNATURE-----
>>
>> _______________________________________________
>> R-sig-mixed-models@r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>>
>>
>>
>
>
> --
> The University of Edinburgh is a charitable body, registered in
> Scotland, with registration number SC005336.
>
>
>

	[[alternative HTML version deleted]]


