how do i create new dataset in SAS which includes one record pertime point for each subject?

how do i create new dataset in SAS which includes one record pertime point for each subject?
how do i create new dataset in SAS which includes one record pertime point for each subject?

Open in new window

craig1899Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Kumar1505Commented:
Can you elborate the question, if possible with example?

Regards
Kumar
0
craig1899Author Commented:
i  have subjects whose hemodynamic variables, bp, heart rate,at rest and active,this is  recorded four excel spreadsheets namely baseline ,at threemonths. then at five months,and whether they attain   a desired endpoint.
now i need to firstly transfer multiple sheets toone  SAS dataset, and merge the four tables into one dataset then  create a new dataset which includes one record per time point for each of these subjects. what are the code/datasteps for this instruction?
0
wigmeisterCommented:
Is there only one time point for each subject in each of the excel spreadsheets or can there be multiple time points per spreadsheet?  Are you time points baseline, 3 months, 5 months, and endpoint?
0
craig1899Author Commented:
Yes my time points are baseline, three months, 5 years, and endpoint?
there is only one time point for each subject in each excel spreadsheet'
many thanks.

0
wigmeisterCommented:
If I understand correctly, then if a subject was in all four excel datasets, you would want four records in your final dataset, one for each time point.

I'm assuming that all of your questions on EE are related, so using the info on one of the other questions to read in your excel spreadsheets, you will have four SAS datasets, say test1, test2, test3, test4.  Make sure that the variable names on all four datasets are the same when you read in the excel spreadsheets.

To put them all together in sorted order, for instance SubjectID, you would do the following:
Proc sort data=test1;
by SubjectID;
run;
**do the same for test2,3,4

Data Final;
  Set test1 test2 test3 test4;
by SubjectID;
run;

This would give you one dataset (Final) that has one subject per time point grouped together by SubjectID.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Databases

From novice to tech pro — start learning today.