I'm still confused about changing education (edu) and caregiver education (cg_edu) variable in number of years from character to numeric value. The data set I was given was in SPSS. I imported it as SAS. When I run a proc means on edu, I receive the following error:
ERROR: Variable edu in list does not match type prescribed for this list.
ERROR: Variable cg_edu in list does not match type prescribed for this list.
From watching SAS videos and reading SAS how to and some earlier responses to me in SAS communities, I know there is a way to use an input or put statement. I cannot figure out how to apply this with my data.
When I run a proc contents:
edu is listed as a character value, Len = 2 and Format = $2.
cg_edu is listed as a character value, Len = 12 Format = F12.
I'm not sure what format to put in the INPUT statement for edu and cg_edu.
Data Sunday;
Set Monday;
edu_numeric = INPUT (edu, format?);
cg_edu_numeric = INPUT (cg_edu, format?);
Run;