ModelData {morseDR} | R Documentation |
Creates a data set for binary data analysis
Description
The data
argument contains the experimental data provided as
a data.frame
. It as to satisfied requirement of BinaryData
,
CounData
or ContinuousData
as detailled below.
The function fails if data
does not meet the
expected requirements.
Note that experimental data with time-variable exposure are not supported.
-
binaryData
This function creates aBinaryData
object from experimental data. The resulting object can then be used for plotting and model fitting. It can also be used to generate individual-time estimates. TheBinaryData
argument describes experimental results from a survival (or mobility) toxicity test. Each line of thedata.frame
corresponds to one experimental measurement, that is for instance a number of alive individuals at a given concentration at a given time point and in a given replicate. Note that either the concentration or the number of alive individuals may be missing. The data set is inferred to be under constant exposure if the concentration is constant for each replicate and systematically available. Please runbinaryDataCheck
to ensuredata
is well-formed. -
countData
: This function creates aCountData
object from experimental data provided as adata.frame
. The resulting object can then be used for plotting and model fitting. TheCountData
class is a sub-class ofBinaryData
, meaning that all functions and method available for binary data analysis can be used withCountData
objects. Please runcountDataCheck
to ensuredata
is well-formed. -
continuousData
: This function creates aContinuousData
object from experimental data provided as adata.frame
. The resulting object can then be used for plotting and model fitting. Each line of thedata.frame
. The functioncontinuousData
fails ifdata
does not meet the expected requirements. Please runcontinuousDataCheck
to ensuredata
is well-formed.
Usage
binaryData(data, ...)
## S3 method for class 'data.frame'
binaryData(data, ...)
continuousData(data, ...)
## S3 method for class 'data.frame'
continuousData(data, ...)
countData(data, ...)
## S3 method for class 'data.frame'
countData(data, ...)
modelData(data, type, ...)
## S3 method for class 'data.frame'
modelData(data, type = NULL, ...)
Arguments
data |
a
|
... |
Further arguments to be passed to generic methods |
type |
must be declared as 'binary', 'count' or 'continuous'. |
Value
An object of class BinaryData
, CountData
or
ContinuousData
.
See Also
Examples
# (1) Load the survival data set
data(zinc)
# (2) Create an objet of class 'BinaryData'
dat <- binaryData(zinc)
class(dat)
# (1) Load the data set
data(chlordan_daphnia)
# (2) Create an objet of class 'continuousData'
dat <- continuousData(chlordan_daphnia)
class(dat)
# (1) Load reproduction dataset
data(cadmium1)
# (2) Create an object of class "CountData"
dat <- countData(cadmium1)
class(dat)
# Create an objet of class 'CountData'
d <- modelData(zinc, type = "count")
class(d)