psychelzh / cpmr

Connectome predictive modelling in R
https://psychelzh.github.io/cpmr/
Other
0 stars 0 forks source link

Add `na.action`? #2

Closed psychelzh closed 1 month ago

psychelzh commented 5 months ago

It would be better if NA can be handled here. Or a simple na.rm argument could be added.

psychelzh commented 1 month ago

Maybe there are two reasonable NA actions:

  1. Failing: to signal the users that there might be something wrong! (Suitable for the default case)
  2. Omit: omit all the missing cases. Linear models are used internally, which cannot deal with missing cases, so cannot do something for partially missing cases.
  3. Exclude: the same as "omit" when fitting but return data with missing cases.

Complete cases should be defined by intersection of conmat, behav and confounds.