borbely: Solve Borbely's model

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/borbely.R

Description

Solves the Borbely's sleep-wake model for the given times, initial condition and parameters

Usage

1
borbely(ts, y0, awake0 = FALSE, parms = borbely_default_parms())

Arguments

ts

Vector of times (in h)

y0

Initial condition

awake0

Initial state (TRUE for awake, FALSE for asleep)

parms

Model parameters (optional, see borbely_default_parms)

Value

Results of the simulation, including times, states and asleep/awake status

Author(s)

Pablo Rodríguez-Sánchez (https://pabrod.github.io)

References

Skeldon AC, Dijk D-J, Derks G. Mathematical Models for Sleep-Wake Dynamics: Comparison of the Two-Process Model and a Mutual Inhibition Neuronal Model. PLoS One. 2014 Aug 1;9(8):e103877. Available from: http://dx.plos.org/10.1371/journal.pone.0103877

See Also

borbely_default_parms

Examples

1
2
ts <- seq(0, 10, length.out = 2000)
sol <- borbely(seq(0, 10, length.out = 2000), 1)

PabRod/sleepR documentation built on Dec. 21, 2020, 3:27 p.m.