0

I am trying to figure out the command for calculating and visualizing the coefficient and statistical significance of a single predictor across each wave of a panel data regression

Here is my code and sample data

library(plm)
library(gplots)
set.seed(100)
arizona <- data.frame(state= "AZ",
                        unit= rep(1:50, times=50),
                        year= rep(1950:1999, each=50),
                        temperature= runif(2500, min=40, max=80),
                        height= runif(2500, min=10, max=20),
                        activity= runif(2500, min=50, max=70))

model1 <- plm(temperature ~ height + activity,
    data=arizona, 
    index=c("unit", "year"),
    model="within")

From the summary of model1 I know that predictor height is not statistically significant. Lets say I hypothesize that height was statistically significant during the first years of the panel. In all the years that came after, height's coefficient and statistical significance dropped. Is there any way I could test this visually? I could break down the panel to individual years, re run the same model for only one year, and create a coefficient plot for each iteration of height. This strikes me as inelegant and chock full of bias.

Helix123
  • 3,502
  • 2
  • 16
  • 36
YouLocalRUser
  • 309
  • 1
  • 9

0 Answers0