rrwAddEffectToRRWModel: This function is used to create or modify an rrwModelList

View source: R/rrwAddEffectToRRWModel.r

rrwAddEffectToRRWModelR Documentation

This function is used to create or modify an rrwModelList

Description

Function that creates or modifys an rrwModelList by adding effects to the list one at a time.

Usage

rrwAddEffectToRRWModel(
  rrwModelList = NULL,
  parameter = NULL,
  columnName = NULL,
  ParameterName = NULL,
  parameterBounds = c(0, 0, 0.001),
  df.code = NULL,
  GroupByVariables = NULL
)

Arguments

rrwModelList

A list that specifies the rrw model. If you are building a new list, then this should be NULL. If you are adding a new effect to an old list, then this should be the rrwModelList that you are adding an effect to. DEFAULT = NULL

parameter

A string that specifies the parameter that the effect being added will influence. It can take on one of the following values: "s","b","nSD", "db". "da". "vc" DEFAULT = NULL

columnName

A string that specifies the name of the column that will be created and added to the data. The column will contain the effect/dummy code of this effect. This columnName can remain NULL if this effect is constant across all conditions (therefore the dummycode would equal 1 for all conditions and therefore would be redundant). DEFAULT = NULL

ParameterName

A string that specifies the name of the free parameter for this effect. It is not the "parameter" argument above. It is, rather, a variable name that holds the free parameter values and is output in the output file. You will identify this influence of this effect by the ParameterName. DEFAULT = NULL.

parameterBounds

A vector that specifies the upperBound, lowerBound, and minimum interval, c(upper, lower, interval), that the free parameter will vary when optimized. If the upperBound==lowerBound, then this will be a fixed parameter, that is fixed at the upperBound value. DEFAULT = c(0,0,.001)

df.code

A dataframe that specifies the conditional statements for coding the dummy or effect variable. The first column is a string stating the conditional (e.g., "variableName == 'level'"), the second column is a numeric stating the value (1). Each row, is a different conditional/value. The last row, first column, must be "default" and the second column must be the default value. This df.code can remain NULL if this effect is constant across all conditions (therefore there are no conditionals). DEFAULT = NULL.

GroupByVariables

A vector of strings that specify the variable names of the grouping variable(s) that will be used by the ddply to create the summary dataset. DEFAULT = NULL. '

Value

the updated rrwModelList

Examples

rrwAddEffectToRRWModel (modelList, parameter = "b", columnName = NULL, ParameterName = overallB, parameterBounds = c(100,10,0.001), df.code = NULL, GroupByVariables = NULL))

ccpluncw/ccpl_R_RRW documentation built on July 4, 2025, 3:24 p.m.