1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/bracl.R
\name{bracl}
\alias{bracl}
\title{Bias reduction for adjacent category logit models for ordinal
responses using the Poisson trick.}
\usage{
bracl(
formula,
data,
weights,
subset,
na.action,
parallel = FALSE,
contrasts = NULL,
model = TRUE,
x = TRUE,
control = list(...),
...
)
}
\arguments{
\item{formula}{
a formula expression as for regression models, of the form
\code{response ~ predictors}. The response should be a factor
(preferably an ordered factor), which will be interpreted as an
ordinal response, with levels ordered as in the factor.
The model must have an intercept: attempts to remove one will
lead to a warning and be ignored. An offset may be used. See the
documentation of \code{\link{formula}} for other details.
}
\item{data}{
an optional data frame, list or environment in which to interpret
the variables occurring in \code{formula}.
}
\item{weights}{
optional case weights in fitting. Default to 1.
}
\item{subset}{
expression saying which subset of the rows of the data should be used
in the fit. All observations are included by default.
}
\item{na.action}{
a function to filter missing data.
}
\item{parallel}{if \code{FALSE} (default), then a non-proportional odds
adjacent category model is fit, assuming different effects per
category; if \code{TRUE} then a proportional odds adjacent category
model is fit. See Details.}
\item{contrasts}{
a list of contrasts to be used for some or all of
the factors appearing as variables in the model formula.
}
\item{model}{
logical for whether the model matrix should be returned.
}
\item{x}{should the model matrix be included with in the result
(default is \code{TRUE}).}
\item{control}{a list of parameters for controlling the fitting
process. See \code{\link[=brglmControl]{brglmControl()}} for details.}
\item{...}{arguments to be used to form the default \code{control}
argument if it is not supplied directly.}
}
\description{
\code{\link[=bracl]{bracl()}} is a wrapper of \code{\link[=brglmFit]{brglmFit()}} that fits adjacent category
logit models with or without proportional odds using implicit and
explicit bias reduction methods. See Kosmidis & Firth (2011) for
details.
}
\details{
The \code{\link[=bracl]{bracl()}} function fits adjacent category models, which assume
multinomial observations with probabilities with proportional odds
of the form
\deqn{\log\frac{\pi_{ij}}{\pi_{ij + 1}} = \alpha_j + \beta^T x_i}{log(pi[i, j]/pi[i, j+1]) = alpha[j] + sum(beta * x[i, ])}
or with non-proportional odds of the form
\deqn{\log\frac{\pi_{ij}}{\pi_{ij + 1}} = \alpha_j + \beta_j^T x_i}{log(pi[i, j]/pi[i, j+1]) = alpha[j] + sum(beta[j, ] * x[i, ])}
where \eqn{x_i}{x[i, ]} is a vector of covariates and \eqn{\pi_{ij}}{pi[i, j]} is the
probability that category \eqn{j} is observed at the covariate setting \eqn{i}.
}
\examples{
data("stemcell", package = "brglm2")
# Adjacent category logit (non-proportional odds)
fit_bracl <- bracl(research ~ as.numeric(religion) + gender, weights = frequency,
data = stemcell, type = "ML")
# Adjacent category logit (proportional odds)
fit_bracl_p <- bracl(research ~ as.numeric(religion) + gender, weights = frequency,
data = stemcell, type = "ML", parallel = TRUE)
}
\references{
Kosmidis I, Kenne Pagui E C, Sartori N (2020). Mean and median bias
reduction in generalized linear models. \emph{Statistics and Computing},
\strong{30}, 43-59. \doi{10.1007/s11222-019-09860-6}.
Agresti, A (2010). \emph{Analysis of Ordinal Categorical Data} (2nd
edition). Wiley Series in Probability and Statistics. Wiley.
Albert A, Anderson J A (1984). On the Existence of Maximum
Likelihood Estimates in Logistic Regression Models. \emph{Biometrika},
\strong{71}, 1-10. \doi{10.2307/2336390}.
Kosmidis I, Firth D (2011). Multinomial logit bias reduction
via the Poisson log-linear model. \emph{Biometrika}, \strong{98},
755-759. \doi{10.1093/biomet/asr026}.
Palmgren J (1981). The Fisher Information Matrix for Log Linear
Models Arguing Conditionally on Observed Explanatory
Variables. \emph{Biometrika}, \strong{68},
563-566. \doi{10.1093/biomet/68.2.563}.
}
\seealso{
\code{\link[nnet:multinom]{nnet::multinom()}}, \code{\link[=brmultinom]{brmultinom()}}
}
\author{
Ioannis Kosmidis \verb{[aut, cre]} \email{ioannis.kosmidis@warwick.ac.uk}
}
|