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
Why is time-invariant dummy not omitted in fixed effects panel regression?Hello! I have a quick and simple question about a fixed effects panel regression from Dell, Jones an…
New version of dtastamp on SSCThanks once again to Kit Baum, a new version of the dtastamp package is now available for download f…
Apportioning monthly data to weeksI have weekly deaths data by 10 regions and monthly deaths data by 340 local authorities (LA) in eac…
Estimating sample attrition in panel dataset (xtset id)Hi there, I am using StataMP 15.1. I would like to estimate the sample attrition in my panel datas…
Identifying event date with at least two years of zero valueDear Stata Users, Can you please help me identify the following setting. I need to create a variabl…
Subscribe to:
Post Comments (Atom)
0 Response to Type mismatch error
Post a Comment