Hi, I would like to extract the coefficients of a logistic regression (estimates and standard error as well) in lrm as in glm with summary(fit.glm)$coef Thanks David
well, you can directly use the coef() and vcov() generics, e.g., library(rms) y <- rbinom(100, 1, 0.5) x <- runif(100, -3, 3) Fit <- lrm(y ~ x) Fit coef(Fit) sqrt(diag(vcov(Fit))) I hope it helps. Best, Dimitris On 8/11/2010 12:56 PM, david dav wrote:> Hi, > I would like to extract the coefficients of a logistic regression > (estimates and standard error as well) in lrm as in glm with > > summary(fit.glm)$coef > > Thanks > David > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >-- Dimitris Rizopoulos Assistant Professor Department of Biostatistics Erasmus University Medical Center Address: PO Box 2040, 3000 CA Rotterdam, the Netherlands Tel: +31/(0)10/7043478 Fax: +31/(0)10/7043014
On Aug 11, 2010, at 6:56 AM, david dav wrote:> Hi, > I would like to extract the coefficients of a logistic regression > (estimates and standard error as well) in lrm as in glm with > > summary(fit.glm)$coef >?coef Try instead: coef(fit.glm) ?vcov The accessor function for the covariance matrix is vcov, so se's for Wald-type tests can be derived: diag( vcov(fit.glm) )^0.5 # or sqrt(diag( vcov(fit.glm)) -- David Winsemius, MD West Hartford, CT
On Wed, 11 Aug 2010, david dav wrote:> Hi, > I would like to extract the coefficients of a logistic regression > (estimates and standard error as well) in lrm as in glm with > > summary(fit.glm)$coef > > Thanks > Davidcoef(fit) sqrt(diag(vcov(fit))) But these will not be very helpful except in the trivial case where everything is linear, nothing interacts, and factors have two levels. Frank
Reasonably Related Threads
- glmer -- extracting standard errors and other statistics
- difference between MASS::polr() and Design::lrm()
- Obtaining p-values for coefficients from LRM function (package Design) - plaintext
- Calculating/understanding variance-covariance matrix of logistic regression (lrm $var)
- trying to use standard notation