summarize_EMA_data: Get the data summarize for the EMA variable

Description Usage Arguments Value References Examples

View source: R/ema.R

Description

This function returns the summary of the EMA variable, which include the mean, variance, autocorrelation, λ_o and λ_s for each subject. The function will return a n*6 matrix, where n is the number of subjects. In each row, we record the subject's ID, and his/her five summary variables listed above.

Usage

1

Arguments

ID

a vector contain all the IDs for each measurement in x.

x

a vector contain all the measurements for all the subjects.

Value

Matrix of dimension n*6, where n is the number of subject. The six columns are: ID, mean, variance, autocorrelation, λ_o and λ_s, respectively.

References

\insertRef

buu2020associationEMAanalysis

Examples

1
2
3
ID = rep(seq(1:10), each = 8)
x = rnorm(80)
summarize_EMA_data(ID, x)

zhanruicai/EMAanalysis documentation built on Feb. 7, 2021, 12:16 a.m.