Skip to content

Bug in condfstat in the presence of exogenous variables #53

@luluywang

Description

@luluywang

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions