asm.fit {asm} | R Documentation |
Fit a linear regression model via antitonic score matching
Description
Performs linear regression via M-estimation with respect to a data-driven convex loss function
Usage
asm.fit(
X,
Y,
betapilot = "OLS",
alt_iter = 1,
intercept.selection = "mean",
k = 3000,
max_iter = 65,
kernel_pts = 2^15,
bw = "nrd0",
kernel = "gaussian",
verbose = FALSE,
...
)
Arguments
X |
design matrix |
Y |
response vector |
betapilot |
initial estimate of the regression coefficients: can be "LAD", "OLS" or a vector of coefficients |
alt_iter |
number of iterations of the alternating procedure: when alt_iter == 1, this function is equivalent to asm_regression |
intercept.selection |
mean or median of the residuals if intercept.selection == "median", then the standard error of the intercept estimate is set to NA |
k |
the density quantile function is evaluated at (0, 1/ |
max_iter |
maximum number of iterations for the damped Newton–Raphson algorithm when minimizing the convex loss function |
kernel_pts |
number of points at which the kernel density estimate is evaluated, i.e. the parameter "n" in density() |
bw |
bandwidth for kernel density estimation i.e. the parameter "bw" in density() |
kernel |
kernel for kernel density estimation i.e. the parameter "kernel" in density() |
verbose |
logical; if TRUE, print optimization progress |
... |
additional arguments to ensure compatibility with generic functions |
Value
asm
class object containing the following components:
betahat
:vector of estimated coefficients
std_errs
:vector of standard errors of the estimated coefficients
fitted.values
:fitted values
residuals
:residuals
zvals
:z-values
sig_vals
:p-values
info_asm
:antitonic information
I_mat
:estimated antitonic information matrix
Cov_mat
:asymptotic covariance matrix of the estimated coefficients
psi
:estimated antitonic score function
Examples
n <- 1000 ; d <- 2
X <- matrix(rnorm(n * d), n, d)
Y <- X %*% c(2, 3) + rnorm(n) # no intercept!
asm.fit(X,Y)