MTE: Maximum Tangent-likelihood Estimation

Description Usage Arguments Value Examples

View source: R/MTE.R

Description

It estimates linear regression coefficient using MTE. The function produces robust estimates of linear regression. Outliers and contamination would be downweighted. It is robust to Gaussian assumption of the error term. Initial estimates need to be provided.

Usage

1
MTE(y, X, beta.ini, t, p, intercept = FALSE)

Arguments

y

the response vector

X

design matrix

beta.ini

initial value of estimates, could be from OLS.

t

the tangent point. You may specify a sequence of values, so that the function automatically select the optimal one.

p

Taylor expansion order, up to 3.

intercept

logical input that indicates if intercept needs to be estimated. Default is FALSE.

Value

beta

the regression coefficient estimates

fitted.value

predicted response

t

the optimal tangent point through data-driven method

Examples

1
2
3
4
5
6
7
8
set.seed(2017)
n=200; d=4
X=matrix(rnorm(n*d), nrow=n, ncol=d)
beta=c(1, -1, 2, -2)
y=-2+X%*%beta+c(rnorm(150), rnorm(30,10,10), rnorm(20,0,100))
beta0=beta.ls=lm(y~X)$coeff
beta.MTE=MTE(y,X,beta0,0.1,2, intercept=TRUE)$beta
cbind(c(-2,beta), beta.ls, beta.MTE)

MTE documentation built on May 2, 2019, 5:57 a.m.

Related to MTE in MTE...