datapointL2: L2 objective function for validation data point

Description Usage Arguments Details Value See Also Examples

View source: R/objClass.R

Description

L2 objective function for validation data point

Usage

1
datapointL2(name, time, value, sigma = 1, attr.name = "validation", condition)

Arguments

name

character, the name of the prediction, e.g. a state name.

time

numeric, the time-point associated to the prediction

value

character, the name of the parameter which contains the prediction value.

sigma

numeric, the uncertainty of the introduced test data point

attr.name

character. The constraint value is additionally returned in an attributed with this name

condition

character, the condition for which the prediction is made.

Details

Computes the constraint value

(pred-p[names(mu)])^2/sigma^2

and its derivatives with respect to p.

Value

List of class objlist, i.e. objective value, gradient and Hessian as list.

See Also

wrss, constraintL2

Examples

1
2
3
4
5
6
7
prediction <- list(a = matrix(c(0, 1), nrow = 1, dimnames = list(NULL, c("time", "A"))))
derivs <- matrix(c(0, 1, 0.1), nrow = 1, dimnames = list(NULL, c("time", "A.A", "A.k1")))
attr(prediction$a, "deriv") <- derivs
p0 <- c(A = 1, k1 = 2)

vali <- datapointL2(name = "A", time = 0, value = "newpoint", sigma = 1, condition = "a")
vali(pars = c(p0, newpoint = 1), env = .GlobalEnv)

dMod documentation built on Jan. 27, 2021, 1:07 a.m.