I asked a similar question earlier. I'm attempting to fill in missing values such that observations 0-458 are e 0, 445-832 are 1, and 832-850 are 0.
The following code allowed me to replace missing values in observations 1-160 with 1, with the rest of the observations set to 0.
replace myvar = cond(_n <= 160, 1, 0) if missing(myvar)
How can I interpret this command for my current purpose?
#This is cross-posted on StackOverflow here:https://stackoverflow.com/questions/...range-in-stata but so far with no luck.
Related Posts with How to recode missing values within a range in Stata
Fama MacBeth RegressionHello, I am using Fama MacBeth regression to estimate macro economic impact on PE returns. I have pr…
Margins Command after Mixed Linear Model with Interaction Term / Guidelines to Marginal EffectsI'm using mixed in Stata 15.1 to analyze a change in my variables at two time points. The data were …
Robust SEs with weighted senspecI am weighting survey data with pweight and have successfully estimated sensitivity and specificity …
Two-Way CoefplotI am running 40 regressions. In each regression I regress an indicator for having price at least as …
Fama MacBeth RegressionHello, I want to run Fama MacBeth Regression and see if changes in macro economy affects PE industry…
Subscribe to:
Post Comments (Atom)
0 Response to How to recode missing values within a range in Stata
Post a Comment