plsim.ini {PLSiMCpp} | R Documentation |
Initialize coefficients
Description
Xia et al.'s MAVE method is used to obtain initialized
coefficients \alpha_0
and \beta_0
for PLSiM
Y = \eta(Z^T\alpha) + X^T\beta + \epsilon
.
Usage
plsim.ini(...)
## S3 method for class 'formula'
plsim.ini(formula, data, ...)
## Default S3 method:
plsim.ini(xdat, zdat, ydat, Method="MAVE_ini", 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). |
Method |
string, optional (default="MAVE_ini"). |
verbose |
bool, default: TRUE. Enable verbose output. |
Value
zeta_i |
initial coefficients. |
References
Y. Xia, W. Härdle. Semi-parametric estimation of partially linear single-index models. Journal of Multivariate Analysis, 2006, 97(5): 1162-1184.
Examples
# EXAMPLE 1 (INTERFACE=FORMULA)
# To obtain initial values by using MAVE methods for partially
# linear single-index model.
n = 50
sigma = 0.1
alpha = matrix(1,2,1)
alpha = alpha/norm(alpha,"2")
beta = matrix(4,1,1)
# Case1: 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)
zeta_i = plsim.ini(y~x|z)
# 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)
zeta_i = plsim.ini(y~x|z1+z2)
# EXAMPLE 2 (INTERFACE=DATA FRAME)
# To obtain initial values by using MAVE methods for partially
# linear single-index model.
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)
zeta_i = plsim.ini(xdat=X, zdat=Z, ydat=y)