Learn R Programming

bdots (version 1.2.5)

doubleGauss2: DoubleGauss2 curve function for nlme

Description

DoubleGauss2 function used in fitting nlme curve for observations

Usage

doubleGauss2(dat, y, time, params = NULL, concave = TRUE, ...)

Arguments

dat

subject data to be used

y

outcome variable, character vector

time

time variable, character vector

params

NULL unless user wants to specify starting parameters for gnls

concave

Boolean

...

just in case

Details

User should only have to worry about setting concavity of this function. Presently only work for time series scaled out to 2000ms

y ~ (time < mu) * (exp(-1 * (time - mu) ^ 2 / (2 * sig1 ^ 2)) * (ht - base1) + base1) + (mu <= time) * (exp(-1 * (time - mu) ^ 2 / (2 * sig2 ^ 2)) * (ht - base2) + base2)