complete: Subset a 'BNDataset' to get only complete cases.

Description Usage Arguments Details Value

Description

Given a BNDataset, return a copy of the original object where the raw.data consists only in the observations that do not contain missing values.

Usage

1
2
3
4
complete(x, complete.vars = seq_len(num.variables(x)))

## S4 method for signature 'BNDataset'
complete(x, complete.vars = seq_len(num.variables(x)))

Arguments

x

a BNDataset.

complete.vars

vector containing the indices of the variables to be considered for the subsetting; variables not included in the vector can still contain NAs.

Details

Non-missingness can be required on a subset of variables (by default, on all variables).

If present, imputed data and bootstrap samples are eliminated from the new BNDataset, as using this method *after* using impute or bootstrap, there may likely be a loss of correspondence between the subsetted raw.data and the previously generated imputed.data and bootstrap samples.

Value

a copy of the original BNDataset containing only complete observations.


tavazzie/bnstructScore documentation built on Dec. 23, 2021, 7:47 a.m.