complete_data: Create complete dataset This function returns the complete...

View source: R/complete_data.R

complete_dataR Documentation

Create complete dataset This function returns the complete dataset trying all validated values for each unvalidated subject

Description

Create complete dataset This function returns the complete dataset trying all validated values for each unvalidated subject

Usage

complete_data(
  Y_unval = NULL,
  Y_val = NULL,
  X_unval = NULL,
  X_val = NULL,
  try_X = NULL,
  C = NULL,
  Validated = NULL,
  Bspline = NULL,
  data,
  theta_pred = NULL,
  gamma_pred = NULL
)

Arguments

Y_unval

Column names with the unvalidated outcome. If Y_unval is null, the outcome is assumed to be error-free.

Y_val

Column names with the validated outcome.

X_unval

Column name(s) with the unvalidated predictors. If X_unval and X_val are null, all precictors are assumed to be error-free.

X_val

Column name(s) with the validated predictors. If X_unval and X_val are null, all precictors are assumed to be error-free.

try_X

(Optional) Vector or dataframe of observed values of X_val to be used to create the complete dataset. If try_X = NULL (DEFAULT), then the unique values of X_val in data will be used.

C

(Optional) Column name(s) with additional error-free covariates.

Validated

Column name with the validation indicator. The validation indicator can be defined as Validated = 1 or TRUE if the subject was validated and Validated = 0 or FALSE otherwise.

Bspline

Vector of column names containing the B-spline basis functions.

data

A dataframe with one row per subject containing columns: Y_unval, Y_val, X_unval, X_val, C, Validated, and Bspline.

theta_pred

Vector of columns in data that pertain to the predictors in the analysis model.

gamma_pred

Vector of columns in data that pertain to the predictors in the outcome error model.

Value

dataframe


sarahlotspeich/logreg2ph_R_only documentation built on Jan. 20, 2025, 6:20 p.m.