Hi,
This seems like a simple question but I'm fairly new to Stata and having trouble getting started because I don't understand why a fairly basic command isn't working.
I'm using a dataset that I've downloaded as a csv file, and have imported to Stata 14.
I want to start making new versions of the variables I'm using in my project, removing missing values and adding labels. There are no labels in the downloaded.csv file, but I have them in a separate Excel workbook to copy from. I'm only using a few of the variables so was going to do this manually.
I'm typing the following code:
tab v3
gen SupOppRenew =.
replace SupOppRenew = 1 if v3 ==1
and getting the message:
type mismatch
r(109);
I don't understand why - can anyone help?
Thanks,
Kiera
This seems like a simple question but I'm fairly new to Stata and having trouble getting started because I don't understand why a fairly basic command isn't working.
I'm using a dataset that I've downloaded as a csv file, and have imported to Stata 14.
I want to start making new versions of the variables I'm using in my project, removing missing values and adding labels. There are no labels in the downloaded.csv file, but I have them in a separate Excel workbook to copy from. I'm only using a few of the variables so was going to do this manually.
I'm typing the following code:
tab v3
gen SupOppRenew =.
replace SupOppRenew = 1 if v3 ==1
and getting the message:
type mismatch
r(109);
I don't understand why - can anyone help?
Thanks,
Kiera
Comment