nlme.run | R Documentation |
wrapper function for nlme
model "method", and which adds a problem description (like $PROB in NONMEM) and the number of a reference model, the numeric position in the model building trail. This is intended to help building a model trail output in conjunction with nlme.modeltrail
.
## S3 method for class 'run'
nlme(...)
... |
a vector consisting of an nlme call, a problem statement, and a reference number (to which the run will be compared) |
a list with the nlme object and the assocated proble statement and reference number
nlme.modeltrail
, nlme.vpc
library(nlme)
fm1 = nlme(height ~ SSasymp(age, Asym, R0, lrc),
data = Loblolly,
fixed = Asym + R0 + lrc ~ 1,
random = Asym ~ 1,
start = c(Asym = 103, R0 = -8.5, lrc = -3.3))
summary(fm1)
fm2 = update(fm1, random = pdDiag(Asym + lrc ~ 1))
summary(fm2)
# Now the same thing but using nlme.run()
fm1 = nlme.run(height ~ SSasymp(age, Asym, R0, lrc),
data = Loblolly,
fixed = Asym + R0 + lrc ~ 1,
random = Asym ~ 1,
start = c(Asym = 103, R0 = -8.5, lrc = -3.3),
problem = "Initial model",
reference = 0
)
summary(fm1$object) # note one must specify "$object" here
fm1$problem
#"Initial model"
fm1$reference
#0
fm2 = nlme.run(height ~ SSasymp(age, Asym, R0, lrc),
data = Loblolly,
fixed = Asym + R0 + lrc ~ 1,
random = pdDiag(Asym + lrc ~ 1),
start = c(Asym = 103, R0 = -8.5, lrc = -3.3),
problem = "Different random effect",
reference = 1
)
summary(fm2$object)
fm2$problem
#"Different random effect"
fm2$reference
#1
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.