Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

summarybal

Summary of a balanced longitudinal data set


Description

For a balanced longitudinal data set a vector of the mean response and variances at defined time points is returned along with the correlation matrix of the responses across the time points.

Usage

summarybal(object, Y.col, times, use = "all.obs", na.rm, ...)

Arguments

object

a longitudinal data set in the balanced format.

Y.col

the column numbers of the longitudinal measurements at each design time point in the object. This does not have to be all of the longitudinal measurements taken and may be a subset instead.

times

a vector of unique time points of the longitudinal measurements. This does not have to be all of the study time points and may be a subset instead, but should match the columns defined in Y.col.

use

an optional character string giving a method for computing covariances in the presence of missing values. This must be (an abbreviation of) one of the strings "all.obs", "complete.obs" or "pairwise.complete.obs". Defaults to use = "all.obs".

na.rm

logical. Should missing values be removed? By default, na.rm = FALSE.

...

further arguments for the summary.

Value

A list with three elements:

mean.vect

a matrix with the time points in the first column and the mean response vector as the second column.

variance

The vector of variances for the response at the time points.

cor.mtx

Containing the correlation matrix of the responses between each pair of time points.

Author(s)

Ines Sousa (isousa@math.uminho.pt)

See Also

Examples

data(mental)
summarybal(mental, Y.col = 2:7, times = c(0, 1, 2, 4, 6, 8), na.rm = TRUE)

joineR

Joint Modelling of Repeated Measurements and Time-to-Event Data

v1.2.5
GPL-3 | file LICENSE
Authors
Pete Philipson [aut, cre] (<https://orcid.org/0000-0001-7846-0208>), Ines Sousa [aut] (<https://orcid.org/0000-0002-2712-1713>), Peter J. Diggle [aut] (<https://orcid.org/0000-0003-3521-5020>), Paula Williamson [aut] (<https://orcid.org/0000-0001-9802-6636>), Ruwanthi Kolamunnage-Dona [aut] (<https://orcid.org/0000-0003-3886-6208>), Robin Henderson [aut], Graeme L. Hickey [aut] (<https://orcid.org/0000-0002-4989-0054>), Maria Sudell [ctb], Medical Research Council [fnd] (Grant numbers: G0400615 and MR/M013227/1)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.