R/clean_summary_table.R

Defines functions clean_summary_table

## File Name: clean_summary_table.R
## File Version: 0.10


clean_summary_table <- function( dfr, RR, se, Nimp )
{
    #*** RR==0
    if ( ( ! se ) &  ( RR==0 )  ){
        vars <- c("df", "cor_SE", "cor_fmi", "cor_VarMI",
                    "cor_VarRep", "cor_VarMI_St2", "cor_VarMI_St1",
                    "cor_fmi_St1", "cor_fmi_St2", "t", "p",
                    "cov_SE", "cov_fmi", "cov_VarMI", "cov_VarRep",
                    "cov_VarMI_St2", "cov_VarMI_St1",
                    "cov_fmi_St1", "cov_fmi_St2", "SE",
                    "Var_MI", "VarRep"
                    )
        for (vv in vars){  dfr[,vv]  <- NULL }
    }
    #**** Nimp==1
    if ( Nimp==1  ){
        vars <- c("cov_fmi", "cov_VarMI", "fmi", "VarMI")
        for (vv in vars){
            dfr[,vv]  <- NULL
        }
    }
    return(dfr)
}

Try the BIFIEsurvey package in your browser

Any scripts or data that you put into this service are public.

BIFIEsurvey documentation built on May 29, 2024, 2:52 a.m.