apci.plot.raw: data exploration: visualize age, period, and cohort patterns...

View source: R/visualization.R

apci.plot.rawR Documentation

data exploration: visualize age, period, and cohort patterns in the outcome before modeling.

Description

visualize age, period, and cohort patterns before modeling.

Usage

apci.plot.raw(data, outcome_var, age, period, ...)

Arguments

data

A data frame containing the outcome variable, age group indicator, period group indicator, and covariates to be used in the model. If the variable(s) are not found in data, there will be an error message reminding the users to check the input data again.

outcome_var

An object of class character containing the name of the outcome variable. The outcome variable can be continuous, categorical, or count.

age

An object of class character representing the age group index taking on a small number of distinct values in the data. Usually, the vector should be converted to a factor (or the terms of "category" and "enumerated type").

period

An object of class character, similar to the argument of age, representing the time period index in the data.

...

Examples

# plot the raw scores
apci.plot.raw(data = simulation, outcome_var = "y",
              age = "age", period = "period")

Jiahui1902/APCI documentation built on Sept. 6, 2024, 3:40 a.m.