0% found this document useful (0 votes)
95 views12 pages

Sas Regression Code

This document contains analysis of a dataset examining the relationship between blood pressure (SBP and DBP) and drug dose. Regression models were created to model SBP and DBP as a function of both regular dose and log-transformed dose. The log-transformed dose was found to fit better for DBP, while regular dose fit better for SBP. A separate analysis of another dataset examined the relationship between blood pressure (pres) and another variable (bp) using regression and plotting.

Uploaded by

allswell
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
95 views12 pages

Sas Regression Code

This document contains analysis of a dataset examining the relationship between blood pressure (SBP and DBP) and drug dose. Regression models were created to model SBP and DBP as a function of both regular dose and log-transformed dose. The log-transformed dose was found to fit better for DBP, while regular dose fit better for SBP. A separate analysis of another dataset examined the relationship between blood pressure (pres) and another variable (bp) using regression and plotting.

Uploaded by

allswell
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

Allswell Akrong

Problem 5.8
data DOSE_RESPONSE;
INPUT DOSE SBP DBP;
DATALINES;
4 180 110
4 190 108
4 178 100
8 170 100
8 180 98
8 168 88
16 160 80
16 172 86
16 170 86
32 140 80
32 130 72
32 128 70
;
PROC REG DATA = dose_response;
MODEL SBP = DOSE;
RUN;
PROC REG DATA = dose_response;
MODEL DBP = DOSE;
RUN;

Allswell Akrong

SBP=189.76-1.72*DOSE

DBP=105.855-1.068*DOSE

Allswell Akrong
data DOSE_RESPONSE;
INPUT DOSE SBP DBP;
DATALINES;
4 180 110
4 190 108
4 178 100
8 170 100
8 180 98
8 168 88
16 160 80
16 172 86
16 170 86
32 140 80
32 130 72
32 128 70
;
PROC REG DATA = dose_response;
MODEL SBP = DOSE;
plot SBP * DOSE;
PLOT RESIDUAL. * DOSE;
RUN;
PROC REG DATA = dose_response;
MODEL DBP = DOSE;
plot DBP * DOSE;
PLOT RESIDUAL. * DOSE;
RUN;

Allswell Akrong

Allswell Akrong

Allswell Akrong
Problem 5.10
data DOSE_RESPONSE;
INPUT DOSE SBP DBP;
DOSELOG = LOG(DOSE);
DATALINES;
4 180 110
4 190 108
4 178 100
8 170 100
8 180 98
8 168 88
16 160 80
16 172 86
16 170 86
32 140 80
32 130 72
32 128 70
;
PROC REG DATA = dose_response;
MODEL SBP = DOSELOG;
plot SBP * DOSELOG;
PLOT RESIDUAL. * DOSELOG;
RUN;
PROC REG DATA = dose_response;
MODEL DBP = DOSELOG;
plot DBP * DOSELOG;
PLOT RESIDUAL. * DOSELOG;
RUN;

Allswell Akrong

SDP=218.2-22.409*DOSELOG

Allswell Akrong

DBP= 127.4-15.484*DOSELOG

Allswell Akrong

Allswell Akrong
The doselog fits better (linearly) for dbp compared to sbp. For, sbp the regular dose fits better than
doselog. For dbp, doselog fits better than regular dose.

Problem 3
data prob3;
infile "/home/allswell0/my_courses/alex3140/forbes.csv" dsd;
input obsnumber $ bp pres;
run;
proc print data=prob3;
run;
proc plot data=prob3;
plot pres*bp='x';
run;
proc reg data=prob3;
model pres=bp;
plot pres*bp;
run;

Allswell Akrong

PRES = -81.063 + .522 *BP

Allswell Akrong

You might also like