View source: R/checkMissingCovars.r
checkMissingCovars | R Documentation |
Identify potential covariates that fail to have data for at least 90
checkMissingCovars(tmp.df, m.i, df, trap, plot.file)
tmp.df |
The reduced data frame originating from |
m.i |
An integer containing the number of rows in data frame
|
df |
The data frame for a specific |
trap |
A trap for which efficiency data are available. |
plot.file |
The name of the file prefix under which output is to be
saved. Set to |
Function checkMissingCovars
, surprisingly, checks for
covariates with missing data. It outputs a csv
or data rows with
missing data. Generally, the function applies a 90% rule, meaning that
90% of the efficency trials in tmp.df
must have covariate data
available for ultimate consideration in enhanced efficiency models.
A list containing several objects.
A copy of the tmp.df
initially provided to the function with rows (efficiency trials) missing covariate data possibly removed.
A copy of the df
initially provided to the function.
The number of efficiency trials with full rows of data. Necessarily less than or equal to the m.i
provided to the function.
The dataframe identifying the e-trial rows removed from tmp.df
. Output as a csv
.
The threshold indicating the number of e-trial rows that must be non-missing for covariate inclusion. Equal to floor(0.90*m.i) + 1.
## Not run: ans <- checkMissingCovars(tmp.df,m.i,df,trap,plot.file) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.