the sample produced by this code
replace region =. if region==-1
drop if region==.
sum if region ==1
differ from the sample produced by this code
keep if region ==1
sum
I thought perhaps it was specific to the keep command, but
drop if region != 1
sum
produced the same sample as the keep command.
Is there something in the keep/drop command that changes the storage type of the variable but this doesn't happen with the replace command?
Thank you!
Related Posts with Keep/drop command affects different data than replace
Maximum Likelihood Estimation cannot find starting values in StataI am attempting to use Deal or No Deal Data to test for risk aversion parameters using Maximum Likel…
Regression analysis to detect herd behaviorDear all, I am new to this forum and also new to Stata. Therefore, I would like to apologize for an…
Panel Var IRF standard deviation reportDear experts, I used pvar syntax by Abrigo and Love(2015) because of unbalanced panel data. Fore m…
Determine number of unique values groupwiseHey community, I have grouped my observations by the variable companyid so that there are multiple …
Repeated measures mixed model specificationHello everyone, I think I am stuck on a specification problem and struggling to find a way out. - Pr…
Subscribe to:
Post Comments (Atom)
0 Response to Keep/drop command affects different data than replace
Post a Comment