Learn R Programming

missingHE (version 1.4.1)

data_read_hurdle: A function to read and re-arrange the data in different ways for the hurdle model

Description

This internal function imports the data and outputs only those variables that are needed to run the hurdle model according to the information provided by the user.

Usage

data_read_hurdle(
  data,
  model.eff,
  model.cost,
  model.se,
  model.sc,
  se,
  sc,
  type,
  center
)

Arguments

data

A data frame in which to find variables supplied in model.eff, model.cost (model formulas for effects and costs) and model.se, model.sc (model formulas for the structural effect and cost models) . Among these, effectiveness, cost and treatment indicator (only two arms) variables must always be provided and named 'e', 'c' and 't' respectively.

model.eff

A formula expression in conventional R linear modelling syntax. The response must be a health economics effectiveness outcome ('e') whose name must correspond to that used in data, and any covariates are given on the right-hand side. If there are no covariates, specify 1 on the right hand side. Random effects can also be specified for each model parameter.

model.cost

A formula expression in conventional R linear modelling syntax. The response must be a health economics cost outcome ('c') whose name must correspond to that used in data, and any covariates are given on the right-hand side. If there are no covariates, specify 1 on the right hand side. By default, covariates are placed on the "location" parameter of the distribution through a linear model. Random effects can also be specified for each model parameter.

model.se

A formula expression in conventional R linear modelling syntax. The response must be a health economics effectiveness outcome ('e') whose name must correspond to that used in data, and any covariates used to estimate the probability of structural effects are given on the right-hand side. If there are no covariates, specify 1 on the right hand side. By default, covariates are placed on the "probability" parameter for the strcutural effects through a logistic-linear model. Random effects can also be specified for each model parameter.

model.sc

A formula expression in conventional R linear modelling syntax. The response must be a health economics cost outcome ('c') whose name must correspond to that used in data, and any covariates used to estimate the probability of structural costs are given on the right-hand side. If there are no covariates, specify 1 on the right hand side. By default, covariates are placed on the "probability" parameter for the strcutural costs through a logistic-linear model. Random effects can also be specified for each model parameter.

se

Structural value to be found in the effect data defined in data. If set to NULL, no structural value is chosen and a standard model for the effects is run.

sc

Structural value to be found in the cost data defined in data. If set to NULL, no structural value is chosen and a standard model for the costs is run.

type

Type of structural value mechanism assumed, either 'SCAR' (Structural Completely At Random) or 'SAR' (Strcutural At Random).

center

Logical. If center is TRUE all the covariates in the model are centered.

Examples

Run this code
#Internal function only
#no examples
#
#

Run the code above in your browser using DataLab