pred_fun_Y: Fit Outcome Model

Description Usage Arguments Value

View source: R/pred.R

Description

This internal function fits a generalized linear model (GLM) for the outcome variable using the observed data.

Usage

1
2
3
4
5
6
7
8
9
pred_fun_Y(
  model,
  yrestrictions,
  outcome_type,
  outcome_name,
  time_name,
  obs_data,
  model_fits
)

Arguments

model

Model statement for the outcome variable.

yrestrictions

List of vectors. Each vector containins as its first entry a condition and its second entry an integer. When the condition is TRUE, the outcome variable is simulated according to the fitted model; when the condition is FALSE, the outcome variable takes on the value in the second entry.

outcome_type

Character string specifying the "type" of the outcome. The possible "types" are: "survival", "continuous_eof", and "binary_eof".

outcome_name

Character string specifying the name of the outcome variable in obs_data.

time_name

Character string specifying the name of the time variable in obs_data.

obs_data

Data on which the model is fit.

model_fits

Logical scalar indicating whether to return the fitted models. The default is FALSE.

Value

Fitted model for the outcome variable.


gfoRmula documentation built on July 13, 2021, 9:07 a.m.