@eee100 wrote:
Guys, I am seriously struggling programming, I am new to any computer programming and my professor has not been much help at all when it comes to teaching the course. I have attached the combined dataset and here are the questions i need help with. I cannot figure out what is wrong with my code because I do have to use the code she is asking for.
Q9. Use a single macro with two parameters to assess the correlation between mean fasting glucose and age, body composition, blood pressure and lipid concentrations a. Obtain unadjusted correlations between mean fasting plasma glucose and age, weight, weight at age of 20, percent weight change, waist to hip ratio, BMI, HDL cholesterol, total cholesterol, the ratio of total to HDL cholesterol (as a continuous variable), systolic blood pressure and diastolic blood pressure. b. Obtain age-adjusted correlation coefficients for the above-mentioned correlation tests (except for the correlation between mean fasting plasma glucose and age)
If those are examples of what the instructor is requiring, "use a single macro" for example, I suspect that you may have skipped a prerequisite. Macros are not beginning SAS code. Your SAS install should have included some online help. There are examples of many of the basic features of the procedures in the "Learning to Use SAS" section of the Contents tab as well as full syntax for the procedures either navigating the Contents or putting a search term like CORR in the Index or Search tabs. The procedure details will have worked examples with data sets and even explanations of what specific code does in many cases.
... View more