| wnl5 | R Documentation | 
It performs old type Winnonlin regression.
wnl5(Fx, Data, pNames, IE, LB, UB, Error="A", ObjFx=ObjLS)
| Fx | Function for structural model. It should return a vector of the same length to observations. | 
| Data | Data table which will be used in Fx. Fx should access this with  | 
| pNames | Parameter names in the order of Fx arguments | 
| IE | Initial estimates of parameters | 
| LB | Lower bound for  | 
| UB | Upper bound for  | 
| Error | Error model. One of  | 
| ObjFx | Objective function to be minimized. The default is least square function. | 
This uses scaled transformed parameters and environment e internally. Here we do not provide standard error. If you want standard error, use nlr.
| PE | Point estimates | 
| WRSS | Weighted Residual Sum of Square | 
| run$m | Count of positive residuals | 
| run$n | Count of negative residuals | 
| run$run | Count of runs of residuals | 
| run$p.value | P value of run test with excluding zero points | 
| Objective Function Value | Minimum value of the objective function | 
| AIC | Akaike Information Criterion | 
| SBC | Schwarz Bayesian Information Criterion | 
| Condition Number | Condition number | 
| Message | Message from  | 
| Prediction | Fitted(predicted) values | 
| Residuals | Residuals | 
| Elapsed Time | Consumed time by minimization | 
Kyun-Seop Bae <k@acr.kr>
tData = Theoph
colnames(tData) = c("ID", "BWT", "DOSE", "TIME", "DV")
fPK = function(THETA) # Prediction function
{
  DOSE = 320000 # in microgram
  TIME = e$DATA[,"TIME"] # use data in e$DATA
  K  = THETA[1]
  Ka = THETA[2]
  V  = THETA[3]
  Cp  = DOSE/V*Ka/(Ka - K)*(exp(-K*TIME) - exp(-Ka*TIME))
  return(Cp)
}
IDs = unique(tData[,"ID"])
nID = length(IDs)
for (i in 1:nID) {
  Data = tData[tData$ID == IDs[i],]
  Res = wnl5(fPK, Data, pNames=c("k", "ka", "V"), IE=c(0.1, 3, 500))
  print(paste("## ID =", i, "##"))
  print(Res)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.