Estimate the non-parametric function and the index vector by minimizing an objective function specified by the method argument and also by choosing tuning parameter using GCV.
simestgcv(x, y, w = NULL, beta.init = NULL, nmulti = NULL,
lambda = NULL, maxit = 100, bin.tol = 1e-6,
beta.tol = 1e-5, agcv.iter = 100, progress = TRUE)An object of class sim.est, basically a list including the elements
A numeric vector storing the estimate of the index vector.
Number of multistarts used.
the input x matrix with possibly aggregated rows.
a matrix storing the initial vectors taken or given for the index parameter.
Given input lambda.
an integer storing the row index of BetaInit which lead to the estimator beta.
a list containing the paths taken by each initial index vector for nmulti times.
a matrix with nmulti rows storing the path of objective function value for multiple starts.
a numeric storing convergence status for the index parameter.
a vector of length nmulti storing the number of iterations taken by each of the multiple starts.
a numeric giving the total number of iterations taken.
method is always set to "smooth.pen.reg".
An output of the regression function used needed for predict.
sorted x.betahat values obtained by the algorithm.
corresponding y values in input.
corresponding fit values of same length as that of \(x\beta\).
corresponding values of the derivative of same length as that of \(x\beta\).
residuals obtained from the fit.
minimum value of the objective function attained.
a numeric matrix giving the values of the predictor variables or
covariates.
For the plot() and print() methods, x is an object
of class sim.est (as for sim.est()).
a numeric vector giving the values of the response variable.
a numeric vector giving lower and upper bounds for penalty used in cvx.pen and cvx.lip.
an optional numeric vector of the same length as \(x\); Defaults to all 1.
an numeric vector giving the initial value for the index vector.
an integer giving the number of multiple starts to be used for iterative algorithm. If beta.init is provided then the nmulti is set to 1.
an integer providing the number of random numbers to be
used in estimating GCV. See smooth.pen.reg for more details.
a logical denoting if progress of the algorithm to be printed. Defaults to TRUE.
a tolerance level upto which the x values used in regression are recognized as distinct values.
a tolerance level for stopping iterative algorithm for the index vector.
an integer specifying the maximum number of iterations for each initial \(\beta\) vector.
Arun Kumar Kuchibhotla
The function minimizes
$$\sum_{i=1}^n w_i(y_i - f(x_i^{\top}\beta))^2 + \lambda\int\{f''(x)\}^2dx$$
with no constraints on f. The penalty parameter \(\lambda\) is choosen
by the GCV criterion between the bounds given by lambda.
Plot and predict function work as in the case of sim.est function.
x <- matrix(runif(20*2, -1,1), ncol = 2) # 20 x 2
b0 <- rep_len(1,2)/sqrt(2)
y <- (x%*%b0)^2 + rnorm(20,0,0.3)
simG <- simestgcv(x, y, lambda = c(20^(1/6), 20^(1/4)), nmulti = 1,
agcv.iter = 10, maxit = 10, beta.tol = 1e-3)
simG # print() method
plot(simG)
predict(simG, newdata = local({ x <- seq(-1.125, 1.125, by = 1/32); cbind(x,x) }))
Run the code above in your browser using DataLab