[R] Pull Coefficients from MCMCpack models

Noah Silverman noah at smartmediacorp.com
Tue Sep 22 04:34:52 CEST 2009


Hi,

I've been testing some models with the MCMCpack library.

I can run the process and get a nice model "object".  I can easily see 
the summary and even plot it.

I can't seem to figure out how to:
1) Access the final coefficients in the model
2) Turn the coefficients into a model so I can then run predictions 
using them.

A summary command will SHOW Me the coefficients, but I can't run a 
"predict" with them.  Can someone suggest how to pull them out and 
format them so that I can run some predictions to test the quality.  I 
thought something like "as.model" would be there, but isn't.

For example.

foo <- MCMClogit(label ~ x1 + x2)

summary(foo)
plot(foo)

foo has all the info.  How do I pull out the coefficients and format 
them into a "standard" logit model??

Thanks!

-N




More information about the R-help mailing list