Learn R Programming

assist (version 2.0)

gdsidr: Interface of dbsdr, dbisdr, dgsdr, dpsdr in GRKPACK.

Description

To calculate a spline estimate with single smoothing parameter for non-Gaussian data.

Usage

gdsidr(y, q, s, family, vmu="v", varht=NULL, limnla=c(-10, 3), 
maxit=30, job=-1, tol1=0, tol2=0, prec=1e-06)

Arguments

y
a numerical vector representing the response, or a matrix of two columns for binomial data with the first column as the largest possible counts and the second column as the counts actually obsered.
q
a square matrix of the same order as the length of y, with elements equal to the reproducing kernel evaluated at the design points.
s
the design matrix of the null space $H_0$ of size (length-of-y,dim($H_0$)), with elements equal to the bases of $H_0$ evaluated at design points.
family
a string specifying the family of distribution. Families supported are "binary", "binomial", "poisson" and "gamma" for Bernoulli, binomial, poisson, and gamma distributions respectively. Canonical links are used except for Gamma family where a log link
vmu
a character string specifying a method for choosing the smoothing parameter. "v", "m" and "u" represent GCV, GML and UBR respectively. "u$\sim$", only used for non-Gaussian family, specifies UBR with estimated variance. Default is "v".
varht
needed only when vmu="u", which gives the fixed variance in calculation of the UBR function. Default is 1.0.
limnla
a vector of length 2, specifying a search range for the n times smoothing parameter on log10 scale. Default is (-10, 3).
maxit
maximum number of iterations allowed for the iteration in GRKPACK.
job
an integer representing the optimization method used to find the smoothing parameter. The options are job=-1: golden-section search on (limnla(1), limnla(2)); job=0: golden-section search with interval specified automatically; job >0: regular grid sea
tol1
the tolerance for elements of w's. Default is 0.0 which sets to square of machine precision.
tol2
tolerance for truncation used in `dsidr'. Default is 0.0 which sets to square of machine precision.
prec
precision requested for stopping the iteration. Default is $1e-06$.

Value

  • infoan integer that provides error message. info=0 indicates normal termination, info=-1 indicates dimension error, info=-2 indicates $F_{2}^{T} Q F_{2} !>= 0$, info=-3 indicates vmu is out of scope, info=-4 indicates the algorithm fails to converge at the maxiter steps, info=-5 indicates there are some w's equals to zero, and info>0 indicates the matrix S is rank deficient with info=rank(S)+1.
  • fitestimate of the function at design points.
  • cestimates of c.
  • destimates of d.
  • resivector of working residuals.
  • varhtestimate of dispersion parameter.
  • nlahtthe estimate of $log10(nobs*lambda)$.
  • limnlasearching range for nlaht.
  • scorethe minimum GCV/GML/UBR score at the estimated smoothing parameter. When job>0, it gives a vector of GCV/GML/UBR functions evaluated at regular grid points.
  • dfequavilent degree of freedom.
  • nobslength-of-y, number of observations.
  • nnull$dim(H_0)$, number of bases.
  • s,qraux,jpvtQR decomposition of S=FR, as from Linpack `dqrdc'.
  • qfirst $dim(H_0)$ columns gives $F^{T} Q F_{1}$, and its bottom-right corner gives tridiagonalization of $F_{2}^{T} Q F_{2}$.

References

Wahba, G. (1990). Spline Models for Observational Data. SIAM, Vol. 59.

Wang, Y. (1997). GRKPACK: Fitting Smoothing Spline ANOVA Models for Exponential Families. Communications in Statistics: Simulation and Computation, 24: 1037-1059.

See Also

dsidr, dmudr, gdmudr, ssr