0

I am trying to run a regression where the dependent variable is binary (1 = Debt Default) and the independent variables are continuous (Debt/GDP) and binary (1 = Pegged exchange rate). For each country for each year I have a value for Debt/GDP and whether or not exchange rate was pegged for that year.

My sample is of 39 countries over the period 1980-2005 (I.E. Argentina 1980-2005, Bolivia 1980-2005). For each of these countries I would like to measure the average impact of a dummy and continuous variable on the dependent variable (probability of Debt Default). Is there a way I can average the effect of the 2 variable across all countries so that I get one coefficient for each variable? My data looks like this -

Data head

Regression coefficients calculation:

img

camille
  • 16,432
  • 18
  • 38
  • 60
  • [See here](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) on making an R question that folks can help with. That includes a workable sample of data (i.e. not a picture of it), all necessary code, and a clear explanation of what you're trying to do and what hasn't worked. Answering your own question is fine, but the answer should also follow the guidelines for [answer], such as having enough explanation to be useful to others – camille Mar 31 '20 at 23:28

1 Answers1

0
probit2 <- plm(argentina_data_3_$`Enter Debt Crisis`~
            argentina_data_3_$`Monetary Regime`+
            argentina_data_3_$`REER misalignment`+
             argentina_data_3_$`REER misalignment`*argentina_data_3_$`Monetary Regime`,
          data = argentina_data_3_,
          index = c("Year", "Country"))

Maybe something like this?