Good morning, I am now doing a do_file but I noticed that if I run the whole do file I get different(and wrong) results than if I instead run differently 2 parts divided by a clear all. Anyone knows why?
this are my command:
use "C:\Users\tomma\OneDrive\Desktop\s1_1.dta"
merge m:m hhcode using "C:\Users\tomma\OneDrive\Desktop\S9_1.dta", nogenerate
preserve
drop if age_y<5
drop if educ>14
drop if s9_1q1 !=1
oneway educ s9_1q2, scheffe
restore
merge m:m hhcode using "C:\Users\tomma\OneDrive\Desktop\s2_a.dta", nogenerate
preserve
drop if s2q5 != 2
drop if s9_1q1 != 1
drop if s2q10>14
oneway s2q10 s9_1q2, scheffe
restore
preserve
drop if s2q5 != 1
drop if s9_1q1 != 1
drop if s2q14>14
oneway s2q14 s9_1q2, scheffe
restore
merge m:m hhcode using "C:\Users\tomma\OneDrive\Desktop\s2_B.dta", nogenerate
drop if s2q5 != 1
drop if s9_1q1 != 1
drop if s2q24 >14
oneway s2q24 s9_1q2, scheffe
clear all
use "C:\Users\tomma\OneDrive\Desktop\s1_1.dta"
merge m:m hhcode using "C:\Users\tomma\OneDrive\Desktop\S9_1.dta", nogenerate
drop if age_y<5
drop if s9_1q1 != 1
drop if educ>14
preserve
drop if sex!=1
oneway educ s9_1q2, scheffe
restore
drop if sex != 2
oneway educ s9_1q2, scheffe
clear all
*here is where I divide the 2 parts"
use "C:\Users\tomma\OneDrive\Desktop\s1_1.dta"
merge m:m hhcode using "C:\Users\tomma\OneDrive\Desktop\S9_1.dta", nogenerate
merge m:m hhcode using "C:\Users\tomma\OneDrive\Desktop\S5_1_a.dta", nogenerate
merge m:m hhcode using "C:\Users\tomma\OneDrive\Desktop\S5_1_b.dta", nogenerate
merge m:m hhcode using "C:\Users\tomma\OneDrive\Desktop\s8_1.dta", nogenerate
drop if s9_1q1 !=1
drop if educ>14
gen dummy_participation = 1 if s9_1q2 == 2
replace dummy_participation = 0 if s9_1q2==1
regr educ dummy_participation s5_1q2 s5_1q3
regr educ dummy_participation s5_1q14 s5_1q15
regr educ dummy_participation s8_1q3 s8_1q4
Hope someone can help me. Thanks in advance
Related Posts with Clear all command
AVAR package problemHello, when I use eventstudyinteract I get the following message: struct ms_vcvorthog undefined (4…
Stacked bar graph: percentage of total observations, by groupsHello, I would like to produce a graph that shows the percentage of total observations (code_7), ov…
i am using panel data and if i run the analysis it shows me "Age of PFA" is omitted because of collinearity. need help. find my data belowi am using panel data and if i run the analysis it shows me "Age of PFA" is omitted because of colli…
Having problem reshaping my qualitative data for estimation of nested logitI have a dataset with 727 observation and 29 variables. The variables with biom and solar prefix are…
i am using panel datai am using panel data and if i run the analysis it shows me that the resul of one variable "Age of P…
Subscribe to:
Post Comments (Atom)
0 Response to Clear all command
Post a Comment