Old type WinNonlin - Least Square not MLE
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 e$DATA
.pNames
: Parameter names in the order of Fx argumentsIE
: Initial estimates of parametersLB
: Lower bound for optim
function. The default value is 0.UB
: Upper bound for optim
function. The default value is 1e+06.Error
: Error model. One of "POIS"
for Poisson error, "P"
for proportional error, and others for additive error model.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 optim
.
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) }