Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in condfstat in the presence of exogenous variables #53

Open
luluywang opened this issue Sep 10, 2021 · 0 comments
Open

Bug in condfstat in the presence of exogenous variables #53

luluywang opened this issue Sep 10, 2021 · 0 comments

Comments

@luluywang
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant