search for: tp3001396p3001398

Displaying 1 result from an estimated 1 matches for "tp3001396p3001398".

Did you mean: tp3001396p3001396
2010 Oct 19
5
For-loop dummy variables?
Hi everyone, I've got a dataset with 12,000 observations. One of the variables (cleary$D1) is for an individual's country, coded 1 - 15. I'd like to create a dummy variable for the Baltic states which are coded 4,6, and 7. In other words, as a dummy variable Baltic states would be coded 1, else 0. I've attempted the following for loop: dummy <- matrix(NA, nrow=nrow(cleary),