nlive.inspect {nlive}R Documentation

Generation of key plots for a longitudinal variable of interest

Description

The nlive.inspect() function allows to generate basic graphs to describe the longitudinal observed measures of a variable of interest in the dataset

Usage

nlive.inspect(
  dataset,
  ID,
  variable,
  time,
  plot.xlabel = NULL,
  plot.ylabel = NULL,
  spag.plot.title = NULL
)

Arguments

dataset

data frame containing the ID, variable, and time.

ID

name of the variable representing the grouping structure specified with " (e.g., "ID" representing the unique identifier of participants).

variable

name of the time-varying variable of interest specified with " (e.g., "variable").

time

name of the variable representing the timescale specified with " (e.g., "time"). Can be negative or positive.

plot.xlabel

optional text for the title of the x-axis of all plots.

plot.ylabel

optional text for the title of the y-axis of all plots.

spag.plot.title

optional text for the title of the spaghetti plot.

Value

The nlive.inspect function automatically provides (i) an histogram of all the repeated measures of the variable available over time, (ii) a spaghetti plot of the longitudinal observed variable for 70 randomly selected statistical units, (iii) repeated boxplots of the longitudinal observed variable for each time unit. The outputs are printed on the terminal and the numerical and graphical outputs are stored in a directory

Author(s)

Maude Wagner, Ana W. Capuano, Emmanuelle Comets

maude_wagner@rush.edu

References

Capuano AW, Wagner M. nlive: an R package to facilitate the application of the sigmoidal and random changepoint mixed models. BMC Medical Research Methodology. 2023;23(1):257. Hadley Wickham (2016). ggplot2: elegant graphics for data analysis. Springer.

Examples


## Not run: 
nlive.inspect(dataset=dataCog, ID="ID", variable="cognition", time="time")

## End(Not run)


[Package nlive version 0.6.0 Index]