[R] penalized package for ridge regression
Gavin Simpson
gavin.simpson at ucl.ac.uk
Tue Feb 23 10:02:27 CET 2010
On Tue, 2010-02-16 at 11:58 +0100, linda garcia wrote:
> Dear all,
> I am using "penalized" package for "Ridge" regression. I do
> not know how can I get regression coefficients using that package . Please
> help me.
>
> Thanks
Did you read the package help or the vignette provided by the package
author? The answer is stated repeatedly there, esp in the vignette.
There is a coefficients method (abbreviated to coef ), which is a
standard extractor function for S/R models.
So if your penalized model is in object mod
coef(mod)
Should get you the coefficients.
HTH
G
--
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
Dr. Gavin Simpson [t] +44 (0)20 7679 0522
ECRC, UCL Geography, [f] +44 (0)20 7679 0565
Pearson Building, [e] gavin.simpsonATNOSPAMucl.ac.uk
Gower Street, London [w] http://www.ucl.ac.uk/~ucfagls/
UK. WC1E 6BT. [w] http://www.freshwaters.org.uk
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
More information about the R-help
mailing list