| To: | Steve Sullivan <ssullivan@qedgroupllc.com> |
|---|---|
| Subject: | Re: extracting rows of $coefficients by variable name? |
| From: | Spencer Graves <spencer.graves@PDF.COM> |
| Date: | Fri, 23 May 2003 08:04:50 -0700 |
| Cc: | s-news@lists.biostat.wustl.edu |
| References: | <D4C203B93FEDF04CA2B493EB08F2E431030514@qeds001.hq.wash.qedgroupllc> |
| User-agent: | Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.2) Gecko/20030208 Netscape/7.02 |
> dat <- data.frame(x = 1:5, y = rnorm(5))
> fit <- lm(y ~ x, dat)
> sumFit <- summary(fit)$coefficients
> sumFit
Value Std. Error t value Pr(>|t|)
(Intercept) -0.1305024 0.4230274 -0.3084962 0.777886
x -0.1890876 0.1275476 -1.4824866 0.234830
hth. spencer graves
Steve Sullivan wrote:
Is there a handy way to extract information from a summarized lm or glm object?s $coefficients by variable name? I want to pull out only the coefficient estimate, SE, t-value and p-value for a particular variable (my treatment indicator).Thanks in advance, STSSteven Sullivan, Ph.D. Senior Associate The QED Group, LLC 1250 Eye St. NW, Suite 802 Washington, DC 20005 ssullivan@qedgroupllc.com 202.898.1910.x15 (v) 202.898.0887 (f) 202.421.8161 (m) |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | extracting rows of $coefficients by variable name?, Steve Sullivan |
|---|---|
| Next by Date: | Re: extracting rows of $coefficients by variable name?, Chuck Cleland |
| Previous by Thread: | extracting rows of $coefficients by variable name?, Steve Sullivan |
| Next by Thread: | Re: extracting rows of $coefficients by variable name?, Chuck Cleland |
| Indexes: | [Date] [Thread] [Top] [All Lists] |