Variable Make in list does not match type prescribed for this list

Reply
New Contributor
Posts: 3

Variable Make in list does not match type prescribed for this list

I am trying to run a regeression program on sashelp.car using KEEP statement and here is the code that I used;

 

data auto;
set sashelp.cars;
keep make model MSRP;
run;
proc reg data=auto;
model MSRP=make model;
run;

and the log is;

 

 
1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
72
73 proc reg data=auto;
74 model MSRP=make model;
ERROR: Variable Make in list does not match type prescribed for this list.
ERROR: Variable Model in list does not match type prescribed for this list.
NOTE: The previous statement has been deleted.
75 run;
 
WARNING: No variables specified for an SSCP matrix. Execution terminating.
NOTE: PROCEDURE REG used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
 
 
76
77
78 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
91
 
while the error message is '
ERROR: Variable Make in list does not match type prescribed for this list.
ERROR: Variable Model in list does not match type prescribed for this list.'
Super User
Posts: 21,527

Re: Variable Make in list does not match type prescribed for this list

Posted in reply to bioresearch

Make and Model are character variables/categorical variables. 

 

You can use them in PROC GLM if that's the model you're trying to build. Also, you don't necessarily need to subset your data ahead of time, you can use the KEEP data set option. 

 

proc glm data=sashelp.cars (keep = msrp make model);
class make model;
model msrp = make model;
run;

PS. This doesn't make logical sense, but I'm assuming you're just trying things. FYI - the first e-course on Statistics and SAS is free. 

 


bioresearch wrote:

I am trying to run a regeression program on sashelp.car using KEEP statement and here is the code that I used;

 

data auto;
set sashelp.cars;
keep make model MSRP;
run;
proc reg data=auto;
model MSRP=make model;
run;

and the log is;

 

 
1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
72
73 proc reg data=auto;
74 model MSRP=make model;
ERROR: Variable Make in list does not match type prescribed for this list.
ERROR: Variable Model in list does not match type prescribed for this list.
NOTE: The previous statement has been deleted.
75 run;
 
WARNING: No variables specified for an SSCP matrix. Execution terminating.
NOTE: PROCEDURE REG used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
 
 
76
77
78 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
91
 
while the error message is '
ERROR: Variable Make in list does not match type prescribed for this list.
ERROR: Variable Model in list does not match type prescribed for this list.'

 

New Contributor
Posts: 3

Re: Variable Make in list does not match type prescribed for this list

This actually produced a valid statement but did not give me what I intended to bring out of the output.

 

Therefore, I need more solutions.

 

Thanks very much.

Super User
Posts: 21,527

Re: Variable Make in list does not match type prescribed for this list

Posted in reply to bioresearch

bioresearch wrote:

This actually produced a valid statement but did not give me what I intended to bring out of the output.

 

Therefore, I need more solutions.

 

Thanks very much.


How are we suppose to know your 'intentions'? 

 

 

New Contributor
Posts: 3

Re: Variable Make in list does not match type prescribed for this list

What I want is to run a regression analysis of that data.

##- Please type your reply above this line. No attachm Ients. -##
Super User
Posts: 21,527

Re: Variable Make in list does not match type prescribed for this list

Posted in reply to bioresearch

'regression analysis' is vague. Are you looking to run a linear or logistic regression model? What's your independent variable? What's your dependent variable? Running a linear regression analysis with only two categorical variables doesn't make a heck of a lot of sense in practical terms. 

 

 


bioresearch wrote:
What I want is to run a regression analysis of that data.

##- Please type your reply above this line. No attachm Ients. -##



Contributor
Posts: 26

Re: Variable Make in list does not match type prescribed for this list

Posted in reply to bioresearch

seems as though you are trying to do linear regression with Character predictors.  try this example for a linear regression with continuous factors:

 

data auto;
set sashelp.cars;
/*keep make model MSRP;*/
run;

proc reg data=auto;
model MSRP=EngineSize Cylinders;
run;

 

Ask a Question
Discussion stats
  • 6 replies
  • 158 views
  • 5 likes
  • 3 in conversation