Hi Everyone,
I'm running a linear regression and currently trying to figure out how to properly structure my data set. change_in_value is the dependent variable. All variables before are independent variables. weight and bmi are the only continuous IV's, while the rest are discrete. My goal is to run a regression using each IV in a separate regression model for now.
data have;
input gender race education employment marriage income weight bmi change_in_value;
datalines;
0 1 1 1 0 1 120 25.4 -10
0 1 2 1 0 1 110 23 -5
0 1 2 1 0 1 115 23.5 -7
0 1 3 1 0 1 140 25 5
1 2 3 1 0 2 185 28 -12.5
1 2 2 0 0 2 160 26.5 -14
1 2 2 0 0 2 150 26 -10
1 3 1 0 1 2 140 25.5 5
1 3 4 0 1 3 165 26.5 7
0 4 4 0 1 3 185 27.5 9
0 4 5 1 1 4 195 29 12
0 5 5 1 0 4 205 29.5 -15
;
run;
Gender and employment are simple binary 0/1 variables, which is simple for this process. My main concern is variables such as race that have many levels (5). I understand that a linear regression requires dummy variables to be made, however I am unclear how to do that in SAS, and how to structure dummy variables in general.
If anyone could help me that would be wonderful, thank you!