Hi,
In the estimation section of my dissertation, I have an endogenous variable, "sublia", and its interactions with four weather variables of ddayHot_100, ddayMod_100, prec_cm and prec_cm2. I am using an instrumental variable "tau_final" for identification in the xtivreg2 command.
How can I calculate the marginal effect of change in my main variable "sublia"? I am trying to derive something like "10% increase in sublia causes XX% decrease in log(yield)" at average values of weather variables, or different percentiles of weather variables.
My code:
Thank you.
Homa
In the estimation section of my dissertation, I have an endogenous variable, "sublia", and its interactions with four weather variables of ddayHot_100, ddayMod_100, prec_cm and prec_cm2. I am using an instrumental variable "tau_final" for identification in the xtivreg2 command.
How can I calculate the marginal effect of change in my main variable "sublia"? I am trying to derive something like "10% increase in sublia causes XX% decrease in log(yield)" at average values of weather variables, or different percentiles of weather variables.
My code:
Code:
gen sublia_ddayHot = sublia * ddayHot_100 gen sublia_ddayMod = sublia * ddayMod_100 gen sublia_prec = sublia * prec_cm gen sublia_prec2 = sublia * prec2_cm gen IV_hottemp = ddayHot_100 * tau_final gen IV_modtemp = ddayMod_100 * tau_final gen IV_rain = prec_cm * tau_final gen IV_rain2 = prec2_cm * tau_final xtivreg2 log_yield (sublia sublia_ddayHot sublia_prec2 sublia_ddayMod sublia_prec = tau_final IV_hottemp IV_rain2 IV_modtemp IV_rain) l.yield price_received ddayMod_100 ddayHot_100 prec_cm prec2_cm corntime soybeantime, fe gmm cluster(panelID) first
Thank you.
Homa
Comment