0
votes

I have panel data from external assets of 102 countries over ~ 20-40 years, depending on the country. I tried predicting the probability for a financial crisis, depending on log(total_liabilities to see whether an increase in foreign investment and other capital positions can help predict a crisis.

plm1 <- plm(crisis ~ log_total_liabilities + lag1_log_tot_lia + lag2_log_tot_lia + lag3_log_tot_lia
                        + factor(year) + factor(country), data = dt2, index=c("year", "country"), model="pooling")
summary(plm1)

I started by estimating a plm model, regressing on my crisis dummy. To estimate the predictive ability, I wanted to generate a ROC and AUC value, given the regression

# Plot of True Positive Rate Against the False Positive Rate
pred1 <- predict(plm1)
pred2 <- prediction(pred1,as.numeric(plm1$crisis))
plot(performance(pred2,"tpr","fpr"), las=0, main="plm1")

I get errors like:

Error: not fitting arguments / variables" (translated from German) or "all arguments/variables need to have the same length" (translated from German).

Another approach to obtaining Roc values would start with When changing pred1 <- predict(plm1, dt2) (dt2 is my data frame, containing also some variables I had not used in the plm1 regression), the error differs: The format of predictions is invalid. It couldn't be coerced to a list.

Are PLMs simply not made for ROC calculations? And if so, how come that the paper attached presents AUROC values for a linear probability model with fixed effects? (See second last row) And if no, what am I doing wrong?

I attached the screenshot of the paper and my dataset.

CSV File with datasat

Screenshot of paper with OLS AUROC value