[R-sig-ME] MCMCglmm predictions

Jarrod Hadfield j.hadfield at ed.ac.uk
Thu Mar 20 17:24:25 CET 2014


Hi Shamil,

This is fixed in MCMCglmm_2.18 which is now on CRAN. The Mac OS X  
binary has not been built yet (perhaps tonight) but you can install  
from source. For other OS its ready. Let me know if there is still a  
problem.

Cheers,

Jarrod

Quoting Shamil Sadigov <shamil at gmail.com> on Thu, 20 Mar 2014 18:13:09 +0200:

> Hello All,
>
> I am using the MCMCglmm package to fit a multivariate ordered probit model
> for 5 ordinal variables. Parameter estimation was successful, so was the
> prediction on the linear scale. However, when I tried prediction on the
> response scale I got the following error:
>
>> eq5d.mcmc2bfix.p.pred <- predict(eq5d.mcmc2bfix.p, type="response")
> Error in M[, which(rm.v), ] <- 0 : incorrect number of subscripts
>
> When I looked at the predict.MCMCglmm() function from the package, I
> noticed that the M matrix was specified as a 3-dimentional array - hence
> the incorrect number of substripts error.
>
>  M <- model.matrix(~v.terms[nz] - 1)
>                   M[, which(rm.v), ] <- 0
>
> I am using the version:
>
>> packageVersion("MCMCglmm")
> [1] '2.17'
>
>
> Note:
>> eq5d.mcmc2bfix.p.pred <- predict(eq5d.mcmc2bfix.p, type="terms")
> works with no error.
>
> Regards,
> Shamil.
>
> 	[[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-mixed-models at 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.



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