plsim.est {PLSiMCpp} | R Documentation |
Profile Least Squares Estimator
Description
PLS was proposed by Liang et al. (2010) to estimate parameters in PLSiM
Y = \eta(Z^T\alpha) + X^T\beta + \epsilon.
Usage
plsim.est(...)
## S3 method for class 'formula'
plsim.est(formula, data, ...)
## Default S3 method:
plsim.est(xdat=NULL, zdat, ydat, h=NULL, zetaini=NULL, MaxStep = 200L,
ParmaSelMethod="SimpleValidation", TestRatio=0.1, K = 3, seed=0, verbose=TRUE, ...)
Arguments
... |
additional arguments. |
formula |
a symbolic description of the model to be fitted. |
data |
an optional data frame, list or environment containing the variables in the model. |
xdat |
input matrix (linear covariates). The model reduces to a single index model when |
zdat |
input matrix (nonlinear covariates). |
ydat |
input vector (response variable). |
h |
a value or a vector for bandwidth. If |
zetaini |
initial coefficients, optional (default: NULL). It could be obtained by the function |
MaxStep |
the maximum iterations, optional (default=200). |
ParmaSelMethod |
the parameter for the function plsim.bw. |
TestRatio |
the parameter for the function plsim.bw. |
K |
the parameter for the function plsim.bw. |
seed |
int, default: 0. |
verbose |
bool, default: TRUE. Enable verbose output. |
Value
eta |
estimated non-parametric part |
zeta |
estimated coefficients. |
y_hat |
|
mse |
mean squared errors between y and |
data |
data information including |
Z_alpha |
|
r_square |
multiple correlation coefficient. |
variance |
variance of |
stdzeta |
standard error of |
References
H. Liang, X. Liu, R. Li, C. L. Tsai. Estimation and testing for partially linear single-index models. Annals of statistics, 2010, 38(6): 3811.
Examples
# EXAMPLE 1 (INTERFACE=FORMULA)
# To estimate parameters of partially linear single-index model (PLSiM).
n = 50
sigma = 0.1
alpha = matrix(1,2,1)
alpha = alpha/norm(alpha,"2")
beta = matrix(4,1,1)
# Case 1: Matrix Input
x = matrix(1,n,1)
z = matrix(runif(n*2),n,2)
y = 4*((z%*%alpha-1/sqrt(2))^2) + x%*%beta + sigma*matrix(rnorm(n),n,1)
fit = plsim.est(y~x|z)
summary(fit)
# Case 2: Vector Input
x = rep(1,n)
z1 = runif(n)
z2 = runif(n)
y = 4*((z%*%alpha-1/sqrt(2))^2) + x%*%beta + sigma*matrix(rnorm(n),n,1)
fit = plsim.est(y~x|z1+z2)
summary(fit)
print(fit)
# EXAMPLE 2 (INTERFACE=DATA FRAME)
# To estimate parameters of partially linear single-index model (PLSiM).
n = 50
sigma = 0.1
alpha = matrix(1,2,1)
alpha = alpha/norm(alpha,"2")
beta = matrix(4,1,1)
x = rep(1,n)
z1 = runif(n)
z2 = runif(n)
X = data.frame(x)
Z = data.frame(z1,z2)
x = data.matrix(X)
z = data.matrix(Z)
y = 4*((z%*%alpha-1/sqrt(2))^2) + x%*%beta + sigma*matrix(rnorm(n),n,1)
fit = plsim.est(xdat=X,zdat=Z,ydat=y)
summary(fit)
print(fit)