Hi All!,
I am facing a problem with nsso data while merging four files such as household, demographic, principal status, and subsidiary status into one where two files are having the same number of digits in the key variable (eg:20000110102) and the other two files having the same digits in the key variable (eg:1120000110102). I want to exclude the first two digits (i.e.11) from 1120000110102 to have the same values in all four files. I have gone through some of statalist posts that deal with string variable but mine are numerical formats. In that case, the command [gen newvar=substr(varname,#,#)] will not work, hence how can I do it. Kindly help me.
Thanking you in advance.
Related Posts with separating digits from the numerical variable.
Trouble with splitvallabelsDear statalisters, I have trouble using splitvallabels. As I understand splitvallabels it splits th…
How to create new variable X=1, if Y=1 in the 24 cells (A1:A24), and X=0, if in the 24 cells (A1:A24) =0Dear all, Y is a dummy variable (1 - crises occur, 0 - crises). I have to crate a new variable X, t…
How i do Regressions using dummy variableHow I write a code for Regressions using dummy variable, cross sectional regression Array …
How to lag an entire equationI am trying to replicate what's called a 'dynamic autoregressive' logit model to predict a binary ou…
Baron and Kenny - multiple predictor variablesGood afternoon everyone, For my master's thesis, I investigate the effect of four different job cra…
Subscribe to:
Post Comments (Atom)
0 Response to separating digits from the numerical variable.
Post a Comment