2023年lab5.pdf
《2023年lab5.pdf》由会员分享,可在线阅读,更多相关《2023年lab5.pdf(7页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、 l a b 5 精品好文档,推荐学习交流 仅供学习与交流,如有侵权请联系网站删除 谢谢6 Topics:proc reg,proc logistic,proc genmod Text reference:Online documentation Lab exercise due Apr 24,2007 by 5:00 p.m.Today we will look at some modeling procedures in SAS.The materials you will need are in lab5.zip.Download and extract all the datasets
2、.Turn in the requested material in bolded italics.Create a libname to point to the location where you stored the data.For example:libname lab4“I:sascourselab4”;Part A:The REG procedure.Treadmill stress tests were administered to patients with angina pectoris before and 4 weeks after once-daily dosin
3、g with an experimental anti-angina medication.The investigator wanted to know if the improvement in exercise duration is related to the patients disease histor y.Disease duration since initial diagnoses(in years)is stored in the variable duration and percent-improvement in treadmill walking times is
4、 stored in the variable improvement.Both variables are in the dataset angina.We wish to discover if there is a significant linear relationship between improvement on medication and disease duration.a.First print the angina dataset to see what the data looks like,and then performing a simple linear r
5、egression using improvement as the outcome(dependent)variable and duration as the regressor(independent)variable.proc print data=_;run;proc reg data=_;model _;run;Next let s add a plot statement to the regression showing the outcome,predicted outcome,the lower 95%confidence level of mean predicted o
6、utcome and the upper 95%confidence of mean predicted outcome on the y-axis and duration on the x-axis.plot(_)_/overlay;run;b.This plot does not look very good.It would be nice to have some more control over the plot.In order to do this we will request proc reg to produce an output dataset containing
7、 the information we need and then make the appropriate plot using the proc gplot 荐学习交流仅供学习与交流如有侵权请联系网站删除谢谢精品好文档推荐学习交流仅供学习与交流如有侵权请联系网精品好文档,推荐学习交流 仅供学习与交流,如有侵权请联系网站删除 谢谢6 procedure.Lets call the output dataset RegResults.output out=_ p=p uclm=uclm lclm=_;run;quit;And now for the plot:goptions reset=al
8、l;proc gplot data=_;symbol1 v=dot c=blue;symbol2 v=none i=join c=red;symbol3 v=none i=join c=green line=2 repeat=2;plot(_)_/overlay haxis=0 to 7;run;quit;From the output,would you say there was a statistically significant linear relationship between outcome and duration at the 1%level?For each year
9、increase in duration,by how much would you expect the outcome to decrease?Label your answer“Part A”;Part B:More on proc reg.A study was conducted to determine the degree of recovery that takes place 90 minutes following treatment of 36 children diagnosed at a clinic with moderate to severe dehydrati
10、on.Upon diagnosis and study entry,patients were treated with an electrolytic solution at various dose levels(0,0.5,1.0,1.5,2.0,2.5,3.0 mEq/l)in a frozen,flavored,ice popsicle.The degree of rehydration was determined by using a subjective scale based on physical examination and parental input.These s
11、cores were converted to a 0 to 100 point scale,representing the percent of recovery.These data,together with the childs age and weig ht are given in the dataset dehyd.First print the dataset to take a look at the variables.The recovery variable is going to serve as our outcome variable here.Run a si
12、ngle regression model using dose,age and wt as regressors.What is the probability associated with the test that the parameters associated with the three regressors(dose,age and wt)are simultaneously zero?Are all three variables statistically significant?Add the keyword“corr”to the proc reg statement
13、 to see the correlation str ucture between the variables and add the options“SS1”and“SS2”to the model statement to request the type-1 and type-2 sum of squares.What do you notice about the correlations?荐学习交流仅供学习与交流如有侵权请联系网站删除谢谢精品好文档推荐学习交流仅供学习与交流如有侵权请联系网精品好文档,推荐学习交流 仅供学习与交流,如有侵权请联系网站删除 谢谢6 Along with
14、 the model you have run above,run three more models on the data.1.using dose only as a regressor 2.using dose and age as a regressor 3.using dose and wt as a regressor.If you had to choose a best model among the four,which one would you choose and why?Label your answers from this section“Part B”.Par
15、t C:Logistic Regression One hundred and two patients with acute myelogenous leukemia(AML)in remission were enrolled in a study of a new antisense oligonucleotide(asODN).The patients were randomly assigned to receive a 10-day infusion of asODN or no treatment(control),and the subjects were followed f
16、or 90 days.In the AML dataset you will find the response variable called outcome,with outcome=1 indicating relapse,death,or major intervention,such as bone marrow transplant before 90 days.The treatment variable,trt,is 1 if the patient received asODN and 0 if the patient was a control.a.Create a for
17、mat for the outcome variable and the treatment variable(trt).proc format;value outcome _ _;value trt _ _;run;Using a data step attach the appropriate format to the variables and create labels for the two variables.data aml;set _;label trt=_ outcome=_;format _;run;Now lets do a logistic regression wi
18、th outcome as the response variable and trt as the independent variable.One way to do this is to use proc freq.In the 2 by 2 table created by proc freq you want the treatment variable to go down the side and outcome to go across the top.proc freq data=_;tables _*_/chisq relrisk;run;荐学习交流仅供学习与交流如有侵权请
19、联系网站删除谢谢精品好文档推荐学习交流仅供学习与交流如有侵权请联系网精品好文档,推荐学习交流 仅供学习与交流,如有侵权请联系网站删除 谢谢6 From the output,what is the likelihood ratio chi-square statistic for the test that there is no association between table rows,and what is the probability associated with this test?What is the relative risk for the outcome given
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 2023 lab5
限制150内