processModelFormula: Process a Model Formula and Data

View source: R/mcmcInternals.R

processModelFormulaR Documentation

Process a Model Formula and Data

Description

Process a model formula and the input data to retrieve the response variable and the special hierarchical components of the model

Usage

processModelFormula(inFormula, inData, centreCovs = TRUE, scaleCovs = TRUE)

Arguments

inFormula

A formula object containing the model specification

inData

A data.frame, list, or inla.data.stack object containing the data to apply the model formula to

centreCovs

A logical scalar denoting whether the fixed effects in the model should be centred before the analysis: each covariate element is subtracted by its mean. centreCovs can also be a function with one argument that is a vector of covariate values. In this case the variable is instead centred around the output of this function.

scaleCovs

A logical scalar denoting whether the fixed effects in the model should be scaled before the analysis: each covariate element is divided by its standard deviation. scaleCovs can also be a function with one argument that is a vector of covariate values. In this case the variable is instead scaled around the output of this function.

Value

A list object containing the following elements:

responseValues

The values of the response variable

responseName

The name of the response variable

hFunctions

Calls to special 'h' functions

fFunctions

Calls to special 'f' functions

sFunctions

Calls to special 's' functions

covNames

The names of the covariates used in the model specification and equivalent valid names to use in the NIMBLE model

covFrame

A data frame of the processed covariates

modelMatrix

A model matrix resulted from an expansion of the covariates performed by model.matrix

offetFrame

A data frame of offset terms used in the model

Author(s)

Joseph D. Chipperfield, joechip90@googlemail.com


joechip90/PaGAn documentation built on April 17, 2025, 4:05 p.m.