"nonlin"
to specify the reciprocal
of a predictor in the formula argument to gnm
.Inv(expression, inst = NULL)
"nonlin"
function:expression
argument passed to Inv
expression
argument is interpreted as the right hand side
of a formula in an object of class "formula"
, except that an
intercept term is not added by default. Any function of class
"nonlin"
may be used in addition to the usual operators and
functions.gnm
, formula
,
nonlin.function
## One way to fit the logistic function without conditional
## linearity as in ?nls
library(gnm)
set.seed(1)
DNase1 <- subset(DNase, Run == 1)
test <- gnm(density ~ -1 +
Mult(1, Inv(Const(1) + Exp(Mult(1 + offset(-log(conc)),
Inv(1))))),
start = c(NA, 0, 1), data = DNase1, trace = TRUE)
coef(test)
Run the code above in your browser using DataLab