Re: [R] Pull Coefficients from MCMCpack models

2009-09-21 Thread Debabrata Midya
Try this: apply(foo, 2, mean) or apply(foo, 2, median) Thanks, Deb >>> Noah Silverman 22/09/2009 12:34 pm >>> 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

Re: [R] Pull Coefficients from MCMCpack models

2009-09-21 Thread Debabrata Midya
Try this: First of all: > predict(foo) Error in UseMethod("predict") : no applicable method for "predict" Therefore, an alternative approach may be taken: As per: bar <- apply(foo,2,mean) bar[1] is the intercept bar[2] is the coefficient for x1 bar[2] is the coefficient for x2 Th

Re: [R] Pull Coefficients from MCMCpack models

2009-09-21 Thread Noah Silverman
Deb, That's great!!! But, then how to I convert those values to a "model" so I can use a "predict" function. I can see: bar <- apply(foo,2,mean) That creates an object, "bar", with the coefficients. But, I can't call predict on bar... -N On 9/21/09 7:58 PM, Debabrata Midya wrote: > Try t

[R] Pull Coefficients from MCMCpack models

2009-09-21 Thread Noah Silverman
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 the