# Note 1 - 52.83-7.855 7.02e-07-Signif codes 0 0.001 0.01...

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

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
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

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern