Hi everyone,
I want to import a public data set of standardized tests in Colombia. This information is available as a text file. I tried importing it with the import delimited command, but I encounter problems as some contents of the variables are characters such as "¿" and "1/2". This makes stata divide the values between two variables, creating an non existing variable and moving all contents of the following variables.
My code is:
forvalues x=2009/2019 {
forvalues y=1/2 {
clear
import delimited "${raw_dir}/SB11_`x'`y'/SB11_`x'`y'.txt", ///
delimiter("¬Â") varnames(1)
dropmiss, force // This is to try to solve the problem but doesn't quite work out
cap rename ïestu_exam_nombreexamen estu_exam_nombreexamen
save "${use_dir}/original/S11_`x'`y'.dta", replace
}
}
Thabk you very much for your help!
Related Posts with Problem with import delimited - characters "¿" "1/2" "1/4" etc
Reusing SEM estimatesI feel like I'm missing something basic here. In order to reuse the results of a polychoric correlat…
simple addplot syntax errors?Hi I'm trying to overlay a couple of plots but I can't seem to make it work and the stata help file…
loopsHi, I am trying to look at a range of numbers in a loop but am having difficulty. My data looks li…
Multinomial probit (mprobit): Syntax for specifying constraintsColleagues: The model being estimated is Code: mprobit y i.(x1 x2 x3 x4 x5) LHS variable y has 5 …
Fill in missing information for only specific observations Code: * Example generated by -dataex-. To install: ssc install dataex clear input byte survey int …
Subscribe to:
Post Comments (Atom)
0 Response to Problem with import delimited - characters "¿" "1/2" "1/4" etc
Post a Comment