makeModelStrings: Given a character vector of length J of variable names,...

Description Usage Arguments Details Value Author(s)

View source: R/makeModelStrings.R

Description

Given a character vector of length J of variable names, construct all K <= J combinations of possible model covariate strings.

Usage

1

Arguments

row

A data.frame of one row, containing several columns used to build a formula object. See Details.

K

An integer less than or equal to the length of variables provided via possibleCovars. Currently, only values of 1, 2, 3, 4, or 5 are allowed.

offset

A character vector of variables to include as an offset. Default is NULL. Not currently coded to do anything in the case of a non-NULL.

Details

Function makeModelStrings simply uses the combn function to select all combinations of required model covariate strings.

Required object row should include columns for each of

possibleCovars

A character vector housing the names of the different variables for which univariate models have previously been fit.

outcomeFormula

A character vector housing the name(s) of the variable used as an outcome, and intended for use within a resulting formula-type object. Can be fancier "cbind-type" character strings in the case of binomial outcomes.

baseFormula

A text string identifying any random-effect summands. Possibly blank in the case none are desired.

ziFormula

A text string identifying any zero-inflation formulae. Possibly blank in the case none are desired.

Value

A list with three objects:

modelIntY

A character vector housing formula objects for use in modeling with intercepts " + 1" explicitly included.

modelIntN

A character vector housing formula objects for use in modeling without intercepts " - 1" explicitly included.

modelZI

A character vector housing formula objects for use in modeling. Presence or absence of intercepts dictated via underlying stored csv from which row originates.

modelRaw

A character vector housing modelIntY (or modelIntN) without an intecept summand.

Author(s)

WEST, Inc.


studyvin/pollinatorAttractiveness documentation built on Dec. 23, 2021, 6:38 a.m.