DATA Step, Macro, Functions and more

Question about file structure

Accepted Solution Solved
Reply
Frequent Contributor
Posts: 131
Accepted Solution

Question about file structure

[ Edited ]

Hi there -- Though this is less a SAS specific question and more a general clarification question, I'm wondering if someone would have feedback/suggestions: to report on the percent of, say, schools which fall under some list of conditions, is it necessary to have a school-level file?

 

I’m asking since I see the file I have is a food-level file, where isn't even one food item per record (instead, each food item can be listed more than 100 times). Additionally, the variable for unique school ID's reports frequencies of up to 300-400. Given the current interim file structure, I’m wondering whether the most desirable thing is to convert the food-level file to a school-level one or if there is an alternative. What approach could one take to report percent of schools which offer one food item (example)?

 

please let me know if i should clarify or if there s a better space for a question like this

Thank you in advance!

 

 

 


Accepted Solutions
Solution
‎01-26-2016 09:43 AM
Super User
Posts: 5,434

Re: Question about file structure

Posted in reply to Maisha_Huq

Since this is some kind of data modelling issue, the Data management community might be the most suitable place.

 

Even if I try to picture your "have" data, it would be great to post some sample data that represents the data that you have. This will increase the chance to get a relevant answer.

Data never sleeps

View solution in original post


All Replies
Frequent Contributor
Posts: 95

Re: Question about file structure

Posted in reply to Maisha_Huq

You could try using PROC FREQ to give you a "feel" for the data.

 

Have a look at http://www2.sas.com/proceedings/sugi25/25/btu/25p069.pdf

 

It shouldn't be necessary to create a separate file.

 

Norman.

Norman.
SAS 9.4 (TS1M4) X64_7PRO WIN 6.1.7601 Service Pack 1 Workstation

Solution
‎01-26-2016 09:43 AM
Super User
Posts: 5,434

Re: Question about file structure

Posted in reply to Maisha_Huq

Since this is some kind of data modelling issue, the Data management community might be the most suitable place.

 

Even if I try to picture your "have" data, it would be great to post some sample data that represents the data that you have. This will increase the chance to get a relevant answer.

Data never sleeps
Super User
Posts: 19,850

Re: Question about file structure

Posted in reply to Maisha_Huq

That depends on your question and scope of analysis. If you do aggregate your data, make sure your summaries make sense. You may also want to determine why there are multiple records per school food, is it actually at a student level perhaps?

 


Maisha_Huq wrote:

 

 isn't even one food item per record (instead, each food item can be listed more than 100 times). Additionally, the variable for unique school ID's reports frequencies of up to 300-400. G

 

 

 


 

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 3 replies
  • 234 views
  • 1 like
  • 4 in conversation