I think there is a bug in condfstat when exogenous regressors are included. For example, the code for calculating the F stat in the case of a single endogenous variable but multiple exogenous regressors. The key line of code is:
if(length(st1$lhs) == 1) {
# only a single endogenous variable
# reduce to ordinary F-test
df1 <- nrow(st1$coefficients)
result <- as.matrix(sapply(types, function(typ) {
waldtest(st1,st1$instruments, df1=df1, type=typ)['F']
}))
dimnames(result) <- list(st1$lhs,paste(types,'F'))
return(structure(t(result),df1=df1))
}
I think there's an issue because df1 counts all the coefficients in the first stage, including the exogenous regressors. However, the proper F test only asks if the instruments are jointly strong, not all the variables.
I think there is a bug in condfstat when exogenous regressors are included. For example, the code for calculating the F stat in the case of a single endogenous variable but multiple exogenous regressors. The key line of code is:
I think there's an issue because df1 counts all the coefficients in the first stage, including the exogenous regressors. However, the proper F test only asks if the instruments are jointly strong, not all the variables.