Hello all,

I am relatively new to R and Rpy and have a question about obtaining
the covariance matrix after doing a glm estimation so that I can get
the standard errors.  I'm sure I'm missing something simple, but I
haven't been able to find a solution searching the web or the ML
archives.

I have y and x which are two numpy arrays.  y is a binary response
variable and x contains my regressors plus a prepended column of ones.
 I estimate the model as follows which goes fine.

from rpy import r
des_cols = ['x.%d' % (i+1) for i in range(x.shape[1])]
formula = r('y~%s-1' % '+'.join(des_cols))
frame = r.data_frame(y=y, x=x)
results = r.glm(formula, data=frame, family='binomial')

results['coefficients'] is as expected judging from other software, so
I assume this was all done correctly.

I searched and found out that I should be able to obtain the
covariance matrix with

r.vcov[results]

But when I try this command I receive the following error

RPy_RException: Error in UseMethod("vcov") : no applicable method for "vcov"

Any ideas?

Cheers,

Skipper

------------------------------------------------------------------------------
_______________________________________________
rpy-list mailing list
rpy-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rpy-list

Reply via email to