Robust MM Linear Regression Dialog Function

DESCRIPTION:

This function is used by the Robust MM Linear Regression dialog.

USAGE:

menuLmRobMM(formula, data, weights, subset, na.omit.p=T, level.p=0.1, 
     eff.p=0.85, mxi.p=NULL, tol.p=NULL, nrep.p=NULL, seed.p=1313, 
     sampling.p="Auto", estimates.p="Auto", weight1.p="Optimal", 
     weight2.p="Optimal", popsize.p="Auto", mprob.p="Auto", 
     randomn.p="Auto", births.p="Auto", stock.p="Auto", stockp.p="Auto", 
     maxslen.p="Auto", print.short.p=T, print.long.p=F, 
     print.correlation.p=F, print.cmpr.p=F, save.name=NULL, save.fit.p=F, 
     save.resid.p=F, plotResidVsFit.p=F, plotSqrtAbsResid.p=F, 
     plotResponseVsFit.p=F, plotQQ.p=F, plotRFSpread.p=F, plotCooks.p=F, 
     smooths.p=F, rugplot.p=F, id.n=3, plotRQQ.p=F, plotRDensity.p=F, 
     plotRResid.p=F, plotRResp.p=T, newdata=NULL, predobj.name=NULL, 
     predict.p=F, ci.p=F, se.p=F, conf.level=0.95, print.anova.p=T) 

REQUIRED ARGUMENTS:

formula
a formula object, with the response on the left of a `~' operator, and the terms, separated by + operators, on the right.
data
a data.frame in which to interpret the variables named in the formula, or in the subset and the weights argument.

OPTIONAL ARGUMENTS:

weights
vector of observation weights; if supplied, the algorithm fits to minimize the sum of the weights multiplied into the squared residuals. The length of weights must be the same as the number of observations. The weights must be nonnegative and it is strongly recommended that they be strictly positive, since zero weights are ambiguous, compared to use of the subset argument.
subset
expression saying which subset of the rows of the data should be used in the fit. This can be a logical vector (which is replicated to have length equal to the number of observations), or a numeric vector indicating which observation numbers are to be included, or a character vector of the row names to be included. All observations are included by default.
na.omit.p
if TRUE, then any observation with missing values are removed from the analysis. If FALSE and there are missing values then the function will exit with a message that missing values are not allowed. f na.omit.p is TRUE then na.action is set to na.omit in the call to lmRobMM. If na.omit.p is FALSE then na.action is set to na.fail in the call to lmRobMM.
level.p
the level of significance of the test for bias of the final M-estimates.
eff.p
the asymptotic efficiency of the final M-estimates.
mxi.p
maximum number of iterations.
tol.p
the relative tolerance in the iterative algorithms.
nrep.p
number of replications in the sampling algorithm.
seed.p
integer to be passed to set.seed to specify a particular random number seed.
sampling.p
sampling method.
estimates.p
estimation method.
weight1.p
loss function type for initial estimates.
weight2.p
loss function type for final estimates.
popsize.p
population size for genetic algorithm.
mprob.p
mutation probabiliy for genetic algorithm.
randomn.p
number of random samples for genetic algorithm.
births.p
number of births for genetic algorithm.
stock.p
a list of vectors of observation numbers to be included in the stock.
stockp.p
vector of cumulative probabilities that a member of the stock will be chosen as a parent. The ith element corresponds to the individual with the ith lowest objective.
maxslen.p
the maximum number of observations (including duplicates) in a member of the stock.
print.short.p
if TRUE, a short summary of the linear regression is printed. This output is from the function print.lm.
print.long.p
if TRUE, a long summary of the linear regression is printed. This output is from the function summary.lm.
print.correlation.p
if TRUE, the correlation matrix of the regression coefficients is printed. This is only available if print.long.p is TRUE and results in calling summary.lm with correlation=TRUE.
save.name
a character string for the name of the data frame to save the fit and residuals in. If data frame with this name already exists in database 1 and it has the appropriate number of rows then the saved values will be appended to the data frame. If the object already exist in database 1 and it is not a data frame or it does not have the appropriate number of rows then a new name is created by appending a number to save.name and the results are saved in the data frame with the new name.
save.fit.p
if TRUE, the fitted values from the regression are saved in the data frame save.name.
save.resid.p
if TRUE, the residuals from the regression are saved in the data frame save.name.
plotResidVsFit.p
if TRUE, a plot of the residuals versus the fitted values is created.
plotSqrtAbsResid.p
if TRUE, a plot of the absolute value of the square root of the residuals versus the fitted values is created. This plot is useful for checking for the constant variance assumption of the model.
plotResponseVsFit.p
if TRUE, a plot of the response versus the fitted values is created.
plotQQ.p
if TRUE, a Normal quantile-quantile plot of the residuals is created.
plotRFSpread.p
if TRUE, a residual-fit spread plot is created. This is a visual analog to the multiple R-squared statistic. It compares the spread of the fitted values to the spread of the residuals.
plotCooks.p
if TRUE, a plot of Cooks distance values versus the observation number is created.
smooths.p
if TRUE a smooth curve, computed with loess.smooth is displayed on the Residuals vs Fit, Sqrt Abs Residuals vs Fit and Response vs Fit plots.
rugplot.p
if TRUE, a rugplot is displayed on the Residuals vs Fit, Sqrt Abs Residuals vs Fit and Response vs Fit plots. A rugplot is a sequence of vertical bars along the x-axis that mark the "observed" x values.
id.n
the number of extreme points that will be identified on the Residuals vs Fit, Sqrt Abs Residuals vs Fit, Residual's Normal QQ and Cook s Distance plots. The row names from the models data frame will be used to identify the points.
plotRQQ.p
if TRUE, a comparison QQ plot for the robust and standard linear fits is displayed.
plotRDensity.p
if TRUE, a comparison density plot for the robust and standard linear fits is displayed.
plotRResid.p
if TRUE, a comparison residual vs. fit plot for the robust and standard linear fits is displayed.
plotRResp.p
if TRUE, a comparison response vs. fit plot for the robust and standard linear fits is displayed.
newdata
a data frame to use for computing predictions. It must contain the same names as the terms in the right side of the formula for the model. If missing, the predictions for the original data are computed.
predobj.name
a character string for the name of the data frame to save the predictions, standard errors and confidence intervals in. If data frame with this name already exists in database 1 and it has the appropriate number of rows then the values will be appended to the data frame. If the object already exist in database 1 and it is not a data frame or it does not have the appropriate number of rows then a new name is created by appending a number to predobj.name and the values are saved in data frame with the new name.
predict.p
if TRUE, the predicted values are saved in predobj.name.
ci.p
if TRUE, lower and upper confidence limits will be stored in the predobj.name The column names will be "xx % L.C.L." and "xx% U.C.L" where xx is the value specified in conf.level. These confidence limits are for the mean response and are computed as the prediction plus/minus t-value * standard error.
se.p
if TRUE, the pointwise standard errors for the predictions will be stored in predobj.name.
conf.level
the confidence level to use when computing confidence intervals.
print.anova.p
if TRUE, an ANOVA table for the linear regression is printed. This output is from the function anova.lm.

VALUE:

an object of class lmRobMM. See the lmRobMM.object help file for details.

SIDE EFFECTS:

Plots will be drawn if requested. The objects save.name and predobj.name will be created or appended to if fitted values, residuals or predictions are saved.

SEE ALSO:

, .