nls.predict: Predict partial residuals from an nls object

View source: R/nls.predict.r

nls.predictR Documentation

Predict partial residuals from an nls object

Description

Predict partial residuals from an nls object to be plotted with plot.fit

Usage

nls.predict(func, object, newdata = NULL, xrange = 150)

Arguments

func

formula of y ~ x | z detailing what to predict. Requires y to be the response variable of the nls obhect

object

and nls object

newdata

optional dataset to simulate across. Needs the elements required to create the prediction

xrange

number of equal-spaced x covariate values created from min(x) to max(x)

Value

a graph or a multi-level list with observed and predicted output (class c('nlsfit','fit','list'))

See Also

plot.fit, nlme.predict

Examples

DNase1 <- subset(DNase, Run == 1)

## using a selfStart model
fm1DNase1 <- nls(density ~ SSlogis(log(conc), Asym, xmid, scal), DNase1)
summary(fm1DNase1)

fm1DNase1.predict = nls.predict(density ~ conc,object = fm1DNase1)
plot(fm1DNase1.predict)
fm1DNase1.predict = nls.predict(density ~ conc,object = fm1DNase1)
plot(fm1DNase1.predict, logX = TRUE)

qPharmetra/qpToolkit documentation built on May 24, 2023, 8:52 a.m.