P5c: Five parameter model.

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

Description

The five parameter model. An exponential decay followed by a linear phase.

Usage

1
P5c(a,X)

Arguments

a

An array of parameters;

a: parameter Units
a[1]: cone threshold (log lum)
a[2]: cone coefficient (log lum)
a[3]: cone time constant (minutes)
a[4]: S2 (log lum / minute)
a[5]: alpha point (minutes)
X

The times when the model predicts thresholds.

Details

This function has three roles, to calculate the thresholds for given parameters a and times X. If missing X, then the function calls the values x and y from the .Globalenv and calculates the sum of residuals squared error (SSE) for a. If a is an array of length 1L or boolean then a description of the model is returned.

The use of the function H rather than an impulse function gives a three-fold increase is speed for the optim function.

Value

If the input is an array of length 1L or a boolean then a list is returned

Pn

number of parameters

Mod

name of the model

If a parameter array is passed then the sum of residuals squared is calculated. This is used by optim to optimise the parameter estimates.

Passing a parameter array and a series of putative times causes the function to return predicted thresholds.

Author(s)

Jeremiah MF Kelly

Faculty of Life Sciences, The University of Manchester, M13 9PL, UK

References

O. Mahroo and T. Lamb. Recovery of the human photopic electroretinogram after bleaching exposures: estimation of pigment regeneration kinetics. The Journal of Physiology, 554(2):417, 2004.

T. Lamb and E. Pugh. Dark adaptation and the retinoid cycle of vision. Progress in Retinal and Eye Research, 23(3):307-380, 2004.

See Also

P3,P6c,P7c

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
set.seed(1234)
x <- 0:20
a <- c(-1.00,  1.00,  1.00, -0.24,  6.00,  0.20, 13.00)
tmp <- TestData(x, a)
y <- tmp$resid

P5c(TRUE)
# Describes the model

P5c(a)
# The sum of squared residuals

P5c(a,x)
# The fitted thresholds for given parameters 'theta' and times 'x'

Dark documentation built on May 2, 2019, 5:15 a.m.