This script creates data in the form of a dark object from specified times, parameters, and level of variability. It is used for testing and developing other scripts. Presently only the seven parameter model and its subsets are implemented.
TestData(x, theta, sse, repeatable)
The function returns a dark object with the following components;
a label describing the last call the object was subject to
the time observations
thresholds
residuals
thresholds predicted in the absence of noise
parameters passed to the function
the sum of squared residuals value used to describe the variability in the data
the actual sse of the generated data
the name of the data source
the times at which observations are made.
the parameters of the Mahroo Lamb Pugh model
theta : | parameter | default | Units |
theta[1]: | cone threshold | -1 | |
(log lum) | theta[2]: | cone coefficient | 1 |
(log lum) | theta[3]: | cone time constant | 1 |
(minutes) | theta[4]: | S2 | -0.24 |
(log lum/ minute) | theta[5]: | alpha point | 6 |
(minutes) | theta[6]: | -(S2 + S3) | 0.20 |
(log luminance) | theta[7]: | beta point | 13 |
the variability of the data
a boolean flag that ensures that the function can return the same values each time it is called.
Jeremiah MF Kelly
Mumac Ltd, SK7 6NR, GB
The parameters values chosen as defaults are entirely arbitrary. The sixth parameter is the negative sum of the rates of rod recovery called S2 and S3
L. Patryas, N. R. Parry, D. Carden, D. H. Baker, J. M. Kelly, T. Aslam, and I. J. Murray. Assessment of age changes and repeatability for computer-based rod dark adaptation. Graefe's Archive for Clinical and Experimental Ophthalmology, pages 1-7, 2013.
set.seed(1234)
x <- seq(0,20)
tmp <- TestData(x)
tmp
Run the code above in your browser using DataLab