RAR_plot | R Documentation |
Visualizes observed and fitted activity data based on the default output from extended cosine model (RAR()). Default plotting features interpolated data where missing occurs.
RAR_plot(rar_output, predicted = c(TRUE, FALSE), id_vals = NULL)
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. |
Jessica Graves
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"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.