powered by
Calculates sum of squared errors, divided by NT
calculate_sigma2(e, NN = nrow(e), TT = ncol(e))
numeric
matrix with error terms
N
T
Y <- Y_dgp3 set.seed(1) e <- matrix(rnorm(nrow(Y) * ncol(Y)), nrow = nrow(Y)) calculate_sigma2(e)
Run the code above in your browser using DataLab