snr {assist} | R Documentation |
Fit A Semi-parametric Nonlinear Regression Model
Description
This generic function fits a Semi-parametric Nonlinear Regression Model as formulated in Ke (2000).
Usage
snr(formula, func, params, data, start,
spar = "v", verbose = FALSE, control = list(), correlation = NULL,
weights = NULL)
Arguments
formula |
a model formula, with the response on the left of a |
func |
a list of spline formulae each specifying the spline components
necessary to estimate each non-parametric function. On the left
of a |
params |
a two-sided formula specifying models for the parameters.
The syntax of |
data |
an optional data frame containing the variables named in model, params, correlation and weights. By default the variables are taken from the environment from which snr is called. |
start |
a numeric list with two components: "params=", a vector of the size of the length of the unknown parameters, providing inital values for the paramters, and "f=" a list of vectors or expressions which input inital values for the unknown functions. If the unknown functions appear linear in the model, the intial values then are not necessary. |
spar |
a character string specifying a method for choosing the smoothing parameter. "v", "m" and "u" represent GCV, GML and UBR respectively. Default is "v" for GCV. |
verbose |
an optional logical numerical value. If |
control |
an optional list of control parameters. See |
correlation |
an optional |
weights |
an optional |
Details
A semi-parametric regression model is generalization of self-modeling regression, nonlinear regression and smoothing spline models, including as special cases (nonlinear) partial spline models, varying coefficients models, PP regression and some other popular models. 'snr' is implemented with an alternate iterative procedures with smoothing splines to estimate the unknown functions and general nonlinear regression to estimate parameters.
Value
An object of class snr
is returned, representing a semi-parametric
nonlinear regression fit. Generic functions such as print, summary,
intervals and predict have methods to show the results of the fit.
Author(s)
Chunlei Ke chunlei_ke@yahoo.com and Yuedong Wang yuedong@pstat.ucsb.edu.
References
Ke, C. (2000). Semi-parametric Nonlinear Regression and Mixed Effects Models. PhD thesis, University of California, Santa Barbara.
Pinheiro, J.C. and Bates, D. M. (2000). Mixed-Effects Models in S and S-PLUS. Springer.
Wahba, G. (1990). Spline Models for Observational Data. SIAM, Vol. 59.
See Also
intervals.snr
, predict.snr
, snr.control
Examples
## Not run:
data(CO2)
options(contrasts=rep("contr.treatment", 2))
co2.fit1 <- nlme(uptake~exp(a1)*(1-exp(-exp(a2)*(conc-a3))),
fixed=list(a1+a2~Type*Treatment,a3~1),
random=a1~1, groups=~Plant,
start=c(log(30),0,0,0,log(0.01),0,0,0,50),
data=CO2)
M <- model.matrix(~Type*Treatment, data=CO2)[,-1]
## fit a SNR model
co2.fit2 <- snr(uptake~exp(a1)*f(exp(a2)*(conc-a3)),
func=f(u)~list(~I(1-exp(-u))-1,lspline(u, type="exp")),
params=list(a1~M-1, a3~1, a2~Type*Treatment),
start=list(params=co2.fit1$coe$fixed[c(2:4,9,5:8)]), data=CO2)
## End(Not run)