ch.moralsPlotFitsByGrps: A function to plot multiple model fits on one graph

ch.moralsPlotFitsByGrpsR Documentation

A function to plot multiple model fits on one graph

Description

This function plots multiple model fits on one graph.

Usage

ch.moralsPlotFitsByGrps(df.models, xxyCols, xCol, data, filenameID = NULL)

Arguments

df.models

a models list containing: a dfIndex, created by ch.subsetDFbyGroups() and a series of model fits output by ch.getLmModel() or ch.getPhitModel();

xxyCols

a vector of 1 or 2 strings that specifies the names of the column in "dfIndex" that contains the grouping variables (up to two). This is required.

xCol

a string that specifies the name of the column in "data" that contains the predictor (x) variables for the fit specified in the models.

data

the morals dataframe after running through ch.moralsDataPrep().

filenameID

a string that will be put on all filenames when the plots are saved. DEFAULT = NULL (no file saved)

Value

.

Examples

ch.moralsXXYPlotFitsByGrp(df.models, "scenarioType", "agent", "overlapRound", moralsData)

ccpluncw/ccpl_R_chMorals documentation built on Feb. 4, 2024, 3:30 p.m.