alexpkeil1 / qgcomp

QGcomp (quantile g-computation): estimating the effects of exposure mixtures. Works for continuous, binary, and right-censored survival outcomes. Flexible, unconstrained, fast and guided by modern causal inference principles
27 stars 6 forks source link

Dimension error in qgcomp.cox.boot #14

Open alexpkeil1 opened 3 years ago

alexpkeil1 commented 3 years ago

You may see an error like this:

Error in `$<-.data.frame`(`*tmp*`, "weights", value = c(1, 1, 1, 1, 1, : replacement has 332 rows, data has 1664

This appears to be related to having missing values in the data.

alexpkeil1 commented 3 years ago

qgcomp.cox.boot works on complete case data. For now, error codes will be updated to reflect this, as I'm not sure having this as an invisible error is advisable (though the noboot function works as expected). In the near future, I may consider implementing automatic complete case restrictions in the function.