Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

SAS code and format? DATA=final.cocaine_relapse PROC SQL; SELECT COUNT(*) AS AtRiskWeek6 FROM final.cocaine_relapse WHERE week = 6; QUIT; PROC LIFETEST DATA=final.cocaine_relapse METHOD=KM; TIME week*relapse(0); RUN;

SAS code and format? DATA=final.cocaine_relapse

PROC SQL; SELECT COUNT(*) AS AtRiskWeek6 FROM final.cocaine_relapse WHERE week = 6; QUIT;

PROC LIFETEST DATA=final.cocaine_relapse METHOD=KM; TIME week*relapse(0); RUN;

/* Print the first few rows of the data */ PROC PRINT DATA=final.cocaine_relapse (OBS=5); RUN;

/* Construct a life table using PROC LIFETEST */ PROC LIFETEST DATA=final.cocaine_relapse METHOD=KM PLOTS=(S) TIME=week*relapse(0) OUTSURV=work.lifetable; RUN;

/* Print the life table */ PROC PRINT DATA=final.lifetable; RUN;

/* Calculate the number of individuals at risk, relapsed, and censored at week 6 */ DATA week6; SET final.cocaine_relapse; IF week = 6 THEN OUTPUT; RUN;

PROC FREQ DATA=week6; TABLES relapse / OUT=FreqOut; RUN;

PROC PRINT DATA=FreqOut; RUN;

/* Calculate the proportion of individuals relapsed at week 6 */ PROC MEANS DATA=week6 MEAN; VAR relapse; RUN;

image text in transcribed
\f

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Applied Linear Algebra

Authors: Peter J. Olver, Cheri Shakiban

1st edition

131473824, 978-0131473829

More Books

Students also viewed these Mathematics questions

Question

Identify the various high-tech industry issues present

Answered: 1 week ago