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
Identifier with huge codesHallo everybody and thanks in advance for any kind of suggestion. I am working on a large dataset ab…
Robust standard errors - OLS - Right-skewed distributionHi, I am looking at data for returns of companies after their initial public offering. The return-d…
Mata compiler ignores eltypes / orgtypes for variable declarationsHi, I was surprised to see that the Mata compiler seems to ignore much of the eltype and orgtype sp…
Several regressions in one output table: Independent variables in rows, dependent in columnsDear all, I am trying to create a specific table from Stata output, and have tried to do so using e…
How does the PPML command check for overfitting?Dear all, I have a question about the procedure how the PPML command is checking for overfitting. I…
Subscribe to:
Post Comments (Atom)
0 Response to Clear all command
Post a Comment