0
$\begingroup$

Can a dummy variable or treatment variable be an independent variable? My independent variable take the value 1 if a flood occurs in a specific country in a specific year and 0 if no flood happens. And same thing for my other independent variable. I'm using two-way fixed effects model to estimate the causal effect of droughts and floods on log_meanweeklyhoursworked. The problem here is that I'm getting statistically insignificant results on the flood occurrence and drought occurrence dependent variables. Why is that? And how can I solve this problem? Please provide a corrected version of my coding:

reg1a <- plm(log_meanweeklyhoursworked ~ flood_occurrence + 
             drought_occurrence + labourforceparti + 
             log_gdp_percapita + nationalpopulation + log_education +
             urbanization + log_householdsize,
              data = labournationalall,
              index = c("reference_area", "start_year"),
              model = "within", # fixed effects model within entities
              effect = "twoway") # with both entity and time fixed 
                 # effects included

# Compute cluster-robust standard errors at the entity 
# (reference area) level
vcov_entity <- vcovHC(reg1a, type = "HC1", cluster = "group")

# Compute cluster-robust standard errors at the year level
vcov_year <- vcovHC(reg1a, type = "HC1", cluster = "time")

# Combine the results
summary_combined <- list(
  entity_level = summary(reg1a, vcov = vcov_entity),
  year_level = coeftest(reg1a, vcov. = vcov_year)
)
$\endgroup$

1 Answer 1

1
$\begingroup$

Yes, dummy variables can be and often are used as an independent variables.

The reason why you get statistically insignificant results is probably that your independent variables are not related to your dependent variable. Or, given that you have many predictors, your independent variables of interest are not related to your dependent variables when controlling for the effects of these other variables.

If so, that can't really be "corrected", it reflects how relationships between variables actually are in your dataset.

Of course there can be other reasons, such as errors in coding your variables, but those are impossible to detect from model code.

ETA. I don't really use plm, so it's possible there are some issues in your model code too, but I think it's not possible to say without knowing more about the data. The model code does look OK to me.

$\endgroup$
3
  • $\begingroup$ Thank you for the reply. I want to use two-way fixed effects regression. I read that its plm that you are supposed to use. Please correct me if I'm wrong. If you know of research papers that use two-way fixed effects model and provide R code, please share. That would help a lot. $\endgroup$ Commented May 10 at 10:39
  • $\begingroup$ Like I said, I think your model code is correct, so you are already using two-way fixed effects regression, correctly it seems. I'm not an expert in plm so I'm not the best to recommend papers, you are better off searching for Google Scholar yourself. This tutorial has some paper recommendations though. $\endgroup$
    – Sointu
    Commented May 10 at 11:35
  • $\begingroup$ Sorry, this tutorial $\endgroup$
    – Sointu
    Commented May 10 at 12:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.