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
Dark themeI have STATA 17 on Linux. I use a Linux dark theme for my desktop. Stata generally respect the the…
Clustering Industry typesI have constructed the following one year lagged regression of ESG on ROA. However, I do not get an …
Generating average variable of previous observationsHi All, I am writing my Bachelor thesis which is about how total payout policy (dividends + share r…
For elimination a specific group in a variable X on panel dataDear All users, I try to panel regression using panel data. I need to capture effect here that, Yi…
define a dummy with cond()Dear All, Suppose the data set is Code: * Example generated by -dataex-. For more info, type help d…
Subscribe to:
Post Comments (Atom)
0 Response to Type mismatch error
Post a Comment