Skip to content

error with using weight variable #35

@sfallahpour

Description

@sfallahpour

when i try the following command

imp_simpuatation<-impute_rhd( data, GI~age+sex, pool = "univariate", prob = data$SamplingWeight ) 

i get the following error:

Error in impute_rhd(data, earnings ~ AG + sex, pool = "univariate", prob = data$SamplingWeight) : length(prob) != nrow(dat) is not TRUE 

I used a debugger function and i think there is a bug in the package which i believe is here:
image

I believe the highlighted line should be
stopifnot(length(prob) == nrow(dat))

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