Imputes missing covariates

This function does imputation of missing covariates. The rules for imputation can be selected by the user in a relatively easy way (see documentation of input arguments below). If a filename is provided, a table is generated as text file giving information about the imputed covariates.

covImpute_IQRdataGENERAL(
  data,
  continuousCovs = NULL,
  categoricalCovs = NULL,
  filename = NULL
)

Arguments

data

IQRdataGENERAL object

continuousCovs

There are two options:

  • Un-named vector: The vectors elements should contain the names of the covariate columns for which the imputation is done. In this case, each missing covariate is imputed to the median of this covariate (across subjects) in the dataset.

  • Named vector: The names of the vector elements should be the names of the covariate columns for which imputation is done. The values of the vector elements should be the values to which to impute the covariates to. Apart from numerical values also function names (such as "median" or "mean" can be provided).

categoricalCovs

For categorical covariates always a named vector needs to be provided. The names of the elements need to define the name of the covariate columns and the value of the numerical imputation value.

filename

Filename to which to export the information about possibly imputed covariates (as a table text file)

Value

IQRdataGENERAL object with imputed missing covariate values

Details

Important assumption: If covariate is missing in first record for a subject, then it is missing for all records in a subject.

See also

Other IQRdataGeneral: +.IQRdataGENERAL(), IQRcalcTAD(), IQRdataGENERAL(), IQRexpandADDLII(), IQRloadCSVdata(), IQRsaveCSVdata(), addIndivRegressors_IQRdataGENERAL(), addLabel_IQRdataGENERAL(), attributes0(), blloqInfo_IQRdataGENERAL(), blloq_IQRdataGENERAL(), check_IQRdataGENERAL(), clean_IQRdataGENERAL(), combine_IQRdataGENERAL(), convertCat2Text(), date2dateday_IQRdataProgramming(), date2datetime_IQRdataProgramming(), date2time_IQRdataProgramming(), exportDEFINE_IQRaedataER(), exportDEFINE_IQRdataGENERAL(), exportDEFINEpdf_IQRdataGENERAL(), exportSYS_IQRdataGENERAL(), export_IQRdataGENERAL(), getLabels_dataframe(), getNAcolNLME_IQRdataGENERAL(), handleSameTimeObs_IQRdataGENERAL(), is_IQRdataGENERAL(), loadATRinfo_csvData(), loadAttributeFile(), load_IQRdataGENERAL(), mapCategoricalCovariate_IQRnlmeProject(), mapCategoricalCovariate_csvData(), mapContinuousCovariate_IQRnlmeProject(), mapContinuousCovariate_csvData(), mutateCov_IQRdataGENERAL(), obfuscate_IQRdataGENERAL(), plot.IQRdataGENERAL(), plotCorCat_IQRdataGENERAL(), plotCorCovCat_IQRdataGENERAL(), plotCorCov_IQRdataGENERAL(), plotCovDistribution_IQRdataGENERAL(), plotDoseSchedule_IQRdataGENERAL(), plotIndiv_IQRdataGENERAL(), plotRange_IQRdataGENERAL(), plotSampleSchedule_IQRdataGENERAL(), plotSpaghetti_IQRdataGENERAL(), print.IQRdataGENERAL(), removeCommata_dataframe(), rmAMT0_IQRdataGENERAL(), rmDosePostLastObs_IQRdataGENERAL(), rmIGNOREd_IQRdataGENERAL(), rmMissingTIMEobsRecords_IQRdataGENERAL(), rmNOobsSUB_IQRdataGENERAL(), rmNonTask_IQRdataGENERAL(), rmPLACEBO_IQRdataGENERAL(), rmSubjects_IQRdataGENERAL(), setIGNORErecords_IQRdataGENERAL(), setMissingDVobsRecordsIGNORE_IQRdataGENERAL(), subset.IQRdataGENERAL(), summary.IQRdataGENERAL(), summaryCat_IQRdataGENERAL(), summaryCov_IQRdataGENERAL(), summaryObservations_IQRdataGENERAL(), transformObs_IQRdataGENERAL(), unlabel_dataframe()

Other IQRdataGeneral: +.IQRdataGENERAL(), IQRcalcTAD(), IQRdataGENERAL(), IQRexpandADDLII(), IQRloadCSVdata(), IQRsaveCSVdata(), addIndivRegressors_IQRdataGENERAL(), addLabel_IQRdataGENERAL(), attributes0(), blloqInfo_IQRdataGENERAL(), blloq_IQRdataGENERAL(), check_IQRdataGENERAL(), clean_IQRdataGENERAL(), combine_IQRdataGENERAL(), convertCat2Text(), date2dateday_IQRdataProgramming(), date2datetime_IQRdataProgramming(), date2time_IQRdataProgramming(), exportDEFINE_IQRaedataER(), exportDEFINE_IQRdataGENERAL(), exportDEFINEpdf_IQRdataGENERAL(), exportSYS_IQRdataGENERAL(), export_IQRdataGENERAL(), getLabels_dataframe(), getNAcolNLME_IQRdataGENERAL(), handleSameTimeObs_IQRdataGENERAL(), is_IQRdataGENERAL(), loadATRinfo_csvData(), loadAttributeFile(), load_IQRdataGENERAL(), mapCategoricalCovariate_IQRnlmeProject(), mapCategoricalCovariate_csvData(), mapContinuousCovariate_IQRnlmeProject(), mapContinuousCovariate_csvData(), mutateCov_IQRdataGENERAL(), obfuscate_IQRdataGENERAL(), plot.IQRdataGENERAL(), plotCorCat_IQRdataGENERAL(), plotCorCovCat_IQRdataGENERAL(), plotCorCov_IQRdataGENERAL(), plotCovDistribution_IQRdataGENERAL(), plotDoseSchedule_IQRdataGENERAL(), plotIndiv_IQRdataGENERAL(), plotRange_IQRdataGENERAL(), plotSampleSchedule_IQRdataGENERAL(), plotSpaghetti_IQRdataGENERAL(), print.IQRdataGENERAL(), removeCommata_dataframe(), rmAMT0_IQRdataGENERAL(), rmDosePostLastObs_IQRdataGENERAL(), rmIGNOREd_IQRdataGENERAL(), rmMissingTIMEobsRecords_IQRdataGENERAL(), rmNOobsSUB_IQRdataGENERAL(), rmNonTask_IQRdataGENERAL(), rmPLACEBO_IQRdataGENERAL(), rmSubjects_IQRdataGENERAL(), setIGNORErecords_IQRdataGENERAL(), setMissingDVobsRecordsIGNORE_IQRdataGENERAL(), subset.IQRdataGENERAL(), summary.IQRdataGENERAL(), summaryCat_IQRdataGENERAL(), summaryCov_IQRdataGENERAL(), summaryObservations_IQRdataGENERAL(), transformObs_IQRdataGENERAL(), unlabel_dataframe()