I have been trying to merge a file with a tempfile. evertime stata shows "variable HHID does not uniquely identify observations in the using data" or "invalid specification". Can you tell where I did mistake in writing command?
global female_baseline "C:\Users\sehri001\OneDrive - WageningenUR\Farzana_PhD\PhD_Academic\PhD work\PhD research\ANGeL\ANGel_Data\Raw_data_Angel\Baseline_ RawData\STATA\household_female"
cd "$female_baseline"
use hh_mod_a_002.dta, clear
sort HHID
keep HHID HHTYPE A12 A13
recast double HHID
//the type of variable of HHID was int in this dataset. However, the type fo variable of HHID was double in the temfiles. So I have toc hange the type to merge datafiles.
merge 1:1 HHID using `dil_answer_2015'
Related Posts with Tempfile
kappaetc / Krippendorff's alpha with missing values and across multiple variablesMy research team coded/classified a large set of documents. I took a random subset of 1000 from the …
Estimating risk difference for binary outcome in cluster RCTI am analysing data from a cluster RCT looking at the effect of an intervention (int) in health cent…
Panel data: Creating a bilateral dataset with countries and years (replicating the dataset for each panel)Hi everyone, I have a panel dataset of exchange rate with 200 countries and 16 years, please find b…
Contrast tablesHi all, New Statalist user here with a simple question (I'm a long time Stata user who is trying to…
Balance an unbalanced datasetHi all, I have a strongly unbalanced dataset of countries observed by year. I would like to balance…
Subscribe to:
Post Comments (Atom)
0 Response to Tempfile
Post a Comment