Hello this is my first post it's due to a little stuck on a code that I'm writing.
I try to explain briefly the situation:
I have a dataset (composed of: name-year-return-deposit-work-money-term) which was splitted in two parts using my own criterion
gen midterm=1 if term>=3
replace midterm=0 if term<3
now my entire set is divided in two parts which has 1 and 0 as different value in midterm
After that i would like to create many new variable according to this criterion so i did:
gen hwork=work if midterm==1
gen lwork=work if midterm==0
gen hmoney=money if midterm==1
gen lmoney=money if midterm==0
gen hdeposit=deposit if midterm==1
gen ldeposit=deposit if midterm==0
at this point this variable are added to the (data editor) so they exist(i think?), and i want to make a test on them but i type:
test hwork+hmoney+hdeposit=0
and then...
hwork not found
r(111)
I swear that in the browse editor i'm able to see the variable created(hwork,lwork,hmoney,lmoney,hdeposit,ldeposi t) but i'm not able to recognize what kind of problem is due that stop in execution.
All that i want is to test the two subsample accordingly to their caracteristics in work money and deposit related to the variable midterm. What should i do to continue execution? and fix the "var not found" problem?
P.S: the variables contain about 3000 observations
Thank you all for your attention
Best Regards
Chris
I try to explain briefly the situation:
I have a dataset (composed of: name-year-return-deposit-work-money-term) which was splitted in two parts using my own criterion
gen midterm=1 if term>=3
replace midterm=0 if term<3
now my entire set is divided in two parts which has 1 and 0 as different value in midterm
After that i would like to create many new variable according to this criterion so i did:
gen hwork=work if midterm==1
gen lwork=work if midterm==0
gen hmoney=money if midterm==1
gen lmoney=money if midterm==0
gen hdeposit=deposit if midterm==1
gen ldeposit=deposit if midterm==0
at this point this variable are added to the (data editor) so they exist(i think?), and i want to make a test on them but i type:
test hwork+hmoney+hdeposit=0
and then...
hwork not found
r(111)
I swear that in the browse editor i'm able to see the variable created(hwork,lwork,hmoney,lmoney,hdeposit,ldeposi t) but i'm not able to recognize what kind of problem is due that stop in execution.
All that i want is to test the two subsample accordingly to their caracteristics in work money and deposit related to the variable midterm. What should i do to continue execution? and fix the "var not found" problem?
P.S: the variables contain about 3000 observations
Thank you all for your attention
Best Regards
Chris
Comment