Question
program the following using SAS. Dataset epilepsy.txt from Blackboard is recorded in the short form, where data from each time point have its own column
program the following using SAS.
Dataset epilepsy.txt from Blackboard is recorded in the short form, where data from each time point have its own column given ID and Treatment.
1) Import the epilepsy data set
2) Convert it into long format using DATA steps
3) Since the baseline is an 8-week seizure count and the rest are 2-week counts, convert all seizure counts into weekly rate
4) Run a regression model, PROC REG, with Treatment and Time as predictors*
5) Output the original, yi, and estimated counts, ???? ?, for each observation 6) Calculate the residual sum of squares (RSS = ? (???? ? ???? ?n i=1 )^2 ) *Due to the repeated measurement and the type of response, the proper model would be more complicated than basic linear regression but here we would ignore that since the purpose of this project is to practice Part II: RSS is a good measurement to evaluate the fitness of the model but to test the predictive ability of our model, we can use cross-validation method since its not appropriate to use the data which model is built on to test the model. For each patient i,
1) Modify the original data, by deleting the values of counts belonging to the ith patient of the data set
2) Run the model and output the estimated values, and save the values of counts belonging to the ith patient
3) Create a %macro to do (1) and (2), and use %do loop to repeat these steps for each patient and at end, create a data set containing all estimated values by concatenating
4) Calculate RSS Print the data sets containing the original and the estimated counts and show RSS for both parts. As usual, comment each command you use.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started