Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
stressaddition
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
oekotox
stressaddition
Merge requests
!17
Bugfix/documentation
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Bugfix/documentation
bugfix/documentation
into
develop
Overview
0
Commits
3
Pipelines
0
Changes
6
Merged
Sebastian Henz
requested to merge
bugfix/documentation
into
develop
5 years ago
Overview
0
Commits
3
Pipelines
0
Changes
6
Expand
Fix the documentation in
ecxsys
and
predict_ecxsys
.
Edited
5 years ago
by
Sebastian Henz
👍
0
👎
0
Merge request reports
Compare
develop
version 2
1901f4f5
5 years ago
version 1
d4db6ed4
5 years ago
develop (base)
and
latest version
latest version
9e296194
3 commits,
5 years ago
version 2
1901f4f5
2 commits,
5 years ago
version 1
d4db6ed4
1 commit,
5 years ago
6 files
+
95
−
52
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
6
Search (e.g. *.vue) (Ctrl+P)
R/ecxsys.R
+
31
−
12
Options
@@ -8,8 +8,8 @@
#' ECx-SyS
#'
#' The ECx-SyS model for modeling concentration-effect relationships whi
c
h
#'
indicate signs of
hormesis.
#' The ECx-SyS model for modeling concentration-effect relationships whi
t
h
#' hormesis.
#'
#' It is advised to complete the curve down to zero for optimal prediction.
#' Therefore \code{effect_tox_observed} in the highest concentration should be
@@ -20,9 +20,8 @@
#' \code{effect_tox_env_observed} (if provided) must be of equal length and
#' sorted by increasing concentration.
#'
#' @param concentration A vector of concentrations, one of which must be 0 to
#' indicate the control. Should be sorted in ascending order, otherwise it
#' will be sorted automatically.
#' @param concentration A vector of concentrations. Must be sorted in ascending
#' order and the first element must be 0 to indicate the control.
#' @param hormesis_concentration The concentration where the hormesis occurs.
#' This is usually the concentration of the highest effect after the control.
#' @param effect_tox_observed A vector of effect values observed at the given
@@ -34,10 +33,31 @@
#' survival data in percent this should be 100 (the default).
#' @param p,q The shape parameters of the beta distribution. Default is 3.2.
#'
#' @return A list (of class ecxsys) containing many different objects with the
#' most important being \code{curves}, a data frame containing effect and
#' stress values at different concentrations. See \code{\link{predict_ecxsys}}
#' for details.
#' @return A list (of class ecxsys) containing many different objects of which
#' the most important are listed below. The effect and stress vectors
#' correspond to the provided concentrations.
#' \describe{
#' \item{effect_tox}{Modeled effect resulting from toxicant stress.}
#' \item{effect_tox_sys}{Modeled effect resulting from toxicant and system
#' stress.}
#' \item{effect_tox_env}{Modeled effect resulting from toxicant and
#' environmental stress.}
#' \item{effect_tox_env_sys}{Modeled effect resulting from toxicant,
#' environmental and system stress.}
#' \item{effect_tox_LL5}{The effect predicted by the five-parameter
#' log-logistic model derived from the observations under toxicant stress
#' but without environmental stress.}
#' \item{effect_tox_env_LL5}{The effect predicted by the five-parameter
#' log-logistic model derived from the observations under toxicant stress
#' with environmental stress.}
#' \item{curves}{A data frame containing effect and stress values as
#' returned by \code{\link{predict_ecxsys}}. The concentrations are
#' regularly spaced on a logarithmic scale in the given concentration range.
#' The control is approximated by the lowest non-control concentration times
#' 1e-7. The additional column \code{use_for_plotting} is used by the
#' plotting functions of this package to approximate the control and
#' generate a break in the concentration axis.}
#' }
#'
#' @examples model <- ecxsys(
#' concentration = c(0, 0.03, 0.3, 3, 10),
@@ -46,7 +66,7 @@
#' effect_tox_env_observed = c(24, 23, 32, 0, 0)
#' )
#'
#' # Use effect_max if for example the effect is given as the number of
#' # Use effect_max if for example the effect is given as the
average
number of
#' # surviving animals and the initial number of animals is 20:
#' model <- ecxsys(
#' concentration = c(0, 0.03, 0.3, 3, 10),
@@ -111,8 +131,7 @@ ecxsys <- function(concentration,
if
(
any
(
is.na
(
c
(
all_observations
,
concentration
))))
{
stop
(
"Values containing NA are not supported."
)
}
if
(
any
(
all_observations
>
effect_max
)
||
any
(
all_observations
<
0
))
{
if
(
any
(
all_observations
>
effect_max
)
||
any
(
all_observations
<
0
))
{
stop
(
"Observed effect must be between 0 and effect_max."
)
}
conc_shift
<-
2
# Powers of ten to shift the control downwards from the
Loading