@mwhemke wrote:
Hello,
I just want some clarification for a homework question.
"Suppose a multi-site study will be conducted across 40 study sites. Write a DATA step which creates a data set named ‘SiteInfo’ and contains a single variable named ‘SiteID’ which contains values from 1 to 40 inclusive. Hint: Use a DO loop!"
Specifically, if the values are to be 1 to 40 inclusive, what does that wording mean?
Thank you.
Feeling a bit obnoxious this morning so: [1,40]
Mathematicians use different symbols for intervals with the [ and ] mean "include the end point on that side". As opposed to ( and ) which mean "include values up to but not actually equal to" the value: (1,40] would exclude 1 but include 40 for example. This is bit more precise and much shorter than the narrative.
Hint the second: and an Output statement.
From a specification aspect I would request clarification if the values should be character or numeric. Identifiers often should not be numeric if you are not going to do arithmetic with them. The difference is somewhat important when you have multiple anything. If one site records the data as character and another as numeric you will find you have issues with combining the data later. So specify first, code second.