##MY FUNCTIONS
library(car)
library(tseries)
library(formula.tools)


`%||%` <- function(a, b) if (!is.null(a)) a else b

countNA <- function(x){
  y <- length(x[which(!is.na(x))])
  return(y)
}
#across vars
countNA_vars <- function(dfSub){
  z <- apply(dfSub, 1, countNA)
  return(z)
}
logNeg <- function(x){
  log((x-min(x, na.rm=T))+1)
}
source("myFunctions/fe_ar1_pcse.R")
source("myFunctions/pw_function.R")
source("myFunctions/outputReg_pw.R")
source("myFunctions/calc_vifs.R")
