| gw {GWRM} | R Documentation |
Fitting GWRM Models
Description
gw is used to fit Generalized Waring Regression Models (GWRM), specified by giving a symbolic description of the linear predictor.
Usage
gw(
formula,
data,
weights,
k = NULL,
subset,
na.action,
kstart = 1,
rostart = 2,
betastart = NULL,
offset,
control = list(...),
method = NULL,
hessian = TRUE,
model = TRUE,
x = FALSE,
y = TRUE,
...
)
Arguments
formula |
an object of class "formula" (or one that can be coerced to that class): a symbolic description of the model to be fitted. |
data |
an optional data frame, list or environment (or object coercible by as.data.frame to a data frame) containing the variables in the model. If not found in data, the variables are taken from |
weights |
an optional vector of 'prior weights' to be used in the fitting process. Should be |
k |
optional value for the |
subset |
an optional vector specifying a subset of observations to be used in the fitting process. |
na.action |
a function which indicates what should happen when the data contain |
kstart |
starting value for the |
rostart |
starting value for the |
betastart |
starting values for the vector of means. |
offset |
this can be used to specify an a priori known component to be included in the linear predictor during fitting. This should be |
control |
a list of parameters for controlling the fitting process. |
method |
the method to be used in fitting the model. The default method initially uses non-linear minimization ( |
hessian |
if |
model |
a logical value indicating whether model frame should be included as a component of the returned value. |
x, y |
For For |
... |
further arguments. |
Value
gw returns an object of class "gw". The function summary can be used to obtain or print a summary of the results. An object of class "gw" is a list containing the following components:
-
Yif requested (the default), theyvector used. -
Wthe weights supplied, a vector of1s if none were. -
covarsnames of the covariates in the model. -
nobsnumber of observations. -
covoffseta logical value specifying if an offset is present. -
loglikthe maximized log-likelihood. -
aica version of Akaike's An Information Criterion, minus twice the maximized log-likelihood plus twice the number of parameters. -
bicBayesian Information Criterion, minus twice the maximized log-likelihood plus the number of parameters multiplied by the logarithm of the number of observations. -
df.residualthe residual degrees of freedom. -
residualsthe residuals in the final iteration of the fit. -
coefficientsa named vector of coefficients. -
betaIIparsparameters estimates of the BetaII distribution. -
betascoefsa vector of coefficients. -
fitted.valuesthe fitted mean values, obtained by transforming the linear predictors by the inverse of the link function. -
hessiana symmetric matrix giving an estimate of the Hessian at the solution found in the optimization of the log-likelihood function. -
covan estimate of the covariance matrix of the model coefficients. -
sea vector of the standard errors estimates of the estimated coefficients. -
corran estimate of the correlation matrix of the model coefficients. -
codea code that indicates successful convergence of the fitter function used (seenlmandoptimhelps). -
convergedlogical value that indicates if the optimization algorithms succesfull. -
methodthe name of the fitter function used. -
kif requested, thekvalue used. -
kBoola logical value specifying whether there is akvalue or it is estimated. -
callthe matched call. -
formulathe formula supplied. -
termsthetermsobject used. -
datathedataargument. -
offsetthe offset vector used. -
controlthe value of thecontrolargument used. -
methodthe name of the fitter function used. -
contrasts(where relevant) the contrasts used. -
xlevels(where relevant) a record of the levels of the factors used in fitting.
Examples
data(goals)
gw(goals ~ position + offset(log(played)), data = goals)