Hi all,
I am having a type mismatch error for the following code (final line before the curly brace) when la_seroa is an empty variable. Is there any way for this code to work even if la_seroa is entirely missing?
forval x=1/$max_sero {
gen sero`x'_final = ""
replace sero`x'_final = sero`x'_clean if use_sero`x'== 1
replace sero`x'_final = la_seroa if use_sero`x'== 2 & num_variant_seroa==`x'
}
Thank you!
Related Posts with Type mismatch error
Distribution of gender within subgroups of a groupHi! I want to do demographics on my data. I have an outcome variable called hypertension (0/1). If …
How to create matrix from a vector?Hi, given the following: . mat i = (1, 2, 3) . mat lis i i[1,3] c1 c2 c3 r1 1 2 3 . . mat N = i…
Order Coefficients in coefplotHi all, I am trying to produce a coefplot, and for some reason, the baseline year is showing up fir…
ivprobit reports first stage results even w/o `first` optionI'm using ivprobit with Stata 14 and I think I discovered a bug. There is the option "first" to disp…
summary stats with yearsDear all, do you know if there is a quick and easy way to produce summary stats with a column conta…
Subscribe to:
Post Comments (Atom)
0 Response to Type mismatch error
Post a Comment