Const | R Documentation |
A symbolic wrapper to specify a constant in the predictor of a
"nonlin"
function.
Const(const)
const |
a numeric value. |
A call to rep
used to create a variable representing the
constant in the model frame.
Const
may only be used in the predictor of a "nonlin"
function. Use offset
to specify a constant in the model formula.
Heather Turner
gnm
, formula
, offset
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.