Hi all,
I read the syntax of regress and operators but still cannot find how to run a regression with a condition that: variable "INDC3" not equal to 'NA', 'UNCLS', 'UQEQS')
My original code below works well
My code below caused error:
The error is:
When I changed from "~=" TO "!=" , the same error popping up.
Can you please help me to adjust the code to run the regression where INDC3 not equal to "NA", "UNCLS" or "UQEQS"?
Update:
I changed from single quotation to double quotation (
)and it works, but I am not sure whether it is a proper fix?
I read the syntax of regress and operators but still cannot find how to run a regression with a condition that: variable "INDC3" not equal to 'NA', 'UNCLS', 'UQEQS')
My original code below works well
Code:
areg wINV_DAY pt wFIRM_SIZE LNGDP UNEMPLOYMENT INFLATION wTANGIBILITY i.yr , a(TYPE2)
Code:
areg wINV_DAY pt wFIRM_SIZE LNGDP UNEMPLOYMENT INFLATION wTANGIBILITY i.yr if (INDC3 ~=('NA', 'UNCLS', 'UQEQS')) , a(TYPE2)
Code:
'NA','UNCLS','UQEQS' invalid name r(198);
Can you please help me to adjust the code to run the regression where INDC3 not equal to "NA", "UNCLS" or "UQEQS"?
Update:
I changed from single quotation to double quotation (
HTML Code:
if (INDC3 ~=("NA", "UNCLS", "UQEQS"))
Comment