TML.noncensored {RobustAFT} | R Documentation |
Truncated Maximum Likelihood Regression Without Censored Observations
Description
This function computes the truncated maximum likelihood regression estimate described in Marazzi and Yohai (2004). The error distribution is assumed to follow approximately a Gaussian or a log-Weibull distribution. The cut-off values for outlier rejection are fixed or adaptive.
Usage
TML.noncensored(formula, data, errors = "Gaussian", cu = NULL,
initial = "S",otp = "fixed", cov = "parametric",
input = NULL, control = list(), ...)
Arguments
formula |
A |
data |
An optional data frame containing the variables in the model. If not
found in |
errors |
|
cu |
Preliminary minimal upper cut-off. The default is 2.5 in the Gaussian case and 1.855356 in the log-Weibull case. |
initial |
|
otp |
|
cov |
|
input |
Initial input estimates of location and scale.
|
control |
Control parameters. For the default values, see the function |
... |
If fastS=TRUE, parameters for |
Value
TML.noncensored
returns an object of class "TML".
The function summary
can be used to obtain or print a summary of the results.
The generic extractor functions fitted
, residuals
and
weights
can be used to extract various elements of the value returned
by TML.noncensored
. The function update
can be used to update the model.
An object of class "TML" is a list with the following components:
th0 |
Initial coefficient estimates (S or input). |
v0 |
Initial scale (S or input). |
nit0 |
Reached number of iteration in |
th1 |
Final coefficient estimates. |
v1 |
Final scale (S or input). |
nit1 |
Number of iterations reached by the IRLS algorithm for the final estimates. |
tu , tl |
Final cut-off values. |
alpha |
Estimated proportion of retained observations. |
tn |
Number of retained observations. |
beta |
Consistency constant for scale. |
weights |
Vector of weights (0 for rejected observations, 1 for retained observations). |
COV |
Covariance matrix of the final estimates (th1[1],...,th1[p],v1) (where p=ncol(X)). |
residuals |
The residuals, that is response minus fitted values. |
fitted.values |
The fitted mean values. |
call |
The matched call. |
formula |
The formula supplied. |
terms |
The |
data |
The |
References
Marazzi A., Yohai V. (2004). Adaptively truncated maximum likelihood regression with asymmetric errors. Journal of Statistical Planning and Inference, 122, 271-291.
See Also
TML.noncensored.control
,
TML1.noncensored
, TML1.noncensored.control
,
TML.censored
Examples
## Not run:
data(D243)
Cost <- D243$Cost # Cost (Swiss francs)
LOS <- D243$LOS # Length of stay (days)
Adm <- D243$Typadm; Adm <- (Adm==" Urg")*1 # Type of admission
# (0=on notification, 1=Emergency)
Ass <- D243$Typass; Ass <- (Ass=="P" )*1 # Type of insurance
# (0=usual, 1=private)
Age <- D243$age # Age (years)
Dst <- D243$dest; Dst <- (Dst=="DOMI")*1 # Destination
# (1=Home, 0=another hospital)
Sex <- D243$Sexe; Sex <- (Sex=="M" )*1 # Sex (1=Male, 0=Female)
# Truncated maximum likelihood regression with Gaussian errors
z <- TML.noncensored(log(Cost)~log(LOS)+Adm+Ass+Age+Dst+Sex,
otp="adaptive",control=list(fastS=TRUE))
summary(z)
# Truncated maximum likelihood regression with log-Weibull errors
w <- TML.noncensored(log(Cost)~log(LOS)+Adm+Ass+Age+Dst+Sex,
errors="logWeibull",otp="adaptive",control=list(fastS=TRUE))
summary(w)
## End(Not run)