Note 1 - 52.83-7.855 7.02e-07 ***---Signif. codes: 0 ***...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Stats for Clinical Trials, Math 150 Jo Hardin Linear Regression example # 1 Brent et al. (1999) measured baseline plasma glycolate and arterial pH on 18 patients admitted for ethylene glycol poisoning (ethylene glycol is a colorless, odorless, sweet-tasting chemical found in many household products, including antifreeze, detergents, paints, and cosmetics). > ethpois.dat <- read.table("poison.csv", header=T, sep=",") > attach(ethpois.dat) > names(ethpois.dat) [1] "glyco" "ph" > plot(ph,glyco, xlab="Arterial pH", ylab="Plasma Glycolate (mg/dl)", main="ethlyene glycol poisoning", pch=18) To create a linear model, we use the lm command: > pois.reg <- lm(glyco ~ ph) Residuals: Min 1Q Median 3Q Max -59.953 -29.463 -2.525 28.045 60.341 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 3082.58 381.02 8.090 4.79e-07 *** ph -414.97
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 52.83-7.855 7.02e-07 ***---Signif. codes: 0 *** 0.001 ** 0.01 * 0.05 . 0.1 1 Residual standard error: 37.69 on 16 degrees of freedom Multiple R-squared: 0.7941, Adjusted R-squared: 0.7812 F-statistic: 61.7 on 1 and 16 DF, p-value: 7.023e-07 > resid(pois.reg) # to get the residual values > fitted(pois.reg) # to get the predicted values > abline(pois.reg) # to add the regression line to your plot > plot(pois.reg, resid(pois.reg), xlab="Plasma Glycolate (mg/dl)", ylab="lm residuals", main="residuals, ethlyene glycol poisoning", pch=18) > abline(h=0) 6.9 7.0 7.1 7.2 7.3 7.4 50 100 150 200 250 ethlyene glycol poisoning Arterial pH Plasma Glycolate (mg/dl) 50 100 150 200 250-60-40-20 20 40 60 residuals, ethlyene glycol poisoning Plasma Glycolate (mg/dl) lm residuals 1...
View Full Document

This note was uploaded on 02/17/2012 for the course MATH 151 taught by Professor Jo.h during the Fall '10 term at Pomona College.

Ask a homework question - tutors are online