build_cindep_model: Build a multivariate, conditionally independent model using...

Description Usage Arguments Value

View source: R/cross_validation.R

Description

Build a multivariate, conditionally independent model using the univariate cross-validation results. Optionally, the standard error of the unconstrained parameter vector (th_y_bar) is calculated to support the re-scaling done in fit_multivariate.

Usage

1
2
3
4
5
6
7
8
build_cindep_model(
  data_dir,
  analysis_name,
  fold = NA,
  calc_se = FALSE,
  save_file = F,
  allow_corner = FALSE
)

Arguments

data_dir

Directory to save univariate model parameters

analysis_name

analysis_name for file-naming

fold

Fold number. If NA, build model from main solution.

calc_se

Whether to calculate the standard error for th_y_bar

save_file

Logical whether to save cindep model as an .rds file

Value

A list with the parameter vector (th_y), model specification (mod_spec), and transformed parameter vector (th_y_bar). If calc_se is TRUE, the standard error for th_y_bar is added (th_y_bar_se).

(Default: FALSE) If FALSE, an error is thrown if any standard errors have negative values, which usually happens because an optimum is a corner solution. If TRUE, an attempt is made to use pertinent median values from other variables to set the scale.


MichaelHoltonPrice/yada documentation built on Sept. 19, 2021, 11:27 p.m.