Generalized Linear Model Dialog Functions

DESCRIPTION:

These functions are used by the Generalized Linear Models, Logistic Regression and Log-linear Regression dialogs. menuGam calls tabSummary.gam, tabPlot.gam and tabPredict.gam if summary, plotting and prediction results are requested.

USAGE:

menuGam(formula, family=gaussian, link=identity, variance=NULL, 
        data, weights, subset, na.omit.p=T, trace=F, maxit=10, 
        epsilon=0.001, bf.maxit=10, bf.epsilon=0.001, 
        print.short.p=F, print.long.p, save.name=NULL, save.fit.p=F, 
        save.resid.working.p=F, save.resid.pearson.p=F, 
        save.resid.deviance.p=F, save.resid.response.p=F, 
        plotResidVsFit.p=F, plotSqrtAbsResid.p=F, 
        plotResponseVsFit.p=F, plotQQ.p=F, smooths.p=F, rugplot.p=F, 
        id.n=3, plotPartialResid.p=F, plotPartialFit.p=F, 
        rugplotPartialResid.p=F, scalePartialResid.p=T, newdata=NULL, 
        predobj.name=NULL, predict.type="link", predict.p=F, se.p=F) 
tabSummary.gam(gamobj, print.short.p=F, print.long.p=T, 
        print.correlation.p=F, print.anova.p=F, save.name=NULL, 
        save.fit.p=F, save.resid.working.p=F, save.resid.pearson.p=F, 
        save.resid.deviance.p=F, save.resid.response.p=F) 
tabPlot.gam(gamobj, plotResidVsFit.p=F, plotSqrtAbsResid.p=F, 
        plotResponseVsFit.p=F, plotQQ.p=F, smooths.p=F, 
        rugplot.p=F, id.n=3, plotPartialResid.p=F, plotPartialFit.p=F, 
        rugplotPartialResid.p=F, scalePartialResid.p=T, ...) 
tabPredict.gam(object, newdata=NULL, save.name, predict.type, 
        predict.p=F, se.p=F) 

REQUIRED ARGUMENTS:

formula
a formula object, with the response on the left of a `~' operator, and the terms, separated by + operators, on the right.
gamobj
an object that inherits from class gam.

OPTIONAL ARGUMENTS:

family
the name of a family object which is a family object -- a list of functions and expressions for defining the link and variance functions, initialization and iterative weights. Families supported are gaussian, binomial, poisson, Gamma, inverse.gaussian and quasi.
link
if the family object takes a link argument it should be given here.
variance
if the family object takes a variance argument it should be given here.
data
an optional data frame in which to interpret the variables occurring in the formula.
weights
the optional weights for the fitting criterion.
subset
an 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. If na.omit.p is TRUE then na.action is set to na.omit in the call to gam. If na.omit.p is FALSE then na.action is set to na.fail in the call to gam.
trace
if TRUE, details of the iterations are printed.
maxit
the maximum number of iterations.
epsilon
convergence threshold. When

abs(new.deviance-old.deviance)/(old.deviance + epsilon) < epsilon

the algorithm is assumed to have converged.
bf.maxit
the maximum number of backfitting iterations.
bf.epsilon
the convergence threshold for backfitting iterations.
print.short.p
if TRUE, a short summary of the generalized linear model is printed. This output is from the function print.gam.
print.long.p
if TRUE, a long summary of the generalized linear model is printed. This output is from the function summary.gam.
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.working.p
if TRUE, the working residuals from the model are saved in the data frame save.name. These are the residuals from the final additive fit.
save.resid.pearson.p
if TRUE, the pearson residuals are saved in the data frame save.name. These are standardized residuals on the scale of the response.
save.resid.deviance.p
if TRUE, the deviance residuals are saved in the data frame save.name. The sum of squares of these add up to the deviance.
save.resid.response.p
if TRUE, the response residuals are saved in the data frame save.name. These are the response minus the fitted value.
plotResidVsFit.p
if TRUE, a plot of the deviance residuals versus the fitted values is created.
plotSqrtAbsResid.p
if TRUE, a plot of the absolute value of the square root of the deviance 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 pearson residuals 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, and Residual's Normal QQ plots. The row names from the model's data frame will be used to identify the points.
plotPartialResid.p
if TRUE, partial residual plots for all the terms in the model will be created.
plotPartialFit.p
if TRUE, the partial fit for the term is also displayed on the partial residual plots.
rugplotPartialResid.p
if TRUE, a rugplot is displayed on the partial residual plots. A rugplot is a sequence of vertical bars along the x-axis that mark the "observed" x values.
scalePartialResid.p
if TRUE, all the partial residual plots will have the same vertical units. This is essential for comparing the importance of fitted terms in additive models.
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.type
a character string denoting the type of prediction to be saved. The posssible values are: "link" for predictions are on the additive predictor (link) scale, "response" for predictions are on the response scale using the inverse link function and "terms" for a matrix of predictions, one for each term in the model.
predict.p
if TRUE, the predicted values are saved in predobj.name.
se.p
if TRUE, the pointwise standard errors for the predictions will be stored in predobj.name.

VALUE:

an object of class gam. See the gam.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:

, , , , , .