Nargis Pervin
Nargis Pervin

Reputation: 13

Stata ambiguous abbreviation r(111)

I am trying to draw marginplot using stata12. I am running the following code:

margins, at(FuncVariant =(0(0.2) 1)) over(Platform)

Following is the error:

FuncVariant ambiguous abbreviation r(111);

I have the following variables like

FuncVariant :
FuncVariant 
FuncVariant_mean
FuncVariant_W

Is that creating a problem?

Upvotes: 1

Views: 15550

Answers (2)

Nargis Pervin
Nargis Pervin

Reputation: 13

d FuncVariant*

          storage  display     value

variable name   type   format      label      variable label
--------------------------------------------------------------------------------
FuncVariant     byte   %8.0g                  
FuncVariant_m~n float  %9.0g                  
FuncVariant_W   float  %9.0g   

I understood that FuncVariant is dummy variable, so instead I used FuncVariant_W, but it throws error

margins, at( FuncVariant_W =-1(0.2)1) over(Platform)
'FuncVariant_W' not found in list of covariates

For many other variables in the dataset it shows the same error, though the variables are present in the dataset.

Upvotes: 0

Fr.
Fr.

Reputation: 2895

Post the exact result of the following command to get a diagnosis of the issue in your data:

d FuncVariant*

To get rid of the issue, turn the Stata variable abbreviation setting permanently off:

set varabbrev off, perm

tl;dr: you probably don't have a FuncVariant variable in your data.

Upvotes: 1

Related Questions