RAR_plot: RAR_plot

View source: R/RAR_plot.R

RAR_plotR Documentation

RAR_plot

Description

Visualizes observed and fitted activity data based on the default output from extended cosine model (RAR()). Default plotting features interpolated data where missing occurs.

Usage

RAR_plot(rar_output, predicted = c(TRUE, FALSE), id_vals = NULL)

Arguments

rar_output

default output from RAR().

predicted

specifies to plot predicted values based only on observed data (i.e. does not interpolate if missing values present). Default is FALSE.

id_vals

character vector to print plots for each participant specified. Default is NULL.

Author(s)

Jessica Graves

Examples

data(age_wise)
d <- age_wise[age_wise$id==29,]
rar_ex <- RAR(d, act, date_time)
RAR_plot(rar_ex)

# Multiple subjects
d4 <- age_wise[age_wise$id %in% c(1:4), ]
rar_ex4 <- RAR(d4, act, date_time, id_column=id)
p <- RAR_plot(rar_ex4, id_vals=c("1", "2")) # plot for participants 1 and 2 with interpolated data
p$plot_log.act # on log scale
p$plot_act # on natural scale

p2 <- RAR_plot(rar_ex4, TRUE, c("1", "2"))

JessLGraves/RAR documentation built on April 5, 2025, 3:42 p.m.