You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bart2() calls dbartData() to handle the inputs. When a formula and data.frame are supplied, dbartsData() calls model.frame() using similar infrastructure to lm(), which is very common in packages that allow a formula interface. However, dbartsData() assigns stats::na.omit to na.action, which drops any observations with missingness. This guarantees missing values do not enter the dataset and cause errors, but omitting missing observations is not the only way to handle them. For example, one might write a custom function that imputes the missing values (e.g., with the mean). I request that dbartsData() and bart2() accept an na.action argument that allows users to supply their own function for processing missing values. This should also be followed by a check to make sure no missing values remain in the dataset after running model.frame(). The default can be na.omit, which is currently what is hard-coded in. Thank you.
The text was updated successfully, but these errors were encountered:
bart2()
callsdbartData()
to handle the inputs. When a formula and data.frame are supplied,dbartsData()
callsmodel.frame()
using similar infrastructure tolm()
, which is very common in packages that allow a formula interface. However,dbartsData()
assignsstats::na.omit
tona.action
, which drops any observations with missingness. This guarantees missing values do not enter the dataset and cause errors, but omitting missing observations is not the only way to handle them. For example, one might write a custom function that imputes the missing values (e.g., with the mean). I request thatdbartsData()
andbart2()
accept anna.action
argument that allows users to supply their own function for processing missing values. This should also be followed by a check to make sure no missing values remain in the dataset after runningmodel.frame()
. The default can bena.omit
, which is currently what is hard-coded in. Thank you.The text was updated successfully, but these errors were encountered: