get_lambda_s: Calculate lambda_s

Description Usage Arguments References Examples

View source: R/ema.R

Description

This function calculate λ_s, an instability measure of the EMA data in one subject.The data vector is first standardized. Then we calculate λ_s as

λ_s = n_s/t_s

where n_s is the number of transitions from inside to outside the standard range, and t_s is the number of assessments with a score inside the standard range. λ_s measures the conditional probability of transitioning from inside to outside.

Usage

1

Arguments

x

numeric vector of measurements for one subject

References

\insertRef

buu2020associationEMAanalysis

Examples

1
2
x <- 1:10
get_lambda_s(x)

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