Hi All,
I'm trying to perform a survey data analysis, but these data came in 35 different stata files. Problem is that I only need a few variables from each file.
I've tried merging, but it wasn't meaningful since the variables are different in different files, so, I was left with empty cells after merging.
Please, how can I successfully extract the specific variables (up to 12 variables from 8 different files) I need for my analysis without losing the survey's core characteristics (I learnt that for a survey analysis to produce reliable variance estimates, that the full sample size should be used for analysis.
Below are the examples of the two stata file and two of the variables I'd like to extract from each for use in a single analysis. For instance, college graduates are likely to be more informed to take care of their health, such that their chances of being physically disabled are limited.
Thank you for your time.
sect2_education.dta
What is the highest educational level [NAME] completed?
sect3_health.dta
Did [NAME] have to stop his/her usual activities because of this [ILLNESS/INJURY
Related Posts with Extracting and using variables from different stata files of the same survey dataset
A loop to predict a log-modelFor the model, Y= Yt-1+X1t+X2t+X3t+e I want to create a loop to predict future values such that the …
Simple by() and 'if' questionI'm working with some historical data on NFL players. I want to create a dummy variable indicating w…
Need for a permutation test ?Hi, STATA people, I have 12000 observation. I want to randomly assign a fake treatment value of 1 t…
cond() functionHi all! I have the following dilemma. I would like to create variables such that: if a local takes…
remove certain string chars if in beginning of string var onlyDear Statalist, I have been searching for ways to remove a sequence of characters from a string var…
Subscribe to:
Post Comments (Atom)
0 Response to Extracting and using variables from different stata files of the same survey dataset
Post a Comment