restorePar {PBSmodelling}R Documentation

Get Actual Parameters from Scaled Values

Description

Restore scaled parameters to their original units. Used in minimization by calcMin.

Usage

restorePar(S,pvec)

Arguments

S scaled parameter vector.
pvec a data frame comprising four columns - c("val","min","max","active") and as many rows as there are model parameters. The "active" field (logical) determines whether the parameters are estimated (TRUE) or remain fixed (FALSE).

Details

Restoration algorithm: P = Pmin + (Pmax - Pmin) (sin(pi*S/2))^2

Value

Parameter vector converted from scaled units to original units specified by pvec.

See Also

scalePar, calcMin, GT0

Examples

pvec <- data.frame(val=c(1,100,10000),min=c(0,0,0),max=c(5,500,50000),
        active=c(TRUE,TRUE,TRUE))
S    <- c(.5,.5,.5)
P    <- restorePar(S,pvec)
print(cbind(pvec,S,P))

[Package PBSmodelling version 2.06 Index]