| restorePar {PBSmodelling} | R Documentation |
Restore scaled parameters to their original units. Used in minimization by calcMin.
restorePar(S,pvec)
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). |
Restoration algorithm: P = Pmin + (Pmax - Pmin) (sin(pi*S/2))^2
Parameter vector converted from scaled units to original units specified by pvec.
Jon Schnute, Pacific Biological Station, Nanaimo BC
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))