BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
smart
Fluorite | Level 6

 

Hello. I really need help with this task that I have been given for SAS studio. I only have the start of the code:

 

data Depression;
infile '/courses/ddb976e5ba27fe300/NHANES 2013_2014';

 

I would be eternally grateful if someone helped me. I have no idea what to do next for this code. I don't even understand what variables I need to use. I would appreciate any help at all that helps point me in the right direction! The prompt for my task is below:

 

Create a temporary data set called Depression that reads the dpq_h_errors SAS data set and changes all impossible values in the depression variables to missing. The dpq_h_errors data set is stored in the /courses/ddb976e5ba27fe300/NHANES 2013_2014 folder.

 

The possible values are listed for each variable at:

https://wwwn.cdc.gov/Nchs/Nhanes/2013-2014/DPQ_H.htm

1 ACCEPTED SOLUTION

Accepted Solutions
Astounding
PROC Star

You're definitely off track here.  The code that you have written so far would not locate an existing SAS data set.  Here's a better start:

 

libname in '/courses/ddb976e5ba27fe300/NHANES 2013_2014';

 

proc contents data=in.dpq_h_errors;

run;

proc print data=in.dpq_h_errors (obs=10);

run;

 

That's the way to locate an existing data set, and to get an initial idea of what is in it.

 

If this program doesn't work, it's because the path to the folder that holds the data isn't quite right.  You would need to find the proper folder in that case.

View solution in original post

2 REPLIES 2
Astounding
PROC Star

You're definitely off track here.  The code that you have written so far would not locate an existing SAS data set.  Here's a better start:

 

libname in '/courses/ddb976e5ba27fe300/NHANES 2013_2014';

 

proc contents data=in.dpq_h_errors;

run;

proc print data=in.dpq_h_errors (obs=10);

run;

 

That's the way to locate an existing data set, and to get an initial idea of what is in it.

 

If this program doesn't work, it's because the path to the folder that holds the data isn't quite right.  You would need to find the proper folder in that case.

smart
Fluorite | Level 6

Thank you!!

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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
  • 2 replies
  • 960 views
  • 3 likes
  • 2 in conversation