Skip to content

iebaltab: onerow option generates error if non-varying variable is included even when there is no missingness #369

@jmseiden

Description

@jmseiden

When using the onerow option, iebaltab generates the error "Option onerow may only be used if the number of observations with non-missing values are the same in all groups across all balance variables." even when the number of observations are non-missing for all variables if a non-varying variable is included.

Here is a reproducible example.

clear all
sysuse auto

gen constant_var = 1 // Create a variable that is the same for all observations

sum foreign weight length constant_var //All variables have the same number of observations

iebaltab weight length, groupvar(foreign) onerow //works fine

iebaltab weight length constant_var , groupvar(foreign) onerow //generates an error

`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions