question on complete_missing_cov()
-
Is it normal that the threshold for predata in the segdata one ?
if(saturate_predata == T) {
for (j in allvar) {
predata[, j] <- saturate(predata[, j], threshold = segdata_threshold[1, j], upper = FALSE)
predata[, j] <- saturate(predata[, j], threshold = segdata_threshold[2, j], upper = TRUE)
}
}
-
Do we have to put "lon" and "lat" in column to impute values ? (allvar is the object regrouping covariates)
segdata[, c("lon", "lat", allvar)] <-
imputePCA(
mi_segdata,
ncp = estim_ncpPCA(mi_segdata,
ncp.max = ncol(mi_segdata),
method.cv = "Kfold",
nbsim = 10,
verbose = verbose
)$ncp
)$completeObs
shouldn't it be :
segdata[, allvar] <-
imputePCA(
mi_segdata,
ncp = estim_ncpPCA(mi_segdata,
ncp.max = ncol(mi_segdata),
method.cv = "Kfold",
nbsim = 10,
verbose = verbose
)$ncp
)$completeObs