BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
Dianasoria
Calcite | Level 5

Hello! 

I am running a linear regression model in SAS 9.4 for UNIX using the following code: 

 

data n2_mc_cog_a;
set n2_mc_cog;
if mr93oc5f ne .;
run;

%macro explore (dep=, indep=) ;
proc reg data=n2_mc_cog_a;
**base model-MAIN;
model &dep=&indep age93 agecog raced1 /clb ; 

%mend explore ;

%explore (dep= outcome1, indep= mr93c4d2 mr93c4d3 mr93c4d4) ;
%explore (dep=outcome2, indep= mr93c4d2 mr93c4d3 mr93c4d4) ;
%explore (dep=outcome3, indep= mr93c4d2 mr93c4d3 mr93c4d4) ;

 

I keep getting the following warning 

13864⚠️ The variable _NAME_ or _TYPE_ exists in a data set that is not TYPE=CORR, COV, SSCP, etc. 

Can anyone help me get rid of the warning?

 

Thank you!

1 ACCEPTED SOLUTION

Accepted Solutions
Rick_SAS
SAS Super FREQ

Apparently, your input data set contains a variable that has a special name that SAS uses for special purposes. You can use PROC CONTENTS to figure out which variable names you have:

proc contents data=n2_mc_cog_a short varnum;
run;

Since the variable is not important in the regression, you can DROP it from the analysis, like so:

 

data n2_mc_cog_a;
set n2_mc_cog;
if mr93oc5f ne .;
drop _NAME_ _TYPE_;  /* probably only need one of these variable names */
run;

View solution in original post

4 REPLIES 4
data_null__
Jade | Level 19

Does data set "n2_mc_cog" have a variable _TYPE_ or _NAME_.  You could rename or drop.

 


@Dianasoria wrote:

Hello! 

I am running a linear regression model in SAS 9.4 for UNIX using the following code: 

 

data n2_mc_cog_a;
set n2_mc_cog;
if mr93oc5f ne .;
run;

%macro explore (dep=, indep=) ;
proc reg data=n2_mc_cog_a;
**base model-MAIN;
model &dep=&indep age93 agecog raced1 /clb ; 

%mend explore ;

%explore (dep= outcome1, indep= mr93c4d2 mr93c4d3 mr93c4d4) ;
%explore (dep=outcome2, indep= mr93c4d2 mr93c4d3 mr93c4d4) ;
%explore (dep=outcome3, indep= mr93c4d2 mr93c4d3 mr93c4d4) ;

 

I keep getting the following warning 

13864⚠️ The variable _NAME_ or _TYPE_ exists in a data set that is not TYPE=CORR, COV, SSCP, etc. 

Can anyone help me get rid of the warning?

 

Thank you!


 

Dianasoria
Calcite | Level 5

Thank you! I identified the variable causing the problem and dropped it

Rick_SAS
SAS Super FREQ

Apparently, your input data set contains a variable that has a special name that SAS uses for special purposes. You can use PROC CONTENTS to figure out which variable names you have:

proc contents data=n2_mc_cog_a short varnum;
run;

Since the variable is not important in the regression, you can DROP it from the analysis, like so:

 

data n2_mc_cog_a;
set n2_mc_cog;
if mr93oc5f ne .;
drop _NAME_ _TYPE_;  /* probably only need one of these variable names */
run;
Dianasoria
Calcite | Level 5

Thank you, Rick. 

This step helped me to identify the variable causing the problem. I dropped the variable and I no longer get the warning.

proc contents data=n2_mc_cog_a short varnum;
run;

 

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 4 replies
  • 641 views
  • 0 likes
  • 3 in conversation