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:
-
Y
if requested (the default), they
vector used. -
W
the weights supplied, a vector of1
s if none were. -
covars
names of the covariates in the model. -
nobs
number of observations. -
covoffset
a logical value specifying if an offset is present. -
loglik
the maximized log-likelihood. -
aic
a version of Akaike's An Information Criterion, minus twice the maximized log-likelihood plus twice the number of parameters. -
bic
Bayesian Information Criterion, minus twice the maximized log-likelihood plus the number of parameters multiplied by the logarithm of the number of observations. -
df.residual
the residual degrees of freedom. -
residuals
the residuals in the final iteration of the fit. -
coefficients
a named vector of coefficients. -
betaIIpars
parameters estimates of the BetaII distribution. -
betascoefs
a vector of coefficients. -
fitted.values
the fitted mean values, obtained by transforming the linear predictors by the inverse of the link function. -
hessian
a symmetric matrix giving an estimate of the Hessian at the solution found in the optimization of the log-likelihood function. -
cov
an estimate of the covariance matrix of the model coefficients. -
se
a vector of the standard errors estimates of the estimated coefficients. -
corr
an estimate of the correlation matrix of the model coefficients. -
code
a code that indicates successful convergence of the fitter function used (seenlm
andoptim
helps). -
converged
logical value that indicates if the optimization algorithms succesfull. -
method
the name of the fitter function used. -
k
if requested, thek
value used. -
kBool
a logical value specifying whether there is ak
value or it is estimated. -
call
the matched call. -
formula
the formula supplied. -
terms
theterms
object used. -
data
thedata
argument. -
offset
the offset vector used. -
control
the value of thecontrol
argument used. -
method
the 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)