Untitled

mail@pastecode.io avatar
unknown
r
3 years ago
566 B
3
Indexable
Never
RMSPE1 <- 0
benchmark_RMSPE1 <- 0
for (t in 1992:2007){
  sum <- 0
  for (index in controls_identifier){
    sum <- sum + data$Real.GDP[data$Year == t & data$index == index]*synth.tables1$tab.w$w.weights[synth.tables1$tab.w$unit.numbers == index]
  }
  RMSPE1 <- RMSPE1 + (data$Real.GDP[data$Year == t & data$Country == "Senegal"] - sum)^2
  benchmark_RMSPE1 <- benchmark_RMSPE1 + data$Real.GDP[data$Year == t & data$Country == "Senegal"]^2
  }
RMSPE1 <- (RMSPE1/16)^0.5
benchmark_RMSPE1 <- (benchmark_RMSPE1/16)^0.5
fit_index1 <- RMSPE1/benchmark_RMSPE1