BookmarkSubscribeRSS Feed
Stacy
Calcite | Level 5

How can I modify a data set by deleting the ith observation for every patient i.

Also,how can I build the model and output the estimated values, and save the predicted values of a variable belonging to an ith patient.

The question says dont use macro.

I have no idea on how to approach this.

It also says using cross validation method.

I attached an image of my data set

 

 

3 REPLIES 3
Reeza
Super User

https://video.sas.com/detail/video/4573016761001/filtering-a-sas-table-in-a-data-step?autoStart=true...

 

https://video.sas.com/detail/video/4414728579001/filter-and-sort-data?autoStart=true&q=filter

 

https://video.sas.com/detail/video/4664331677001/using-the-filter-data-task-in-sas-studio?autoStart=...

 

For simulations I highly recommend reading the paper, 

http://www.sascommunity.org/wiki/Don%27t_Be_Loopy:_Re-Sampling_and_Simulation_the_SAS%C2%AE_Way

 

And here is some instructions for turning a program into a macro:

https://github.com/statgeek/SAS-Tutorials/blob/master/Turning%20a%20program%20into%20a%20macro.md

 

This is homework, so I strongly suggest you make an attempt first at all of this, do you have the 'base case' built, ie your regression code? If not, the statistics e-course is free or UCLA has many tutorials on their page.

 

 


@Stacy wrote:

How can I modify a data set by deleting the ith observation for every patient i.

Also,how can I build the model and output the estimated values, and save the predicted values of a variable belonging to an ith patient.

The question says dont use macro.

I have no idea on how to approach this.

It also says using cross validation method.

I attached an image of my data set

 

 


 

Stacy
Calcite | Level 5

Here is my regression code

proc reg data=epilepsy;
   model rate = Age Treatment Period/ p MSE;
   output out = predicted p = yhat r = yresid;
run;
Reeza
Super User
I don't think you're intended to use that data set. You need to use the data that's been filtered and set out to once a week - ie the data from a previous step in your assignment.

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 757 views
  • 0 likes
  • 2 in conversation