Last chance! 50% off unlimited learning
Sale ends in
makeFun(object, ...) ## S3 method for class 'formula':
makeFun( object, ...,
strict.declaration =TRUE )
## S3 method for class 'lm':
makeFun( object, ...)
## S3 method for class 'glm':
makeFun( object, ...,
type=c('response','link') )
## S3 method for class 'nls':
makeFun( object, ...)
var =
val
that set default values for the inputs to the
function.TRUE
(the default),
an error is thrown if default values are given for
variables not appearing in the object
formula.'response'
(default) or
'link'
specifying scale to be used for value of
function returned.f <- makeFun( sin(x^2 * b) ~ x & y & a); f
g <- makeFun( sin(x^2 * b) ~ x & y & a, a=2 ); g
h <- makeFun( a * sin(x^2 * b) ~ b & y, a=2, y=3); h
model <- lm(wage ~ poly(exper,degree=2), data=CPS85)
fit <- makeFun(model)
xyplot(wage ~ exper, data=CPS85)
plotFun(fit(exper) ~ exper, add=TRUE)
model <- glm(wage ~ poly(exper,degree=2), data=CPS85, family=gaussian)
fit <- makeFun(model)
xyplot(wage ~ exper, data=CPS85)
plotFun(fit(exper) ~ exper, add=TRUE)
model <- nls( wage ~ A + B * exper + C * exper^2, data=CPS85, start=list(A=1,B=1,C=1) )
fit <- makeFun(model)
xyplot(wage ~ exper, data=CPS85)
plotFun(fit(exper) ~ exper, add=TRUE)
Run the code above in your browser using DataLab