BradleyTerry2/0000755000176200001440000000000012465776046012765 5ustar liggesusersBradleyTerry2/inst/0000755000176200001440000000000012465715316013733 5ustar liggesusersBradleyTerry2/inst/CITATION0000644000176200001440000000130411752423322015055 0ustar liggesuserscitHeader("To cite BradleyTerry2 in publications use:") citEntry(entry = "Article", title = "Bradley-Terry Models in {R}: The {BradleyTerry2} Package", author = personList(as.person("Heather Turner"), as.person("David Firth")), journal = "Journal of Statistical Software", year = "2012", volume = "48", number = "9", pages = "1--21", url = "http://www.jstatsoft.org/v48/i09/", textVersion = paste("Heather Turner, David Firth (2012).", "Bradley-Terry Models in R: The BradleyTerry2 Package.", "Journal of Statistical Software, 48(9), 1-21.", "URL http://www.jstatsoft.org/v48/i09/.") ) BradleyTerry2/inst/NEWS0000644000176200001440000000534712465142706014440 0ustar liggesusersChanges in BradleyTerry2 1.0-6 ============================== Changes in behaviour -------------------- o BTabilities now returns NA for unidentified abilities Bug fixes --------- o BTabilities now respects contrasts argument and contrasts attributes of player1 and player2 factors. Also handle unidentified coefficients correctly. Changes in BradleyTerry2 1.0-5 ============================== Bug fixes --------- o no longer imports from gnm, so gnm need not be installed. Changes in BradleyTerry2 1.0-4 ============================== Bug fixes --------- o depends on lme4 (>=1.0). Changes in BradleyTerry2 1.0-3 ============================== New Features ------------ o updated football data to include full 2011-12 season. Changes in BradleyTerry2 1.0-2 ============================== New Features ------------ o added football example presented at useR! 2013 with generalised Davidson model for ties. Changes in BradleyTerry2 1.0-1 ============================== Bug fixes --------- o renamed "glmmPQL" object "BTglmmPQL" to avoid conflict with lme4 (which loads MASS). o fixed BTm so that it is able to find variables when called inside another function (stackoverflow.com question 14911525). Changes in BradleyTerry2 1.0-0 ============================== o updated references and CITATION to cite JSS paper on BradleyTerry2 Changes in BradleyTerry2 0.9-7 ============================== Bug fixes --------- o fixed anova.BTmlist to work for models with random effects o allow models to be specified with no fixed effects Improvements ------------ o updated vignette, including example of bias-reduction, a new example incorporating random effects and a new example on preparing data for use with package Changes in BradleyTerry2 0.9-6 ============================== Bug fixes --------- o fixed offset argument to work as documented o corrected documentation for citations data Improvements ------------ o updated vignette, to provide more explanation of setting up the data Changes in BradleyTerry2 0.9-5 ============================== o updated contact details Changes in BradleyTerry2 0.9-4 ============================== New Features ------------ o added ice hockey example presented at useR! 2010 Bug fixes --------- o predict.BTm now works for models with no random effects and handles new individuals with missing values in predictors. Changes in BradleyTerry2 0.9-3 ============================= New Features ------------ o added predict method for BTm objects. Bug fixes --------- o fixed bug in BTm.setup causing problems in finding variables when BTm nested within another function. BradleyTerry2/inst/doc/0000755000176200001440000000000012465715316014500 5ustar liggesusersBradleyTerry2/inst/doc/BradleyTerry.Rnw0000644000176200001440000011523212465715316017604 0ustar liggesusers% \VignetteIndexEntry{Bradley-Terry models in R} % \VignetteKeyword{generalized linear model} % \VignetteKeyword{logistic regression} % \VignetteKeyword{penalized quasi-likelihood} % \VignetteKeyword{ranking} % \VignetteKeyword{tournament analysis} % \VignetteKeyword{working residuals} % \VignettePackage{BradleyTerry2} %%% For jss: %% \documentclass{jss} %% \newcommand{\pkginfo}{} %%% uncomment for vignette version \documentclass[nojss]{jss} \newcommand{\pkginfo}{\small \\[12pt]For \pkg{BradleyTerry2} version \Sexpr{packageDescription("BradleyTerry2")[["Version"]]}, \Sexpr{Sys.Date()}\\\url{http://bradleyterry2.r-forge.r-project.org/}\\[-12pt]} %% need no \usepackage{Sweave.sty} \usepackage[english]{babel} % to avoid et~al with texi2pdf \usepackage{amsmath} \usepackage{booktabs} \usepackage{thumbpdf} \setkeys{Gin}{width=0.6\textwidth} \SweaveOpts{keep.source=TRUE} %http://www.stat.auckland.ac.nz/~ihaka/downloads/Sweave-customisation.pdf \newcommand{\R}{\proglang{R}} \newcommand{\BT}{\pkg{BradleyTerry2}} \newcommand{\logit}{\mathop{\rm logit}} \newcommand{\pr}{\mathop{\rm pr}} \author{Heather Turner\\University of Warwick \And David Firth\\University of Warwick} \Plainauthor{Heather Turner, David Firth} \title{Bradley-Terry Models in \proglang{R}: The \BT\ Package \pkginfo} \Plaintitle{Bradley-Terry Models in R: The BradleyTerry2 Package} \Shorttitle{\pkg{BradleyTerry2}: Bradley-Terry Models in \proglang{R}} \Abstract{ This is a short overview of the \R\ add-on package \BT, which facilitates the specification and fitting of Bradley-Terry logit, probit or cauchit models to pair-comparison data. Included are the standard `unstructured' Bradley-Terry model, structured versions in which the parameters are related through a linear predictor to explanatory variables, and the possibility of an order or `home advantage' effect or other `contest-specific' effects. Model fitting is either by maximum likelihood, by penalized quasi-likelihood (for models which involve a random effect), or by bias-reduced maximum likelihood in which the first-order asymptotic bias of parameter estimates is eliminated. Also provided are a simple and efficient approach to handling missing covariate data, and suitably-defined residuals for diagnostic checking of the linear predictor. } \Keywords{generalized linear model, logistic regression, penalized quasi-likelihood, ranking, tournament analysis, working residuals} \Address{ David Firth\\ Department of Statistics\\ University of Warwick\\ Coventry\\ CV4 7AL, United Kingdom\\ E-mail: \email{d.firth@warwick.ac.uk}\\ URL: \url{http://go.warwick.ac.uk/dfirth} } \begin{document} @ <>= options(prompt = "R> ", continue = "+ ", width = 70, useFancyQuotes = FALSE, digits = 7) @ %def \section{Introduction} The Bradley-Terry model \citep{brad:terr:52} assumes that in a `contest' between any two `players', say player $i$ and player $j$ $(i, j \in \{1,\ldots,K\})$, the odds that $i$ beats $j$ are $\alpha_i/\alpha_j$, where $\alpha_i$ and $\alpha_j$ are positive-valued parameters which might be thought of as representing `ability'. A general introduction can be found in \citet{brad:84} or \citet{agre:02}. Applications are many, ranging from experimental psychology to the analysis of sports tournaments to genetics (for example, the allelic transmission/disequilibrium test of \citealp{sham:curt:95} is based on a Bradley-Terry model in which the `players' are alleles). In typical psychometric applications the `contests' are comparisons, made by different human subjects, between pairs of items. The model can alternatively be expressed in the logit-linear form \begin{equation} \logit[\pr(i\ \mathrm{beats}\ j)]=\lambda_i-\lambda_j, \label{eq:unstructured} \end{equation} where $\lambda_i=\log\alpha_i$ for all $i$. Thus, assuming independence of all contests, the parameters $\{\lambda_i\}$ can be estimated by maximum likelihood using standard software for generalized linear models, with a suitably specified model matrix. The primary purpose of the \BT\ package \citep{turn:12}, implemented in the \R\ statistical computing environment \citep{ihak:gent:96, R}, is to facilitate the specification and fitting of such models and some extensions. The \BT\ package supersedes the earlier \pkg{BradleyTerry} package \citep{firt:05}, providing a more flexible user interface to allow a wider range of models to be fitted. In particular, \BT\ allows the inclusion of simple random effects so that the ability parameters can be related to available explanatory variables through a linear predictor of the form \begin{equation} \lambda_i=\sum_{r=1}^p\beta_rx_{ir} + U_i. \end{equation} The inclusion of the prediction error $U_i$ allows for variability between players with equal covariate values and induces correlation between comparisons with a common player. \BT\ also allows for general contest-specific effects to be included in the model and allows the logit link to be replaced, if required, by a different symmetric link function (probit or cauchit). The remainder of the paper is organised as follows. Section~\ref{sec:BTmodel} demonstrates how to use the \pkg{BradleyTerry2} package to fit a standard (i.e., unstructured) Bradley-Terry model, with a separate ability parameter estimated for each player, including the use of bias-reduced estimation for such models. Section~\ref{sec:covariates} considers variations of the standard model, including the use of player-specific variables to model ability and allowing for contest-specific effects such as an order effect or judge effects. Sections~\ref{sec:ability} and \ref{sec:residuals} explain how to obtain important information about a fitted model, in particular the estimates of ability and their standard errors, and player-level residuals, whilst Section~\ref{sec:model} notes the functions available to aid model search. Section~\ref{sec:data} explains in more detail how set up data for use with the \BT\ package, Section~\ref{sec:functions} lists the functions provided by the package and finally Section~\ref{sec:finalremarks} comments on two directions for further development of the software. \section{Standard Bradley-Terry model} \label{sec:BTmodel} \subsection{Example: Analysis of journal citations} \label{citations} The following data come from page 448 of \citet{agre:02}, extracted from the larger table of \citet{stig:94}. The data are counts of citations among four prominent journals of statistics and are included the \BT\ package as the data set \code{citations}: @ <>= library("BradleyTerry2") @ @ <>= data("citations", package = "BradleyTerry2") @ @ <>= citations @ %def Thus, for example, \emph{Biometrika} was cited 498 times by papers in \emph{Journal of the American Statistical Association} (JASA) during the period under study. In order to fit a Bradley-Terry model to these data using \code{BTm} from the \BT\ package, the data must first be converted to binomial frequencies. That is, the data need to be organised into pairs (\code{player1}, \code{player2}) and corresponding frequencies of wins and losses for \code{player1} against \code{player2}. The \BT\ package provides the utility function \code{countsToBinomial} to convert a contingency table of wins to the format just described: @ <>= citations.sf <- countsToBinomial(citations) names(citations.sf)[1:2] <- c("journal1", "journal2") citations.sf @ %def Note that the self-citation counts are ignored -- these provide no information on the ability parameters, since the abilities are relative rather than absolute quantities. The binomial response can then be modelled by the difference in player abilities as follows: @ <>= citeModel <- BTm(cbind(win1, win2), journal1, journal2, ~ journal, id = "journal", data = citations.sf) citeModel @ %def The coefficients here are maximum likelihood estimates of $\lambda_2, \lambda_3, \lambda_4$, with $\lambda_1$ (the log-ability for \emph{Biometrika}) set to zero as an identifying convention. The one-sided model formula \begin{verbatim} ~ journal \end{verbatim} specifies the model for player ability, in this case the `citeability' of the journal. The \code{id} argument specifies that \code{"journal"} is the name to be used for the factor that identifies the player -- the values of which are given here by \code{journal1} and \code{journal2} for the first and second players respectively. Therefore in this case a separate citeability parameter is estimated for each journal. If a different `reference' journal is required, this can be achieved using the optional \code{refcat} argument: for example, making use of \code{update} to avoid re-specifying the whole model, @ <>= update(citeModel, refcat = "JASA") @ %def -- the same model in a different parameterization. The use of the standard Bradley-Terry model for this application might perhaps seem rather questionable -- for example, citations within a published paper can hardly be considered independent, and the model discards potentially important information on self-citation. \citet{stig:94} provides arguments to defend the model's use despite such concerns. \subsection{Bias-reduced estimates} %\label{sec:bias} Estimation of the standard Bradley-Terry model in \code{BTm} is by default computed by maximum likelihood, using an internal call to the \code{glm} function. An alternative is to fit by bias-reduced maximum likelihood \citep{firt:93}: this requires additionally the \pkg{brglm} package \citep{kosm:07}, and is specified by the optional argument \code{br = TRUE}. The resultant effect, namely removal of first-order asymptotic bias in the estimated coefficients, is often quite small. One notable feature of bias-reduced fits is that all estimated coefficients and standard errors are necessarily finite, even in situations of `complete separation' where maximum likelihood estimates take infinite values \citep{hein:sche:02}. For the citation data, the parameter estimates are only very slightly changed in the bias-reduced fit: @ <>= update(citeModel, br = TRUE) @ %def Here the bias of maximum likelihood is small because the binomial counts are fairly large. In more sparse arrangements of contests -- that is, where there is less or no replication of the contests -- the effect of bias reduction would typically be more substantial than the insignificant one seen here. \section{Abilities predicted by explanatory variables} \label{sec:covariates} \subsection{`Player-specific' predictor variables} In some application contexts there may be `player-specific' explanatory variables available, and it is then natural to consider model simplification of the form \begin{equation} \lambda_i=\sum_{r=1}^p\beta_rx_{ir} + U_i, \end{equation} in which ability of each player $i$ is related to explanatory variables $x_{i1},\ldots,x_{ip}$ through a linear predictor with coefficients $\beta_1,\ldots,\beta_p$; the $\{U_i\}$ are independent errors. Dependence of the player abilities on explanatory variables can be specified via the \code{formula} argument, using the standard \emph{S}-language model formulae. The difference in the abilities of player $i$ and player $j$ is modelled by \begin{equation} \sum_{r=1}^p\beta_rx_{ir} - \sum_{r=1}^p\beta_rx_{jr} + U_i - U_j, \label{eq:structured} \end{equation} where $U_i \sim N(0, \sigma^2)$ for all $i$. The Bradley-Terry model is then a generalized linear mixed model, which the \code{BTm} function currently fits by using the penalized quasi-likelihood algorithm of \citet{bres:93}. As an illustration, consider the following simple model for the \code{flatlizards} data, which predicts the fighting ability of Augrabies flat lizards by body size (snout to vent length): @ <>= options(show.signif.stars = FALSE) data("flatlizards", package = "BradleyTerry2") lizModel <- BTm(1, winner, loser, ~ SVL[..] + (1|..), data = flatlizards) @ %def Here the winner of each fight is compared to the loser, so the outcome is always 1. The special name `\code{..}' appears in the formula as the default identifier for players, in the absence of a user-specified \code{id} argument. The values of this factor are given by \code{winner} for the winning lizard and \code{loser} for the losing lizard in each contest. %Since \code{winner} %and \code{loser} are specific instances of the factor \code{..}, they must %share the same set of levels (one for each lizard). %The factors \code{winner}and \code{loser} These factors are provided in the data frame \code{contests} that is the first element of the list object \code{flatlizards}. The second element of \code{flatlizards} is another data frame, \code{predictors}, containing measurements on the observed lizards, including \code{SVL}, which is the snout to vent length. Thus \code{SVL[..]} represents the snout to vent length indexed by lizard (\code{winner} or \code{loser} as appropriate). Finally a random intercept for each lizard is included using the bar notation familiar to users of the \pkg{lme4} package \citep{bate:11}. (Note that a random intercept is the only random effect structure currently implemented in \pkg{BradleyTerry2}.) The fitted model is summarized below: @ <>= summary(lizModel) @ %def The coefficient of snout to vent length is weakly significant; however, the standard deviation of the random effect is quite large, suggesting that this simple model has fairly poor explanatory power. A more appropriate model is considered in the next section. \subsection{Missing values} The contest data may include all possible pairs of players and hence rows of missing data corresponding to players paired with themselves. Such rows contribute no information to the Bradley-Terry model and are simply discarded by \code{BTm}. Where there are missing values in player-specific \emph{predictor} (or \emph{explanatory}) variables which appear in the formula, it will typically be very wasteful to discard all contests involving players for which some values are missing. Instead, such cases are accommodated by the inclusion of one or more parameters in the model. If, for example, player $1$ has one or more of its predictor values $x_{11},\ldots,x_{1p}$ missing, then the combination of Equations~\ref{eq:unstructured} and \ref{eq:structured} above yields \begin{equation} \logit[\pr(1\ \mathrm{beats}\ j)]=\lambda_1 - \left(\sum_{r=1}^p\beta_rx_{jr} + U_j\right), \end{equation} for all other players $j$. This results in the inclusion of a `direct' ability parameter for each player having missing predictor values, in addition to the common coefficients $\beta_1,\ldots,\beta_p$ -- an approach which will be appropriate when the missingness mechanism is unrelated to contest success. The same device can be used also to accommodate any user-specified departures from a structured Bradley-Terry model, whereby some players have their abilities determined by the linear predictor but others do not. In the original analysis of the \code{flatlizards} data \citep{whit:06}, the final model included the first and third principal components of the spectral reflectance from the throat (representing brightness and UV intensity respectively) as well as head length and the snout to vent length seen in our earlier model. The spectroscopy data was missing for two lizards, therefore the ability of these lizards was estimated directly. The following fits this model, with the addition of a random intercept as before: @ <>= lizModel2 <- BTm(1, winner, loser, ~ throat.PC1[..] + throat.PC3[..] + head.length[..] + SVL[..] + (1|..), data = flatlizards) summary(lizModel2) @ %def Note that \code{BTm} detects that lizards 96 and 99 have missing values in the specified predictors and automatically includes separate ability parameters for these lizards. This model was found to be the single best model based on the principal components of reflectance and the other predictors available and indeed the standard deviation of the random intercept is much reduced, but still highly significant. Allowing for this significant variation between lizards with the same predictor values produces more realistic (i.e., larger) standard errors for the parameters when compared to the original analysis of \citet{whit:06}. Although this affects the significance of the morphological variables, it does not affect the significance of the principal components, so in this case does not affect the main conclusions of the study. \subsection{Order effect} \label{sec:order} In certain types of application some or all contests have an associated `bias', related to the order in which items are presented to a judge or with the location in which a contest takes place, for example. A natural extension of the Bradley-Terry model (Equation~\ref{eq:unstructured}) is then \begin{equation} \logit[\pr(i\ \mathrm{beats}\ j)]=\lambda_i-\lambda_j + \delta z, \end{equation} where $z=1$ if $i$ has the supposed advantage and $z=-1$ if $j$ has it. (If the `advantage' is in fact a disadvantage, $\delta$ will be negative.) The scores $\lambda_i$ then relate to ability in the absence of any such advantage. As an example, consider the baseball data given in \citet{agre:02}, page 438: @ <>= data("baseball", package = "BradleyTerry2") head(baseball) @ %def The data set records the home wins and losses for each baseball team against each of the 6 other teams in the data set. The \code{head} function is used to show the first 6 records, which are the Milwaukee home games. We see for example that Milwaukee played 7 home games against Detroit and won 4 of them. The `standard' Bradley-Terry model without a home-advantage parameter will be fitted if no formula is specified in the call to \code{BTm}: @ <>= baseballModel1 <- BTm(cbind(home.wins, away.wins), home.team, away.team, data = baseball, id = "team") summary(baseballModel1) @ %def The reference team is Baltimore, estimated to be the weakest of these seven, with Milwaukee and Detroit the strongest. In the above, the ability of each team is modelled simply as \code{~ team} where the values of the factor \code{team} are given by \code{home.team} for the first team and \code{away.team} for the second team in each game. To estimate the home-advantage effect, an additional variable is required to indicate whether the team is at home or not. Therefore data frames containing both the team factor and this new indicator variable are required in place of the factors \code{home.team} and \code{away.team} in the call to \code{BTm}. This is achieved here by over-writing the \code{home.team} and \code{away.team} factors in the \code{baseball} data frame: @ <>= baseball$home.team <- data.frame(team = baseball$home.team, at.home = 1) baseball$away.team <- data.frame(team = baseball$away.team, at.home = 0) @ %def The \code{at.home} variable is needed for both the home team and the away team, so that it can be differenced as appropriate in the linear predictor. With the data organised in this way, the ability formula can now be updated to include the \code{at.home} variable as follows: @ <>= baseballModel2 <- update(baseballModel1, formula = ~ team + at.home) summary(baseballModel2) @ %def \vspace*{-0.3cm} This reproduces the results given on page 438 of \citet{agre:02}: the home team has an estimated odds-multiplier of $\exp(0.3023) = 1.35$ in its favour. \vspace*{-0.2cm} \subsection{More general (contest-specific) predictors} \label{sec:CEMS} The `home advantage' effect is a simple example of a contest-specific predictor. Such predictors are necessarily interactions, between aspects of the contest and (aspects of) the two `players' involved. For more elaborate examples of such effects, see \code{?chameleons} and \code{?CEMS}. The former includes an `experience' effect, which changes through time, on the fighting ability of male chameleons. The latter illustrates a common situation in psychometric applications of the Bradley-Terry model, where \emph{subjects} express preference for one of two \emph{objects} (the `players'), and it is the influence on the results of subject attributes that is of primary interest. As an illustration of the way in which such effects are specified, consider the following model specification taken from the examples in \code{?CEMS}, where data on students' preferences in relation to six European management schools is analysed. \vspace*{-0.3cm} @ <>= data("CEMS", package = "BradleyTerry2") table8.model <- BTm(outcome = cbind(win1.adj, win2.adj), player1 = school1, player2 = school2, formula = ~ .. + WOR[student] * LAT[..] + DEG[student] * St.Gallen[..] + STUD[student] * Paris[..] + STUD[student] * St.Gallen[..] + ENG[student] * St.Gallen[..] + FRA[student] * London[..] + FRA[student] * Paris[..] + SPA[student] * Barcelona[..] + ITA[student] * London[..] + ITA[student] * Milano[..] + SEX[student] * Milano[..], refcat = "Stockholm", data = CEMS) @ %def This model reproduces results from Table~8 of \cite{ditt:01} apart from minor differences due to the different treatment of ties. Here the outcome is the binomial frequency of preference for \code{school1} over \code{school2}, with ties counted as half a `win' and half a `loss'. The formula specifies the model for school `ability' or worth. In this formula, the default label `\code{..}' represents the school (with values given by \code{school1} or \code{school2} as appropriate) and \code{student} is a factor specifying the student that made the comparison. The remaining variables in the formula use \proglang{R}'s standard indexing mechanism to include student-specific variables, e.g., \code{WOR}: whether or not the student was in full-time employment, and school-specific variables, e.g., \code{LAT}: whether the school was in a `Latin' city. Thus there are three types of variables: contest-specific (\code{school1}, \code{school2}, \code{student}), subject-specific (\code{WOR}, \code{DEG}, \ldots) and object-specific (\code{LAT}, \code{St.Gallen}, \ldots). These three types of variables are provided in three data frames, contained in the list object \code{CEMS}. \section{Ability scores} \label{sec:ability} The function \code{BTabilities} extracts estimates and standard errors for the log-ability scores $\lambda_1, \ldots,\lambda_K$. These will either be `direct' estimates, in the case of the standard Bradley-Terry model or for players with one or more missing predictor values, or `model-based' estimates of the form $\hat\lambda_i=\sum_{r=1}^p\hat\beta_rx_{ir}$ for players whose ability is predicted by explanatory variables. As a simple illustration, team ability estimates in the home-advantage model for the \code{baseball} data are obtained by: @ <>= BTabilities(baseballModel2) @ %def This gives, for each team, the estimated ability when the team enjoys no home advantage. Similarly, estimates of the fighting ability of each lizard in the \code{flatlizards} data under the model based on the principal components of the spectral reflectance from the throat are obtained as follows: @ <>= head(BTabilities(lizModel2), 4) @ %def % The ability estimates in an unstructured Bradley-Terry model are particularly well suited to presentation using the device of \emph{quasi-variances} \citep{firt:04}. The \pkg{qvcalc} package \citep[][version 0.8-5 or later]{firt:10} contains a function of the same name which does the necessary work: \begin{Sinput} > library("qvcalc") > baseball.qv <- qvcalc(BTabilities(baseballModel2)) > plot(baseball.qv, + levelNames = c("Bal", "Bos", "Cle", "Det", "Mil", "NY", "Tor")) \end{Sinput} % \begin{figure}[t!] \centering \includegraphics[width=0.67\textwidth]{baseball-qvplot.pdf} \caption{Estimated relative abilities of baseball teams.\label{fig:qvplot}} \end{figure} % The `comparison intervals' as shown in Figure~\ref{fig:qvplot} are based on `quasi standard errors', and can be interpreted as if they refer to \emph{independent} estimates of ability for the journals. This has the advantage that comparison between any pair of journals is readily made (i.e., not only comparisons with the `reference' journal). For details of the theory and method of calculation see \citet{firt:04}. \section{Residuals} \label{sec:residuals} There are two main types of residuals available for a Bradley-Terry model object. First, there are residuals obtained by the standard methods for models of class \code{"glm"}. These all deliver one residual for each contest or type of contest. For example, Pearson residuals for the model \code{lizModel2} can be obtained simply by \vspace*{0.2cm} @ <>= res.pearson <- round(residuals(lizModel2), 3) head(cbind(flatlizards$contests, res.pearson), 4) @ %def \vspace*{-0.2cm} More useful for diagnostics on the linear predictor $\sum\beta_rx_{ir}$ are `player'-level residuals, obtained by using the function \code{residuals} with argument \code{type = "grouped"}. These residuals can then be plotted against other player-specific variables. \vspace*{-0.2cm} @ <>= res <- residuals(lizModel2, type = "grouped") # with(flatlizards$predictors, plot(throat.PC2, res)) # with(flatlizards$predictors, plot(head.width, res)) @ %def \vspace*{-0.2cm} These residuals estimate the error in the linear predictor; they are obtained by suitable aggregation of the so-called `working' residuals from the model fit. The \code{weights} attribute indicates the relative information in these residuals -- weight is roughly inversely proportional to variance -- which may be useful for plotting and/or interpretation; for example, a large residual may be of no real concern if based on very little information. Weighted least-squares regression of these residuals on any variable already in the model is null. For example: \vspace*{-0.2cm} @ <>= lm(res ~ throat.PC1, weights = attr(res, "weights"), data = flatlizards$predictors) lm(res ~ head.length, weights = attr(res, "weights"), data = flatlizards$predictors) @ %def %$ \vspace*{-0.2cm} As an illustration of evident \emph{non-null} residual structure, consider the unrealistically simple model \code{lizModel} that was fitted in Section~\ref{sec:covariates} above. That model lacks the clearly significant predictor variable \code{throat.PC3}, and the plot shown in Figure~\ref{fig:residuals} demonstrates this fact graphically: \begin{Sinput} > lizModel.residuals <- residuals(lizModel, type = "grouped") > plot(flatlizards$predictors$throat.PC3, lizModel.residuals) \end{Sinput} % \begin{figure}[t!] \centering \includegraphics[width=0.69\textwidth]{residuals.pdf} \caption{Lizard residuals for the simple model \code{lizModel}, plotted against \code{throat.PC3}.\label{fig:residuals}} \end{figure} % The residuals in the plot exhibit a strong, positive regression slope in relation to the omitted predictor variable \code{throat.PC3}. \section{Model search} \label{sec:model} In addition to \code{update()} as illustrated in preceding sections, methods for the generic functions \code{add1()}, \code{drop1()} and \code{anova()} are provided. These can be used to investigate the effect of adding or removing a variable, whether that variable is contest-specific, such as an order effect, or player-specific; and to compare the fit of nested models. %These can be used in the standard way for model elaboration or specialization, %and their availability also allows the use of \texttt{\color{black} step()} for %automated exploration of a set of candidate player-specific predictors. \section{Setting up the data} \label{sec:data} \subsection{Contest-specific data} \label{sec:contest} The \code{outcome} argument of \code{BTm} represents a binomial response and can be supplied in any of the formats allowed by the \code{glm} function. That is, either a two-column matrix with the columns giving the number of wins and losses (for \code{player1} vs.\ \code{player2}), a factor where the first level denotes a loss and all other levels denote a win, or a binary variable where 0 denotes a loss and 1 denotes a win. Each row represents either a single contest or a set of contests between the same two players. The \code{player1} and \code{player2} arguments are either factors specifying the two players in each contest, or data frames containing such factors, along with any contest-specific variables that are also player-specific, such as the \code{at.home} variable seen in Section~\ref{sec:order}. If given in data frames, the factors identifying the players should be named as specified by the \code{id} argument and should have identical levels, since they represent a particular sample of the full set of players. Thus for the model \code{baseballModel2}, which was specified by the following call: @ <>= baseballModel2$call @ %def the data are provided in the \code{baseball} data frame, which has the following structure: @ <>= str(baseball, vec.len = 2) @ %def In this case \code{home.team} and \code{away.team} are both data frames, with the factor \code{team} specifying the team and the variable \code{at.home} specifying whether or not the team was at home. So the first comparison @ <>= baseball$home.team[1,] baseball$away.team[1,] @ %def is Milwaukee playing at home against Detroit. The outcome is given by @ <>= baseball[1, c("home.wins", "away.wins")] @ %def Contest-specific variables that are \emph{not} player-specific -- for example, whether it rained or not during a contest -- should only be used in interactions with variables that \emph{are} player-specific, otherwise the effect on ability would be the same for both players and would cancel out. Such variables can conveniently be provided in a single data frame along with the \code{outcome}, \code{player1} and \code{player2} data. An offset in the model can be specified by using the \code{offset} argument to \code{BTm}\null. This facility is provided for completeness: the authors have not yet encountered an application where it is needed. To use only certain rows of the contest data in the analysis, the \code{subset} argument may be used in the call to \code{BTm}. This should either be a logical vector of the same length as the binomial response, or a numeric vector containing the indices of rows to be used. \subsection{Non contest-specific data} \label{sec:non-contest} Some variables do not vary by contest directly, but rather vary by a factor that is contest-specific, such as the player ID or the judge making the paired comparison. For such variables, it is more economical to store the data by the levels of the contest-specific factor and use indexing to obtain the values for each contest. The \code{CEMS} example in Section~\ref{sec:CEMS} provides an illustration of such variables. In this example student-specific variables are indexed by \code{student} and school-specific variables are indexed by \code{..}, i.e., the first or second school in the comparison as appropriate. There are then two extra sets of variables in addition to the usual contest-specific data as described in the last section. A good way to provide these data to \code{BTm} is as a list of data frames, one for each set of variables, e.g., @ <>= str(CEMS, vec.len = 2) @ %def The names of the data frames are only used by \code{BTm} if they match the names specified in the \code{player1} and \code{player2} arguments, in which case it is assumed that these are data frames providing the data for the first and second player respectively. The rows of data frames in the list should either correspond to the contests or the levels of the factor used for indexing. Player-specific offsets should be included in the formula by using the \code{offset} function. \subsection{Converting data from a `wide' format} The \code{BTm} function requires data in a `long' format, with one row per contest, provided either directly as in Section~\ref{sec:contest} or via indexing as in Section~\ref{sec:non-contest}. In studies where the same set of paired comparisons are made by several judges, as in a questionnaire for example, the data may be stored in a `wide' format, with one row per judge. As an example, consider the \code{cemspc} data from the \pkg{prefmod} package \citep{hatz:12}, which provides data from the CEMS study in a wide format. Each row corresponds to one student; the first 15 columns give the outcome of all pairwise comparisons between the 6~schools in the study and the last two columns correspond to two of the student-specific variables: \code{ENG} (indicating the student's knowledge of English) and \code{SEX} (indicating the student's gender). The following steps convert these data into a form suitable for analysis with \code{BTm}. First a new data frame is created from the student-specific variables and these variables are converted to factors: @ <>= library("prefmod") student <- cemspc[c("ENG", "SEX")] student$ENG <- factor(student$ENG, levels = 1:2, labels = c("good", "poor")) student$SEX <- factor(student$SEX, levels = 1:2, labels = c("female", "male")) @ %def This data frame is put into a list, which will eventually hold all the necessary data. Then a \code{student} factor is created for indexing the student data to produce contest-level data. This is put in a new data frame that will hold the contest-specific data. @ <>= cems <- list(student = student) student <- gl(303, 1, 303 * 15) #303 students, 15 comparisons contest <- data.frame(student = student) @ %def Next the outcome data is converted to a binomial response, adjusted for ties. The result is added to the \code{contest} data frame. @ <>= win <- cemspc[, 1:15] == 0 lose <- cemspc[, 1:15] == 2 draw <- cemspc[, 1:15] == 1 contest$win.adj <- c(win + draw/2) contest$lose.adj <- c(lose + draw/2) @ %def Then two factors are created identifying the first and second school in each comparison. The comparisons are in the order 1 vs.\ 2, 1 vs.\ 3, 2 vs.\ 3, 1 vs.\ 4, \ldots, so the factors can be created as follows: @ <>= lab <- c("London", "Paris", "Milano", "St. Gallen", "Barcelona", "Stockholm") contest$school1 <- factor(sequence(1:5), levels = 1:6, labels = lab) contest$school2 <- factor(rep(2:6, 1:5), levels = 1:6, labels = lab) @ %def Note that both factors have exactly the same levels, even though only five of the six players are represented in each case. In other words, the numeric factor levels refer to the same players in each case, so that the player is unambiguously identified. This ensures that player-specific parameters and player-specific covariates are correctly specified. Finally the \code{contest} data frame is added to the main list: @ <>= cems$contest <- contest @ %def This creates a single data object that can be passed to the \code{data} argument of \code{BTm}. Of course, such a list could be created on-the-fly as in \code{data = list(contest, student)}, which may be more convenient in practice. \subsection[Converting data from the format required by the earlier BradleyTerry package]{Converting data from the format required by the earlier \pkg{BradleyTerry} package} The \pkg{BradleyTerry} package described in \citet{firt:05} required contest/comparison results to be in a data frame with columns named \code{winner}, \code{loser} and \code{Freq}. The following example shows how \code{xtabs} and \code{countsToBinomial} can be used to convert such data for use with the \code{BTm} function in \pkg{BradleyTerry2}: \begin{Sinput} > library("BradleyTerry") ## the /old/ BradleyTerry package > ## load data frame with columns "winner", "loser", "Freq" > data("citations", package = "BradleyTerry") > ## convert to 2-way table of counts > citations <- xtabs(Freq ~ winner + loser, citations) > ## convert to a data frame of binomial observations > citations.sf <- countsToBinomial(citations) \end{Sinput} The \code{citations.sf} data frame can then be used with \code{BTm} as shown in Section~\ref{citations}. \section[A list of the functions provided in BradleyTerry2]{A list of the functions provided in \pkg{BradleyTerry2}} \label{sec:functions} The standard \R\ help files provide the definitive reference. Here we simply list the main user-level functions and their arguments, as a convenient overview: @ <>= ## cf. prompt options(width = 55) for (fn in getNamespaceExports("BradleyTerry2")) { name <- as.name(fn) args <- formals(fn) n <- length(args) arg.names <- arg.n <- names(args) arg.n[arg.n == "..."] <- "\\dots" is.missing.arg <- function(arg) typeof(arg) == "symbol" && deparse(arg) == "" Call <- paste(name, "(", sep = "") for (i in seq_len(n)) { Call <- paste(Call, arg.names[i], if (!is.missing.arg(args[[i]])) paste(" = ", paste(deparse(args[[i]]), collapse = "\n"), sep = ""), sep = "") if (i != n) Call <- paste(Call, ", ", sep = "") } Call <- paste(Call, ")", sep = "") cat(deparse(parse(text = Call)[[1]], width.cutoff = 50), fill = TRUE) } options(width = 60) @ %def \section{Some final remarks} \label{sec:finalremarks} \subsection[A note on the treatment of ties]{A note on the treatment of ties} The present version of \BT\ provides no sophisticated facilities for handling tied contests/comparisons; the well-known models of \cite{rao:kupp:67} and \cite{davi:70} are not implemented here. At present the \code{BTm} function requires a binary or binomial response variable, the third (`tied') category of response is not allowed. In several of the data examples (e.g., \code{?CEMS}, \code{?springall}, \code{?sound.fields}), ties are handled by the crude but simple device of adding half of a `win' to the tally for each player involved; in each of the examples where this has been done it is found that the result is very similar, after a simple re-scaling, to the more sophisticated analyses that have appeared in the literature. Note that this device when used with \code{BTm} typically gives rise to warnings produced by the back-end \code{glm} function, about non-integer `binomial' counts; such warnings are of no consequence and can be safely ignored. It is likely that a future version of \BT\ will have a more general method for handling ties. \subsection{A note on `contest-specific' random effects} The current version of \BT\ provides facilities for fitting models with random effects in `player-specific' predictor functions, as illustrated in Section~\ref{sec:covariates}. For more general, `contest-specific' random-effect structures, such as random `judge' effects in psychological studies \citep[e.g.,][]{bock:01}, \BT\ provides (through \code{BTm}) the necessary user interface but as yet no back-end calculation. It is hoped that this important generalization can be made successfully in a future version of \BT. \section*{Acknowledgments} This work was supported by the UK Engineering and Physical Sciences Research Council. \bibliography{BradleyTerry} \end{document} BradleyTerry2/inst/doc/BradleyTerry.pdf0000644000176200001440000107434512465715316017621 0ustar liggesusers%PDF-1.5 % 1 0 obj << /Type /ObjStm /Length 4803 /Filter /FlateDecode /N 82 /First 662 >> stream x\[s8~?N$kkb;\L2;Ȓ3ucJmT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ݢGXOlp[@ Y9R"GsL-^}s 2u 8xUl'A=˪S/0J/^9eZ=Vo$ 8e)7>#!JsQk*M=y O?ݺˋtx0[ldB]%eZ8946T`l+#ς"iV^vRFa$M67C Y4f6PA(uACAm\Xd[}}hN&zTpIJ ;>86ҶRi k:UUgS'E㾛|_nu]p7ċuT%Cq`8=uN wݫHendstream endobj 440 0 obj << /Filter /FlateDecode /Length 97 >> stream x31ӳP0P0T06P0P05WH1* ̡2ɹ\N\ \@a.}O_T.}gC.}hCX.OȠl\=%endstream endobj 441 0 obj << /Filter /FlateDecode /Length1 1793 /Length2 11800 /Length3 0 /Length 12939 >> stream xڍP4.!hhiKHw]k~rޢ 1}LYQihIYA`';0@FMڀɍBGc qGBru; BdWC5@psr * N 7: 5>L.!!?R W[ @ 9f: `@98<<<؁n`Wkq&V-rY P:ƎBбuK x]AW xVRq9e+عo?: ;:lV yUv't~:_ ,_fG?¼YRrQ+^ dedi Kwg]'[w6"d S_r<-l8H S3`Jgkz|@\A~>V/BXZ@ k['AVz8_׏ L^7#RPe`O? x8)]ݿ"*9YBx{3>&fP3sqZ|?HO=_?zy 58_S}_- v:%BF[7y[O-%^;:4n<86.N{9 GuV@'),܁@/ѿ">Z?'CHH 8AB"^WzXs06_ L_`wfl0Uf|~|:v_"|/5kQί++|n$ Ws5Hظb_m}OImy[ y,Pf"v5mURl;cbt;iLl> 1S*~\sJZޒc\|9jC kIl}}4KКiE ;%G&cӑ}r` ݡL.{ѣY[4:[ɯX2m']y 54N r q O:w݌J['1-!9$'e95L=bj "b6/Y_\, H>!tE VI4EfdwO4ډЖ,Ptv0& s9R\ng?!p'TSViLji ܰڅ@W{P= 55N=w W]M` oM@y΃Y 1~f(q9Oh[SMJ`L?e*X<9ҊRA5dOw0%a[$S| ܨK'dhn1^ MEwH!؁S)P Yh p Y\C Uȣ4krW1QV,͕2>im%T!rWL,F=F<GX5kyZR npIk'MՖް@@ꭎP' o|4&8MMWV~:Kws-R@F^KF5-&j;H@J-ԩ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.InfoDict 235 0 R /PTEX.PageNumber 1 /Resources << /ExtGState << >> /Font << /F1 236 0 R /F2 237 0 R /F3 238 0 R >> /ProcSet [ /PDF /Text ] >> /Subtype /Form /Type /XObject /Length 722 /Filter /FlateDecode >> stream xVMo0 WI>V(I:GYfVGOOϔICs` PkRS@NQ0p۸(#O:j$ﮑs)x. Eycц'Xx%yz3xjQ OJa;R>? >G w <4b ,Nڻ}_? *z߮9rPԛgIZQo|;YW_gR1&]2%`q?,o=IEJ8 RhCszI|,R +S̵ODIN|6jQD<;[.K֕3hi#S:I>:yXeA9wa$j&%lbw|v nmWݐCrsŅnW~_xįfwx86dѤnhǺ~Zh|ŗ1 " GP)Ǻl;L}Y-90I0_Ge]SD\NO] 9lj38/\{d.[)M (|T}Zk42ޔO:2$ƔzR̐gf(ߦ3:b(1qt;Ź쪖,=] endstream endobj 453 0 obj << /Filter /FlateDecode /Length 1557 >> stream xڕX[o6~%QaC֦؀ [ᗡPڒcJκ(ѶldQ|]og׋٫m*tX S*5އ:MYT:IUQh`BD\]y Nv),gQT*yecLj0éyIxΣQd=Oo,O-UN;ł{Yh&Bc~iL'9QxCZrd{ngßH";OAJ*t,eo-Reや 5dy keozHaY!*ecY5#HblݨU^Ag9VDسX(Iʲ$&Ug8G့E\'o%[1HpmIgsLM#B?hBqm v 1+7[%AAebC{vODTޒϮo??\7RFܼj0KHUP x0nA#iܒ="V܆玤@+]p`8]D WA6K* ϔ\MBm@1j쁋csipn'JP88;RfyT y5;M)U3肪 Q֢e'=x@? Wz#?%D{+|X}JCկi#jWwҦYL4N\j娢FCA}lM;ҡzlh܉~Ƶ}k q::)V bX;..GI#E}^+f08P'g  έv "{䲑*?wډ8)`j$wi2xcs4-$hT>X9Fg]a0mxqՎ-J›~8c m}+ ,P޵\ruL8]aʝ'\hf3˓MGQp\'p~.kd<~ﶧ)Rrjw輫ΩnWtt V-t'97ҁ_xm"|niY:d]endstream endobj 454 0 obj << /Filter /FlateDecode /Length 2097 >> stream xi @d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*H64U5!ԶYPJ`PpQpE=_5Eɫ篯%P/f*7ׇzSM UĮ4Wzޱ'F? Ml#xIrmV2Ia +-,bu @ee?fԦCdwRg[wҎg"e]n m=%}-|}< ,4Na*,Qh܊M2J\44_'H'scoըXR?f6|!|!j]| ăb1pSCq)B7:m6 `O*n]@B>ҭ{ز+s)M.uY HGRhy⬻ _2&\R|juGkxY}6-yB}xL]C ; *_vkZanՐLj9[T帼Ѿ9Ãǧ2ʶF"ߺxoGx#p_-i\Aڿ'z>\=4SweXn] v bdmti^D}!Չc=su!(ֺSFp+Eoө:꺵е2'a i``КzJ7ΥmzYԻ!)FNQ5(|Yuյٛ#.eZ=r_p1w;gTU\G_z0R:@lp-ҷnf>I[ƃM`jZex7l5ۗ]Ce)KZ*:?Tp|kܩ>gaeBE$/ӗsg)CŜ$"RGdq}s\ܙ1އC41&,UE}iQ4udK| f^KxU y>hngE_Rn띐 o,dJ">Մ+9>5LM7|.M/sܰ KfDžܦŞ8+s=T Lo!u&\鯸wb|I/MH`ƑD/bEtB܅ﵝX#l!\CAԬ "߁ =l_Lg 2Hl5&7.n {Kp'ƨWym/Xo<Rdr"Wr]]w)QJQ/NorR;F.ui_N+:kiH}+ͣxNb[]z麪|ڮmkh}_]9b~`y)ú{Yâҏf?m> O>$2ʒ^=a@7D:^o/y]C9in?gK%5O|Y?^.9jFMdozo_EPEsrJt8McT.&kgtk8f$Eo슷X8/fB> /W [ 1 3 1 ] /Info 83 0 R /Root 82 0 R /Size 459 /ID [<162e0d799cfb4fe128e3bc42f51b88a7><64a74c265feadb5b21dd9d17be17a7e4>] >> stream xcb&F~0 $8Js?z  3q%[qNK> DŀHū Rv dT7ȤP)D:d==Al KDlDAgXzNge⚻Drٯ$r* DHƕ TY"l*UځE9R&DH6 }"47 0 endstream endobj startxref 292569 %%EOF BradleyTerry2/inst/doc/BradleyTerry.R0000644000176200001440000002107312465715316017236 0ustar liggesusers### R code from vignette source 'BradleyTerry.Rnw' ################################################### ### code chunk number 1: set_options ################################################### options(prompt = "R> ", continue = "+ ", width = 70, useFancyQuotes = FALSE, digits = 7) ################################################### ### code chunk number 2: LoadBradleyTerry2 ################################################### library("BradleyTerry2") ################################################### ### code chunk number 3: CitationData ################################################### data("citations", package = "BradleyTerry2") ################################################### ### code chunk number 4: CitationData2 ################################################### citations ################################################### ### code chunk number 5: countsToBinomial ################################################### citations.sf <- countsToBinomial(citations) names(citations.sf)[1:2] <- c("journal1", "journal2") citations.sf ################################################### ### code chunk number 6: citeModel ################################################### citeModel <- BTm(cbind(win1, win2), journal1, journal2, ~ journal, id = "journal", data = citations.sf) citeModel ################################################### ### code chunk number 7: citeModelupdate ################################################### update(citeModel, refcat = "JASA") ################################################### ### code chunk number 8: citeModelupdate2 ################################################### update(citeModel, br = TRUE) ################################################### ### code chunk number 9: lizModel ################################################### options(show.signif.stars = FALSE) data("flatlizards", package = "BradleyTerry2") lizModel <- BTm(1, winner, loser, ~ SVL[..] + (1|..), data = flatlizards) ################################################### ### code chunk number 10: summarize_lizModel ################################################### summary(lizModel) ################################################### ### code chunk number 11: lizModel2 ################################################### lizModel2 <- BTm(1, winner, loser, ~ throat.PC1[..] + throat.PC3[..] + head.length[..] + SVL[..] + (1|..), data = flatlizards) summary(lizModel2) ################################################### ### code chunk number 12: baseball ################################################### data("baseball", package = "BradleyTerry2") head(baseball) ################################################### ### code chunk number 13: baseballModel ################################################### baseballModel1 <- BTm(cbind(home.wins, away.wins), home.team, away.team, data = baseball, id = "team") summary(baseballModel1) ################################################### ### code chunk number 14: baseballDataUpdate ################################################### baseball$home.team <- data.frame(team = baseball$home.team, at.home = 1) baseball$away.team <- data.frame(team = baseball$away.team, at.home = 0) ################################################### ### code chunk number 15: baseballModelupdate ################################################### baseballModel2 <- update(baseballModel1, formula = ~ team + at.home) summary(baseballModel2) ################################################### ### code chunk number 16: CEMSmodel ################################################### data("CEMS", package = "BradleyTerry2") table8.model <- BTm(outcome = cbind(win1.adj, win2.adj), player1 = school1, player2 = school2, formula = ~ .. + WOR[student] * LAT[..] + DEG[student] * St.Gallen[..] + STUD[student] * Paris[..] + STUD[student] * St.Gallen[..] + ENG[student] * St.Gallen[..] + FRA[student] * London[..] + FRA[student] * Paris[..] + SPA[student] * Barcelona[..] + ITA[student] * London[..] + ITA[student] * Milano[..] + SEX[student] * Milano[..], refcat = "Stockholm", data = CEMS) ################################################### ### code chunk number 17: BTabilities ################################################### BTabilities(baseballModel2) ################################################### ### code chunk number 18: BTabilities2 ################################################### head(BTabilities(lizModel2), 4) ################################################### ### code chunk number 19: residuals ################################################### res.pearson <- round(residuals(lizModel2), 3) head(cbind(flatlizards$contests, res.pearson), 4) ################################################### ### code chunk number 20: BTresiduals ################################################### res <- residuals(lizModel2, type = "grouped") # with(flatlizards$predictors, plot(throat.PC2, res)) # with(flatlizards$predictors, plot(head.width, res)) ################################################### ### code chunk number 21: residualWLS ################################################### lm(res ~ throat.PC1, weights = attr(res, "weights"), data = flatlizards$predictors) lm(res ~ head.length, weights = attr(res, "weights"), data = flatlizards$predictors) ################################################### ### code chunk number 22: baseballModel2_call ################################################### baseballModel2$call ################################################### ### code chunk number 23: str_baseball ################################################### str(baseball, vec.len = 2) ################################################### ### code chunk number 24: first_comparison ################################################### baseball$home.team[1,] baseball$away.team[1,] ################################################### ### code chunk number 25: first_outcome ################################################### baseball[1, c("home.wins", "away.wins")] ################################################### ### code chunk number 26: str_CEMS ################################################### str(CEMS, vec.len = 2) ################################################### ### code chunk number 27: student-specific_data ################################################### library("prefmod") student <- cemspc[c("ENG", "SEX")] student$ENG <- factor(student$ENG, levels = 1:2, labels = c("good", "poor")) student$SEX <- factor(student$SEX, levels = 1:2, labels = c("female", "male")) ################################################### ### code chunk number 28: student_factor ################################################### cems <- list(student = student) student <- gl(303, 1, 303 * 15) #303 students, 15 comparisons contest <- data.frame(student = student) ################################################### ### code chunk number 29: binomial_response ################################################### win <- cemspc[, 1:15] == 0 lose <- cemspc[, 1:15] == 2 draw <- cemspc[, 1:15] == 1 contest$win.adj <- c(win + draw/2) contest$lose.adj <- c(lose + draw/2) ################################################### ### code chunk number 30: school_factors ################################################### lab <- c("London", "Paris", "Milano", "St. Gallen", "Barcelona", "Stockholm") contest$school1 <- factor(sequence(1:5), levels = 1:6, labels = lab) contest$school2 <- factor(rep(2:6, 1:5), levels = 1:6, labels = lab) ################################################### ### code chunk number 31: cems_data ################################################### cems$contest <- contest ################################################### ### code chunk number 32: functions ################################################### ## cf. prompt options(width = 55) for (fn in getNamespaceExports("BradleyTerry2")) { name <- as.name(fn) args <- formals(fn) n <- length(args) arg.names <- arg.n <- names(args) arg.n[arg.n == "..."] <- "\\dots" is.missing.arg <- function(arg) typeof(arg) == "symbol" && deparse(arg) == "" Call <- paste(name, "(", sep = "") for (i in seq_len(n)) { Call <- paste(Call, arg.names[i], if (!is.missing.arg(args[[i]])) paste(" = ", paste(deparse(args[[i]]), collapse = "\n"), sep = ""), sep = "") if (i != n) Call <- paste(Call, ", ", sep = "") } Call <- paste(Call, ")", sep = "") cat(deparse(parse(text = Call)[[1]], width.cutoff = 50), fill = TRUE) } options(width = 60) BradleyTerry2/tests/0000755000176200001440000000000012465715316014120 5ustar liggesusersBradleyTerry2/tests/baseball.R0000644000176200001440000000130211723723170015775 0ustar liggesuserslibrary(BradleyTerry2) ## This reproduces the analysis in Sec 10.6 of Agresti (2002). data(baseball, package = "BradleyTerry2") ## Simple Bradley-Terry model, ignoring home advantage: baseballModel1 <- BTm(cbind(home.wins, away.wins), home.team, away.team, data = baseball, id = "team") summary(baseballModel1) ## Now incorporate the "home advantage" effect baseball$home.team <- data.frame(team = baseball$home.team, at.home = 1) baseball$away.team <- data.frame(team = baseball$away.team, at.home = 0) baseballModel2 <- update(baseballModel1, formula = ~ team + at.home) summary(baseballModel2) ## Compare the fit of these two models: anova(baseballModel1, baseballModel2) BradleyTerry2/tests/predict.Rout.save0000644000176200001440000001040612465703145017360 0ustar liggesusers R Under development (unstable) (2015-02-07 r67757) -- "Unsuffered Consequences" Copyright (C) 2015 The R Foundation for Statistical Computing Platform: x86_64-unknown-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > ## some awkward cases for predict > ## (in response to Arthur Spirling's bug report) > > options(digits = 4) ## only applies to this file > > ## The final model in example(flatlizards) > library(BradleyTerry2) Loading required package: lme4 Loading required package: Matrix Loading required package: Rcpp > data(flatlizards, package = "BradleyTerry2") > attach(flatlizards) > Whiting.model3 <- BTm(1, winner, loser, ~ throat.PC1[..] + throat.PC3[..] + + head.length[..] + SVL[..] + (1|..), + family = binomial(link = "probit"), + data = list(contests, predictors), trace = TRUE) Iteration 1. Score = 0.3606 Iteration 2. Score = 0.799 Iteration 3. Score = 0.2863 Iteration 4. Score = 0.003823 Iteration 5. Score = 0.0001769 Iteration 6. Score = 9.28e-06 Iteration 7. Score = 6.795e-07 > > > ## new lizard with original lizards with NAs > newdata <- list(contests = data.frame(winner = factor(c("lizard096", "lizard059"), + levels = c("lizard048", "lizard052", "lizard096", "lizard059")), + loser = factor(c("lizard048", "lizard052"), + levels = c("lizard048", "lizard052", "lizard096", "lizard059"))), + predictors = rbind(flatlizards$predictors[c(27, 29, 55),-c(1,18) ], + c(NA, 1.5, 1.5, -.2, 3, 1, -1, -1.5, -1.5, 250, 2000, 1, 0.1, 0.2, 0.5, -0.2))) > > predict(Whiting.model3, level = 1, se.fit = TRUE, newdata = newdata) $fit [1] 19.63 NA $se.fit [1] 38745321 NA > > ## new lizard with NAs - can't predict, go by na.action > newdata <- list(contests = data.frame(winner = factor(c("lizard048", "lizard059"), + levels = c("lizard006", "lizard011", "lizard048", "lizard059")), + loser = factor(c("lizard006", "lizard011"), + levels = c("lizard006", "lizard011", "lizard048", "lizard059"))), + predictors = rbind(flatlizards$predictors[c(3, 6, 27),-c(1,18) ], + c(NA, 1.5, 1.5, -.2, 3, 1, -1, -1.5, -1.5, 250, 2000, 1, 0.1, 0.2, 0.5, -0.2))) > > predict(Whiting.model3, level = 0:1, se.fit = TRUE, newdata = newdata, na.action = na.pass) $population $population$fit [1] 0.778 NA $population$se.fit [1] 0.3208 NA $individual $individual$fit [1] 1.074 NA $individual$se.fit [1] 0.7846 NA > > predict(Whiting.model3, level = 0:1, se.fit = TRUE, newdata = newdata, na.action = na.omit) $population $population$fit [1] 0.778 $population$se.fit [1] 0.3208 $individual $individual$fit [1] 1.074 $individual$se.fit [1] 0.7846 > > ## newdata = original data > tmp <- predict(Whiting.model3) > tmp2 <- predict(Whiting.model3, newdata = list(contests, predictors)) > identical(tmp, tmp2) [1] TRUE > > ## new data with separate effects as in original > > newdata <- list(contests = data.frame(winner = factor(c("lizard096", "lizard099"), + levels = c("lizard048", "lizard052", "lizard096", "lizard099")), + loser = factor(c("lizard048", "lizard052"), + levels = c("lizard048", "lizard052", "lizard096", "lizard099"))), + predictors = flatlizards$predictors[c(27, 29, 55, 56),-c(1,18) ]) > > predict(Whiting.model3, level = 1, se.fit = TRUE, newdata = newdata)#[31, 34] $fit [1] 19.6348 0.6275 $se.fit [1] 3.875e+07 7.994e-01 > > predict(Whiting.model3, level = 1, se.fit = TRUE)$fit[c(31, 34)] [1] 19.6348 0.6275 > predict(Whiting.model3, level = 1, se.fit = TRUE)$se.fit[c(31, 34)] [1] 3.875e+07 7.994e-01 > > proc.time() user system elapsed 6.312 0.192 6.498 BradleyTerry2/tests/baseball.Rout.save0000644000176200001440000000665411723723170017501 0ustar liggesusers R version 2.10.1 (2009-12-14) Copyright (C) 2009 The R Foundation for Statistical Computing ISBN 3-900051-07-0 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(BradleyTerry2) > > ## This reproduces the analysis in Sec 10.6 of Agresti (2002). > > data(baseball, package = "BradleyTerry2") > > ## Simple Bradley-Terry model, ignoring home advantage: > baseballModel1 <- BTm(cbind(home.wins, away.wins), home.team, away.team, + data = baseball, id = "team") > summary(baseballModel1) Call: BTm(outcome = cbind(home.wins, away.wins), player1 = home.team, player2 = away.team, id = "team", data = baseball) Deviance Residuals: Min 1Q Median 3Q Max -1.6539 -0.0508 0.4133 0.9736 2.5509 Coefficients: Estimate Std. Error z value Pr(>|z|) teamBoston 1.1077 0.3339 3.318 0.000908 *** teamCleveland 0.6839 0.3319 2.061 0.039345 * teamDetroit 1.4364 0.3396 4.230 2.34e-05 *** teamMilwaukee 1.5814 0.3433 4.607 4.09e-06 *** teamNew York 1.2476 0.3359 3.715 0.000203 *** teamToronto 1.2945 0.3367 3.845 0.000121 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 (Dispersion parameter for binomial family taken to be 1) Null deviance: 78.015 on 42 degrees of freedom Residual deviance: 44.053 on 36 degrees of freedom AIC: 140.52 Number of Fisher Scoring iterations: 4 > > ## Now incorporate the "home advantage" effect > baseball$home.team <- data.frame(team = baseball$home.team, at.home = 1) > baseball$away.team <- data.frame(team = baseball$away.team, at.home = 0) > baseballModel2 <- update(baseballModel1, formula = ~ team + at.home) > summary(baseballModel2) Call: BTm(outcome = cbind(home.wins, away.wins), player1 = home.team, player2 = away.team, formula = ~team + at.home, id = "team", data = baseball) Deviance Residuals: Min 1Q Median 3Q Max -2.03819 -0.40577 0.04326 0.61163 2.26001 Coefficients: Estimate Std. Error z value Pr(>|z|) teamBoston 1.1438 0.3378 3.386 0.000710 *** teamCleveland 0.7047 0.3350 2.104 0.035417 * teamDetroit 1.4754 0.3446 4.282 1.85e-05 *** teamMilwaukee 1.6196 0.3474 4.662 3.13e-06 *** teamNew York 1.2813 0.3404 3.764 0.000167 *** teamToronto 1.3271 0.3403 3.900 9.64e-05 *** at.home 0.3023 0.1309 2.308 0.020981 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 (Dispersion parameter for binomial family taken to be 1) Null deviance: 78.015 on 42 degrees of freedom Residual deviance: 38.643 on 35 degrees of freedom AIC: 137.11 Number of Fisher Scoring iterations: 4 > > ## Compare the fit of these two models: > anova(baseballModel1, baseballModel2) Analysis of Deviance Table Response: cbind(home.wins, away.wins) Model 1: ~team Model 2: ~team + at.home Resid. Df Resid. Dev Df Deviance 1 36 44.053 2 35 38.643 1 5.4106 > BradleyTerry2/tests/predict.R0000644000176200001440000000526712153574505015704 0ustar liggesusers## some awkward cases for predict ## (in response to Arthur Spirling's bug report) options(digits = 4) ## only applies to this file ## The final model in example(flatlizards) library(BradleyTerry2) data(flatlizards, package = "BradleyTerry2") attach(flatlizards) Whiting.model3 <- BTm(1, winner, loser, ~ throat.PC1[..] + throat.PC3[..] + head.length[..] + SVL[..] + (1|..), family = binomial(link = "probit"), data = list(contests, predictors), trace = TRUE) ## new lizard with original lizards with NAs newdata <- list(contests = data.frame(winner = factor(c("lizard096", "lizard059"), levels = c("lizard048", "lizard052", "lizard096", "lizard059")), loser = factor(c("lizard048", "lizard052"), levels = c("lizard048", "lizard052", "lizard096", "lizard059"))), predictors = rbind(flatlizards$predictors[c(27, 29, 55),-c(1,18) ], c(NA, 1.5, 1.5, -.2, 3, 1, -1, -1.5, -1.5, 250, 2000, 1, 0.1, 0.2, 0.5, -0.2))) predict(Whiting.model3, level = 1, se.fit = TRUE, newdata = newdata) ## new lizard with NAs - can't predict, go by na.action newdata <- list(contests = data.frame(winner = factor(c("lizard048", "lizard059"), levels = c("lizard006", "lizard011", "lizard048", "lizard059")), loser = factor(c("lizard006", "lizard011"), levels = c("lizard006", "lizard011", "lizard048", "lizard059"))), predictors = rbind(flatlizards$predictors[c(3, 6, 27),-c(1,18) ], c(NA, 1.5, 1.5, -.2, 3, 1, -1, -1.5, -1.5, 250, 2000, 1, 0.1, 0.2, 0.5, -0.2))) predict(Whiting.model3, level = 0:1, se.fit = TRUE, newdata = newdata, na.action = na.pass) predict(Whiting.model3, level = 0:1, se.fit = TRUE, newdata = newdata, na.action = na.omit) ## newdata = original data tmp <- predict(Whiting.model3) tmp2 <- predict(Whiting.model3, newdata = list(contests, predictors)) identical(tmp, tmp2) ## new data with separate effects as in original newdata <- list(contests = data.frame(winner = factor(c("lizard096", "lizard099"), levels = c("lizard048", "lizard052", "lizard096", "lizard099")), loser = factor(c("lizard048", "lizard052"), levels = c("lizard048", "lizard052", "lizard096", "lizard099"))), predictors = flatlizards$predictors[c(27, 29, 55, 56),-c(1,18) ]) predict(Whiting.model3, level = 1, se.fit = TRUE, newdata = newdata)#[31, 34] predict(Whiting.model3, level = 1, se.fit = TRUE)$fit[c(31, 34)] predict(Whiting.model3, level = 1, se.fit = TRUE)$se.fit[c(31, 34)] BradleyTerry2/tests/nested.R0000644000176200001440000000173011723723170015517 0ustar liggesusers## nested use of BTm ## (in response to Jing Hua Zhao's bug report) library(BradleyTerry2) myfun <- function(x) { c2b <- countsToBinomial(x) names(c2b) <- c("allele1", "allele2", "transmitted", "nontransmitted") btx <- BTm(cbind(transmitted, nontransmitted), allele1, allele2, ~allele, id = "allele", data = c2b) } x <- matrix(c(0,0, 0, 2, 0,0, 0, 0, 0, 0, 0, 0, 0,0, 1, 3, 0,0, 0, 2, 3, 0, 0, 0, 2,3,26,35, 7,0, 2,10,11, 3, 4, 1, 2,3,22,26, 6,2, 4, 4,10, 2, 2, 0, 0,1, 7,10, 2,0, 0, 2, 2, 1, 1, 0, 0,0, 1, 4, 0,1, 0, 1, 0, 0, 0, 0, 0,2, 5, 4, 1,1, 0, 0, 0, 2, 0, 0, 0,0, 2, 6, 1,0, 2, 0, 2, 0, 0, 0, 0,3, 6,19, 6,0, 0, 2, 5, 3, 0, 0, 0,0, 3, 1, 1,0, 0, 0, 1, 0, 0, 0, 0,0, 0, 2, 0,0, 0, 0, 0, 0, 0, 0, 0,0, 1, 0, 0,0, 0, 0, 0, 0, 0, 0),nrow=12) colnames(x) <- 1:12 rownames(x) <- 1:12 xx <- myfun(x) BradleyTerry2/tests/add1.Rout.save0000644000176200001440000000434611723723170016541 0ustar liggesusers R version 2.10.1 (2009-12-14) Copyright (C) 2009 The R Foundation for Statistical Computing ISBN 3-900051-07-0 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(BradleyTerry2) > data(flatlizards, package = "BradleyTerry2") > > attach(flatlizards) > result <- rep(1, nrow(contests)) > BTmodel1 <- BTm(result, winner, loser, + ~ throat.PC1[..] + throat.PC3[..] + (1|..), + data = list(contests, predictors), + tol = 1e-4, sigma = 2, trace = TRUE) Iteration 1. Score = 5.077924 Iteration 2. Score = 1.087963 Iteration 3. Score = 0.2062877 Iteration 4. Score = 0.01989172 Iteration 5. Score = 0.001411764 Iteration 6. Score = 9.04485e-05 > > drop1(BTmodel1) Single term deletions Model: ~throat.PC1[..] + throat.PC3[..] + (1 | ..) Statistic Df `throat.PC1[..]` 3.4143 1 `throat.PC3[..]` 5.0560 1 > > add1(BTmodel1, ~ . + head.length[..] + SVL[..], test = "Chisq") Single term additions Model: ~throat.PC1[..] + throat.PC3[..] + (1 | ..) Statistic Df P(>|Chi|) head.length[..] 4.4730 1 0.03443 * SVL[..] 2.6624 1 0.10275 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > > BTmodel2 <- update(BTmodel1, formula = ~ . + head.length[..]) Iteration 1. Score = 4.513682 Iteration 2. Score = 1.312929 Iteration 3. Score = 0.2792263 Iteration 4. Score = 0.0301132 Iteration 5. Score = 0.002205424 Iteration 6. Score = 0.0001348541 > > drop1(BTmodel2, test = "Chisq") Single term deletions Model: ~throat.PC1[..] + throat.PC3[..] + (1 | ..) + head.length[..] Statistic Df P(>|Chi|) `throat.PC1[..]` 4.0522 1 0.04411 * `throat.PC3[..]` 7.2577 1 0.00706 ** `head.length[..]` 4.4730 1 0.03443 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > BradleyTerry2/tests/countsToBinomial.Rout.save0000644000176200001440000000201011723723170021203 0ustar liggesusers R version 2.10.1 (2009-12-14) Copyright (C) 2009 The R Foundation for Statistical Computing ISBN 3-900051-07-0 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(BradleyTerry2) > data(citations, package = "BradleyTerry2") > > ## Convert frequencies to success/failure data > results <- countsToBinomial(citations) > results player1 player2 win1 win2 1 Biometrika Comm Statist 730 33 2 Biometrika JASA 498 320 3 Biometrika JRSS-B 221 284 4 Comm Statist JASA 68 813 5 Comm Statist JRSS-B 17 276 6 JASA JRSS-B 142 325 > BradleyTerry2/tests/countsToBinomial.R0000644000176200001440000000024111723723170017522 0ustar liggesuserslibrary(BradleyTerry2) data(citations, package = "BradleyTerry2") ## Convert frequencies to success/failure data results <- countsToBinomial(citations) results BradleyTerry2/tests/flatlizards.Rout.save0000644000176200001440000004403212465703106020244 0ustar liggesusers R Under development (unstable) (2015-02-07 r67757) -- "Unsuffered Consequences" Copyright (C) 2015 The R Foundation for Statistical Computing Platform: x86_64-unknown-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > options(digits = 4) ## only applies to this file > library(BradleyTerry2) Loading required package: lme4 Loading required package: Matrix Loading required package: Rcpp > data(flatlizards, package = "BradleyTerry2") > ## > ## Fit the standard Bradley-Terry model, using the bias-reduced > ## maximum likelihood method: > ## > attach(flatlizards) > result <- rep(1, nrow(contests)) > BTmodel <- BTm(result, winner, loser, br = TRUE, data = contests) > summary(BTmodel) Call: BTm(outcome = result, player1 = winner, player2 = loser, data = contests, br = TRUE) Coefficients: (3 not defined because of singularities) Estimate Std. Error z value Pr(>|z|) ..lizard005 -1.2050 4.6460 -0.26 0.80 ..lizard006 -2.8710 5.9226 -0.48 0.63 ..lizard009 0.0795 6.1826 0.01 0.99 ..lizard010 -1.9386 5.3745 -0.36 0.72 ..lizard011 -1.0986 2.3094 -0.48 0.63 ..lizard012 -0.6384 3.2353 -0.20 0.84 ..lizard013 -3.3057 5.5911 -0.59 0.55 ..lizard016 1.1833 2.8190 0.42 0.67 ..lizard018 -1.5657 2.2367 -0.70 0.48 ..lizard020 -0.1601 3.7068 -0.04 0.97 ..lizard023 0.8899 3.0246 0.29 0.77 ..lizard024 -1.0986 2.3094 -0.48 0.63 ..lizard025 -1.8064 5.9131 -0.31 0.76 ..lizard026 -2.1972 3.2660 -0.67 0.50 ..lizard028 -1.2050 3.3044 -0.36 0.72 ..lizard029 -1.2588 2.8995 -0.43 0.66 ..lizard030 0.4602 3.9750 0.12 0.91 ..lizard031 -2.8145 5.0273 -0.56 0.58 ..lizard032 -2.0113 3.7265 -0.54 0.59 ..lizard033 -1.7726 5.2119 -0.34 0.73 ..lizard037 -2.9050 5.4434 -0.53 0.59 ..lizard038 -0.0623 3.1535 -0.02 0.98 ..lizard040 0.4039 2.5376 0.16 0.87 ..lizard045 -0.8704 2.7099 -0.32 0.75 ..lizard047 -1.0986 2.3094 -0.48 0.63 ..lizard048 -1.7724 5.4538 -0.32 0.75 ..lizard050 -2.0113 3.7265 -0.54 0.59 ..lizard052 -0.9126 2.9246 -0.31 0.75 ..lizard053 NA NA NA NA ..lizard055 -1.0681 3.4273 -0.31 0.76 ..lizard058 NA NA NA NA ..lizard060 NA NA NA NA ..lizard061 -1.0971 1.9958 -0.55 0.58 ..lizard062 -2.3037 4.0314 -0.57 0.57 ..lizard063 -0.2087 3.8055 -0.05 0.96 ..lizard064 -0.1707 3.4108 -0.05 0.96 ..lizard065 -1.7159 5.5324 -0.31 0.76 ..lizard066 0.6094 3.3873 0.18 0.86 ..lizard069 -3.4895 5.1139 -0.68 0.50 ..lizard070 2.6012 4.2620 0.61 0.54 ..lizard071 -2.3909 5.6112 -0.43 0.67 ..lizard073 -0.8878 5.1058 -0.17 0.86 ..lizard074 -1.0191 5.7351 -0.18 0.86 ..lizard075 -2.3040 4.0379 -0.57 0.57 ..lizard077 -0.7951 2.6901 -0.30 0.77 ..lizard078 -1.2054 3.3124 -0.36 0.72 ..lizard081 -1.9690 3.5605 -0.55 0.58 ..lizard082 -2.7400 5.4502 -0.50 0.62 ..lizard083 0.4915 2.9395 0.17 0.87 ..lizard084 -1.7796 3.0237 -0.59 0.56 ..lizard086 -2.3234 5.0375 -0.46 0.64 ..lizard089 -3.8713 5.5773 -0.69 0.49 ..lizard091 -3.3161 5.3428 -0.62 0.53 ..lizard096 -0.7485 5.5614 -0.13 0.89 ..lizard099 0.4040 2.7383 0.15 0.88 ..lizard100 -1.9864 5.6038 -0.35 0.72 ..lizard102 -1.8704 5.4605 -0.34 0.73 ..lizard105 -0.6427 3.1202 -0.21 0.84 ..lizard155 -0.9981 3.1045 -0.32 0.75 ..lizard156 -0.5114 3.2164 -0.16 0.87 ..lizard162 0.0847 3.6442 0.02 0.98 ..lizard163 -0.6947 3.4311 -0.20 0.84 ..lizard165 -1.2693 4.1191 -0.31 0.76 ..lizard167 -1.2054 3.3124 -0.36 0.72 ..lizard170 0.5872 2.2387 0.26 0.79 ..lizard171 1.5026 4.8475 0.31 0.76 ..lizard173 -0.9049 2.5622 -0.35 0.72 ..lizard174 1.5026 3.5821 0.42 0.67 ..lizard176 0.4663 2.7358 0.17 0.86 ..lizard177 0.0306 2.5324 0.01 0.99 ..lizard178 -1.1609 3.9087 -0.30 0.77 ..lizard179 -0.4892 2.4780 -0.20 0.84 ..lizard180 -1.3213 2.1046 -0.63 0.53 ..lizard183 -1.0681 3.4273 -0.31 0.76 ..lizard188 -1.8650 3.1822 -0.59 0.56 ..lizard189 -1.9333 3.3020 -0.59 0.56 (Dispersion parameter for binomial family taken to be 1) Null deviance: 62.926 on 100 degrees of freedom Residual deviance: 50.212 on 27 degrees of freedom Penalized deviance: 147.5 AIC: 196.2 > ## > ## That's fairly useless, though, because of the rather small > ## amount of data on each lizard. And really the scientific > ## interest is not in the abilities of these particular 77 > ## lizards, but in the relationship between ability and the > ## measured predictor variables. > ## > ## So next fit (by maximum likelihood) a "structured" B-T model in > ## which abilities are determined by a linear predictor. > ## > ## This reproduces results reported in Table 1 of Whiting et al. (2006): > ## > Whiting.model <- BTm(result, winner, loser, ~ throat.PC1[..] + throat.PC3[..] + + head.length[..] + SVL[..], family = binomial, + data = list(contests, predictors)) > summary(Whiting.model) Call: BTm(outcome = result, player1 = winner, player2 = loser, formula = ~throat.PC1[..] + throat.PC3[..] + head.length[..] + SVL[..], family = binomial, data = list(contests, predictors)) Deviance Residuals: Min 1Q Median 3Q Max 0.0001 0.4455 0.7961 1.1765 1.9588 Coefficients: Estimate Std. Error z value Pr(>|z|) ..lizard096 16.4245 1194.5203 0.01 0.9890 ..lizard099 0.8358 1.1591 0.72 0.4709 throat.PC1[..] -0.0926 0.0291 -3.19 0.0014 ** throat.PC3[..] 0.3421 0.1109 3.09 0.0020 ** head.length[..] -1.1252 0.4944 -2.28 0.0228 * SVL[..] 0.1883 0.0985 1.91 0.0560 . --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 (Dispersion parameter for binomial family taken to be 1) Null deviance: 138.629 on 100 degrees of freedom Residual deviance: 95.361 on 94 degrees of freedom AIC: 107.4 Number of Fisher Scoring iterations: 15 > ## > ## Equivalently, fit the same model using glmmPQL: > ## > Whiting.model <- BTm(result, winner, loser, ~ throat.PC1[..] + throat.PC3[..] + + head.length[..] + SVL[..] + (1|..), sigma = 0, + sigma.fixed = TRUE, data = list(contests, predictors)) > summary(Whiting.model) PQL algorithm converged to fixed effects model Call: BTm(outcome = result, player1 = winner, player2 = loser, formula = ~throat.PC1[..] + throat.PC3[..] + head.length[..] + SVL[..] + (1 | ..), data = list(contests, predictors), sigma = 0, sigma.fixed = TRUE) Deviance Residuals: Min 1Q Median 3Q Max 0.000 0.446 0.796 1.177 1.959 Coefficients: Estimate Std. Error z value Pr(>|z|) ..lizard096 2.24e+01 3.96e+04 0.00 0.9995 ..lizard099 8.36e-01 1.16e+00 0.72 0.4709 throat.PC1[..] -9.26e-02 2.91e-02 -3.19 0.0014 ** throat.PC3[..] 3.42e-01 1.11e-01 3.09 0.0020 ** head.length[..] -1.13e+00 4.94e-01 -2.28 0.0228 * SVL[..] 1.88e-01 9.85e-02 1.91 0.0560 . --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 (Dispersion parameter for binomial family taken to be 1) Null deviance: 138.629 on 100 degrees of freedom Residual deviance: 95.361 on 94 degrees of freedom AIC: 107.4 Number of Fisher Scoring iterations: NA > ## > ## But that analysis assumes that the linear predictor formula for > ## abilities is _perfect_, i.e., that there is no error in the linear > ## predictor. This will always be unrealistic. > ## > ## So now fit the same predictor but with a normally distributed error > ## term --- a generalized linear mixed model --- by using the BTm > ## function instead of glm. > ## > Whiting.model2 <- BTm(result, winner, loser, ~ throat.PC1[..] + throat.PC3[..] + + head.length[..] + SVL[..] + (1|..), + data = list(contests, predictors), trace = TRUE) Iteration 1. Score = 0.1424 Iteration 2. Score = 0.8836 Iteration 3. Score = 0.3226 Iteration 4. Score = 0.007671 Iteration 5. Score = 0.0006436 Iteration 6. Score = 5.467e-05 Iteration 7. Score = 4.658e-06 Iteration 8. Score = 3.962e-07 > summary(Whiting.model2) Call: BTm(outcome = result, player1 = winner, player2 = loser, formula = ~throat.PC1[..] + throat.PC3[..] + head.length[..] + SVL[..] + (1 | ..), data = list(contests, predictors), trace = TRUE) Fixed Effects: Estimate Std. Error z value Pr(>|z|) ..lizard096 3.67e+01 3.87e+07 0.00 1.000 ..lizard099 9.53e-01 1.28e+00 0.74 0.458 throat.PC1[..] -8.69e-02 4.12e-02 -2.11 0.035 * throat.PC3[..] 3.73e-01 1.53e-01 2.45 0.014 * head.length[..] -1.38e+00 7.39e-01 -1.87 0.061 . SVL[..] 1.72e-01 1.37e-01 1.25 0.210 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 (Dispersion parameter for binomial family taken to be 1) Random Effects: Estimate Std. Error z value Pr(>|z|) Std. Dev. 1.110 0.322 3.44 0.00058 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Number of iterations: 8 > ## > ## The estimated coefficients (of throat.PC1, throat.PC3, > ## head.length and SVL are not changed substantially by > ## the recognition of an error term in the model; but the estimated > ## standard errors are larger, as expected. The main conclusions from > ## Whiting et al. (2006) are unaffected. > ## > ## With the normally distributed random error included, it is perhaps > ## at least as natural to use probit rather than logit as the link > ## function: > ## > Whiting.model3 <- BTm(result, winner, loser, ~ throat.PC1[..] + throat.PC3[..] + + head.length[..] + SVL[..] + (1|..), + family = binomial(link = "probit"), + data = list(contests, predictors), trace = TRUE) Iteration 1. Score = 0.3606 Iteration 2. Score = 0.799 Iteration 3. Score = 0.2863 Iteration 4. Score = 0.003823 Iteration 5. Score = 0.0001769 Iteration 6. Score = 9.28e-06 Iteration 7. Score = 6.795e-07 > summary(Whiting.model3) Call: BTm(outcome = result, player1 = winner, player2 = loser, formula = ~throat.PC1[..] + throat.PC3[..] + head.length[..] + SVL[..] + (1 | ..), family = binomial(link = "probit"), data = list(contests, predictors), trace = TRUE) Fixed Effects: Estimate Std. Error z value Pr(>|z|) ..lizard096 2.05e+01 3.87e+07 0.00 1.0000 ..lizard099 5.98e-01 7.38e-01 0.81 0.4178 throat.PC1[..] -5.36e-02 2.32e-02 -2.31 0.0209 * throat.PC3[..] 2.28e-01 8.62e-02 2.64 0.0083 ** head.length[..] -8.43e-01 4.21e-01 -2.01 0.0449 * SVL[..] 1.05e-01 7.76e-02 1.36 0.1746 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 (Dispersion parameter for binomial family taken to be 1) Random Effects: Estimate Std. Error z value Pr(>|z|) Std. Dev. 0.630 0.186 3.38 0.00073 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Number of iterations: 7 > BTabilities(Whiting.model3) ability s.e. lizard003 0.95355 2.933e-01 lizard005 0.53816 3.183e-01 lizard006 -0.14147 3.377e-01 lizard009 0.73757 3.665e-01 lizard010 0.64227 3.232e-01 lizard011 -0.06162 4.258e-01 lizard012 -1.84812 6.110e-01 lizard013 0.22103 1.920e-01 lizard016 0.91544 3.519e-01 lizard018 -0.56996 4.624e-01 lizard020 1.40642 4.914e-01 lizard023 -0.36857 1.222e-01 lizard024 -0.75717 3.324e-01 lizard025 0.72348 2.553e-01 lizard026 0.88139 2.870e-01 lizard028 -0.18453 2.132e-01 lizard029 -0.45028 3.763e-01 lizard030 0.81456 2.863e-01 lizard031 -0.17223 2.208e-01 lizard032 -0.25860 2.435e-01 lizard033 -0.47074 2.662e-01 lizard037 -0.70113 3.183e-01 lizard038 0.14185 3.460e-01 lizard040 0.01696 2.886e-01 lizard045 -0.42884 3.105e-01 lizard047 0.43601 1.649e-01 lizard048 0.63648 2.739e-01 lizard050 -0.60271 1.899e-01 lizard052 -0.44522 3.262e-01 lizard053 -0.71500 3.899e-01 lizard055 -1.07833 3.624e-01 lizard058 -0.54361 4.181e-01 lizard060 0.49446 3.946e-01 lizard061 0.46849 2.358e-01 lizard062 0.34632 2.301e-01 lizard063 0.33597 3.267e-01 lizard064 0.33638 4.172e-01 lizard065 -0.28462 2.293e-01 lizard066 0.95006 5.584e-01 lizard069 -1.33897 3.664e-01 lizard070 1.24275 5.065e-01 lizard071 -0.23844 3.145e-01 lizard073 -0.08660 1.703e-01 lizard074 -0.41429 1.308e-01 lizard075 -0.46101 3.525e-01 lizard077 -1.25546 4.186e-01 lizard078 -0.49810 2.521e-01 lizard081 0.50978 2.047e-01 lizard082 -0.44364 3.049e-01 lizard083 -0.10509 2.741e-01 lizard084 -0.37502 2.736e-01 lizard086 0.43640 4.175e-01 lizard089 0.46797 2.035e-01 lizard091 0.76537 2.618e-01 lizard096 20.46403 3.875e+07 lizard099 0.59770 7.377e-01 lizard100 -0.82767 2.606e-01 lizard102 -0.67043 3.512e-01 lizard105 -1.23675 3.977e-01 lizard155 -0.55743 3.604e-01 lizard156 -0.38819 2.065e-01 lizard162 0.01532 1.011e-01 lizard163 0.39476 1.746e-01 lizard165 0.16178 3.076e-01 lizard167 0.53388 2.976e-01 lizard170 0.80979 2.315e-01 lizard171 0.65363 2.985e-01 lizard173 -1.71445 5.203e-01 lizard174 -0.03279 2.826e-01 lizard176 1.10974 3.245e-01 lizard177 1.10664 3.800e-01 lizard178 0.12929 1.987e-01 lizard179 -0.03706 3.023e-01 lizard180 0.48147 3.489e-01 lizard183 -1.33956 4.096e-01 lizard188 -0.27797 5.677e-01 lizard189 0.59487 2.500e-01 attr(,"separate") [1] "lizard096" "lizard099" > residuals(Whiting.model3, "grouped") [,1] ..lizard003 6.156e-01 ..lizard005 6.933e-01 ..lizard006 -6.310e-01 ..lizard009 6.884e-01 ..lizard010 6.040e-01 ..lizard011 -7.168e-01 ..lizard012 -4.018e-01 ..lizard013 -3.721e-01 ..lizard016 8.831e-01 ..lizard018 -7.042e-01 ..lizard020 4.062e-01 ..lizard023 1.059e+00 ..lizard024 -8.984e-01 ..lizard025 4.726e-01 ..lizard026 -1.439e+00 ..lizard028 1.066e-01 ..lizard029 -6.009e-01 ..lizard030 3.319e-01 ..lizard031 -4.843e-01 ..lizard032 -9.097e-01 ..lizard033 3.913e-01 ..lizard037 -6.366e-01 ..lizard038 2.846e-01 ..lizard040 7.221e-01 ..lizard045 4.416e-01 ..lizard047 -1.672e-01 ..lizard048 5.911e-01 ..lizard050 -7.611e-01 ..lizard052 3.784e-01 ..lizard053 8.984e-01 ..lizard055 -3.895e-01 ..lizard058 1.884e+00 ..lizard060 7.168e-01 ..lizard061 -6.822e-01 ..lizard062 -1.025e+00 ..lizard063 -1.059e+00 ..lizard064 7.004e-01 ..lizard065 8.470e-01 ..lizard066 6.191e-01 ..lizard069 -5.736e-01 ..lizard070 6.441e-01 ..lizard071 5.268e-01 ..lizard073 7.469e-01 ..lizard074 5.512e-01 ..lizard075 -7.052e-01 ..lizard077 -4.525e-01 ..lizard078 -5.894e-01 ..lizard081 -1.395e+00 ..lizard082 4.577e-02 ..lizard083 6.290e-01 ..lizard084 -6.531e-01 ..lizard086 -1.663e-01 ..lizard089 -9.758e-01 ..lizard091 -1.058e+00 ..lizard096 1.000e+00 ..lizard099 -8.397e-08 ..lizard100 -5.045e-01 ..lizard102 3.176e-01 ..lizard105 -4.232e-01 ..lizard155 -4.510e-01 ..lizard156 -5.075e-01 ..lizard162 -5.470e-01 ..lizard163 -7.967e-01 ..lizard165 -7.720e-01 ..lizard167 -4.290e-01 ..lizard170 6.048e-01 ..lizard171 -6.812e-01 ..lizard173 -4.104e-01 ..lizard174 7.924e-01 ..lizard176 1.871e-01 ..lizard177 2.405e-02 ..lizard178 -8.898e-01 ..lizard179 -5.000e-02 ..lizard180 -6.809e-01 ..lizard183 -3.574e-01 ..lizard188 -7.392e-01 ..lizard189 -1.101e+00 attr(,"weights") [,1] ..lizard003 9.978e-01 ..lizard005 1.307e+00 ..lizard006 4.136e-01 ..lizard009 4.686e-01 ..lizard010 7.195e-01 ..lizard011 4.917e-01 ..lizard012 2.593e-01 ..lizard013 1.214e+00 ..lizard016 1.147e+00 ..lizard018 6.742e-01 ..lizard020 1.103e-01 ..lizard023 1.583e+00 ..lizard024 5.889e-01 ..lizard025 2.059e-01 ..lizard026 6.302e-01 ..lizard028 1.572e+00 ..lizard029 9.465e-01 ..lizard030 3.083e-02 ..lizard031 2.474e+00 ..lizard032 5.927e-01 ..lizard033 1.595e+00 ..lizard037 9.638e-01 ..lizard038 2.280e+00 ..lizard040 3.002e+00 ..lizard045 2.617e+00 ..lizard047 1.220e+00 ..lizard048 8.228e-01 ..lizard050 5.230e-01 ..lizard052 2.769e+00 ..lizard053 5.889e-01 ..lizard055 8.877e-02 ..lizard058 5.896e-01 ..lizard060 4.917e-01 ..lizard061 9.241e-01 ..lizard062 1.079e+00 ..lizard063 6.253e-01 ..lizard064 1.332e+00 ..lizard065 5.690e-01 ..lizard066 4.008e-01 ..lizard069 1.287e+00 ..lizard070 8.399e-01 ..lizard071 2.845e-01 ..lizard073 2.565e+00 ..lizard074 1.697e+00 ..lizard075 4.826e-01 ..lizard077 4.335e-01 ..lizard078 5.834e-01 ..lizard081 6.327e-01 ..lizard082 1.581e+00 ..lizard083 8.115e-01 ..lizard084 1.179e+00 ..lizard086 1.806e+00 ..lizard089 1.694e+00 ..lizard091 1.232e+00 ..lizard096 6.661e-16 ..lizard099 2.203e+00 ..lizard100 2.527e-01 ..lizard102 1.615e+00 ..lizard105 2.031e-01 ..lizard155 3.411e-01 ..lizard156 2.572e-01 ..lizard162 3.123e-01 ..lizard163 5.442e-01 ..lizard165 5.298e-01 ..lizard167 1.557e+00 ..lizard170 1.199e+00 ..lizard171 4.623e-01 ..lizard173 2.376e-01 ..lizard174 9.911e-01 ..lizard176 2.012e+00 ..lizard177 1.990e+00 ..lizard178 5.859e-01 ..lizard179 1.318e+00 ..lizard180 1.360e+00 ..lizard183 5.284e-02 ..lizard188 9.479e-01 ..lizard189 1.142e+00 > ## Note the "separate" attribute here, identifying two lizards with > ## missing values of at least one predictor variable > ## > ## Modulo the usual scale change between logit and probit, the results > ## are (as expected) very similar to Whiting.model2. > > proc.time() user system elapsed 2.464 0.052 2.509 BradleyTerry2/tests/nested.Rout.save0000644000176200001440000000315411723723170017206 0ustar liggesusers R version 2.11.1 Patched (2010-09-30 r53083) Copyright (C) 2010 The R Foundation for Statistical Computing ISBN 3-900051-07-0 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > ## nested use of BTm > ## (in response to Jing Hua Zhao's bug report) > library(BradleyTerry2) > myfun <- function(x) { + c2b <- countsToBinomial(x) + names(c2b) <- c("allele1", "allele2", "transmitted", "nontransmitted") + btx <- BTm(cbind(transmitted, nontransmitted), allele1, allele2, + ~allele, id = "allele", data = c2b) + } > > x <- matrix(c(0,0, 0, 2, 0,0, 0, 0, 0, 0, 0, 0, + 0,0, 1, 3, 0,0, 0, 2, 3, 0, 0, 0, + 2,3,26,35, 7,0, 2,10,11, 3, 4, 1, + 2,3,22,26, 6,2, 4, 4,10, 2, 2, 0, + 0,1, 7,10, 2,0, 0, 2, 2, 1, 1, 0, + 0,0, 1, 4, 0,1, 0, 1, 0, 0, 0, 0, + 0,2, 5, 4, 1,1, 0, 0, 0, 2, 0, 0, + 0,0, 2, 6, 1,0, 2, 0, 2, 0, 0, 0, + 0,3, 6,19, 6,0, 0, 2, 5, 3, 0, 0, + 0,0, 3, 1, 1,0, 0, 0, 1, 0, 0, 0, + 0,0, 0, 2, 0,0, 0, 0, 0, 0, 0, 0, + 0,0, 1, 0, 0,0, 0, 0, 0, 0, 0, 0),nrow=12) > colnames(x) <- 1:12 > rownames(x) <- 1:12 > > xx <- myfun(x) > BradleyTerry2/tests/add1.R0000644000176200001440000000076711723723170015057 0ustar liggesuserslibrary(BradleyTerry2) data(flatlizards, package = "BradleyTerry2") attach(flatlizards) result <- rep(1, nrow(contests)) BTmodel1 <- BTm(result, winner, loser, ~ throat.PC1[..] + throat.PC3[..] + (1|..), data = list(contests, predictors), tol = 1e-4, sigma = 2, trace = TRUE) drop1(BTmodel1) add1(BTmodel1, ~ . + head.length[..] + SVL[..], test = "Chisq") BTmodel2 <- update(BTmodel1, formula = ~ . + head.length[..]) drop1(BTmodel2, test = "Chisq") BradleyTerry2/tests/flatlizards.R0000644000176200001440000000574712153574461016575 0ustar liggesusersoptions(digits = 4) ## only applies to this file library(BradleyTerry2) data(flatlizards, package = "BradleyTerry2") ## ## Fit the standard Bradley-Terry model, using the bias-reduced ## maximum likelihood method: ## attach(flatlizards) result <- rep(1, nrow(contests)) BTmodel <- BTm(result, winner, loser, br = TRUE, data = contests) summary(BTmodel) ## ## That's fairly useless, though, because of the rather small ## amount of data on each lizard. And really the scientific ## interest is not in the abilities of these particular 77 ## lizards, but in the relationship between ability and the ## measured predictor variables. ## ## So next fit (by maximum likelihood) a "structured" B-T model in ## which abilities are determined by a linear predictor. ## ## This reproduces results reported in Table 1 of Whiting et al. (2006): ## Whiting.model <- BTm(result, winner, loser, ~ throat.PC1[..] + throat.PC3[..] + head.length[..] + SVL[..], family = binomial, data = list(contests, predictors)) summary(Whiting.model) ## ## Equivalently, fit the same model using glmmPQL: ## Whiting.model <- BTm(result, winner, loser, ~ throat.PC1[..] + throat.PC3[..] + head.length[..] + SVL[..] + (1|..), sigma = 0, sigma.fixed = TRUE, data = list(contests, predictors)) summary(Whiting.model) ## ## But that analysis assumes that the linear predictor formula for ## abilities is _perfect_, i.e., that there is no error in the linear ## predictor. This will always be unrealistic. ## ## So now fit the same predictor but with a normally distributed error ## term --- a generalized linear mixed model --- by using the BTm ## function instead of glm. ## Whiting.model2 <- BTm(result, winner, loser, ~ throat.PC1[..] + throat.PC3[..] + head.length[..] + SVL[..] + (1|..), data = list(contests, predictors), trace = TRUE) summary(Whiting.model2) ## ## The estimated coefficients (of throat.PC1, throat.PC3, ## head.length and SVL are not changed substantially by ## the recognition of an error term in the model; but the estimated ## standard errors are larger, as expected. The main conclusions from ## Whiting et al. (2006) are unaffected. ## ## With the normally distributed random error included, it is perhaps ## at least as natural to use probit rather than logit as the link ## function: ## Whiting.model3 <- BTm(result, winner, loser, ~ throat.PC1[..] + throat.PC3[..] + head.length[..] + SVL[..] + (1|..), family = binomial(link = "probit"), data = list(contests, predictors), trace = TRUE) summary(Whiting.model3) BTabilities(Whiting.model3) residuals(Whiting.model3, "grouped") ## Note the "separate" attribute here, identifying two lizards with ## missing values of at least one predictor variable ## ## Modulo the usual scale change between logit and probit, the results ## are (as expected) very similar to Whiting.model2. BradleyTerry2/NAMESPACE0000644000176200001440000000120212464703224014162 0ustar liggesusersexport(BTabilities, BTm, countsToBinomial, GenDavidson, glmmPQL, glmmPQL.control, plotProportions) importFrom(brglm, brglm) importFrom(gtools, combinations) importFrom(lme4, findbars, nobars) importFrom(stats, predict) S3method(add1, BTm) S3method(anova, BTm) S3method(drop1, BTm) S3method(formula, BTm) S3method(model.matrix, BTm) S3method(predict, BTm) S3method(predict, BTglmmPQL) S3method(print, BTm) S3method(print, BTglmmPQL) S3method(print, summary.BTglmmPQL) S3method(residuals, BTm) S3method(summary, BTglmmPQL) S3method(vcov, BTglmmPQL) S3method(print, BTabilities) S3method(vcov, BTabilities) S3method(coef, BTabilities) BradleyTerry2/data/0000755000176200001440000000000012465715316013667 5ustar liggesusersBradleyTerry2/data/baseball.RData0000644000176200001440000000054212166623724016351 0ustar liggesusersRN0 vxzƮp@2Q-m4Pq)yQ5g'u~,0֍="!vVlPJ~w Z{cE@@@ Mc4O*ŗng6_4Ujj(4fw!0ZUϕ EtJ(Mi5l%{wt&H7><믪.򓂂+(!u,x1ϺOx֡Ŧ%;rN>x<8#'u9ʟz桙 `-hcUGĐUM;/.vhk[k!ת+}^7BradleyTerry2/data/citations.rda0000644000176200001440000000036212465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5iIKMZjR`+5\5\5\u5\5鼐ڧL#dD " @8p wz9yfY`fY`B 4 B 4 BV f999999999000000000V#333333333 Q3g A8p `+V[ lӚY/_[ l%J`+V[ l%J`+V/_ l%J`+V[ l%J`+V  %K`+V[ l%J`+V[ lfK/_[ l%J`+V[ l%J`+` %J`+V [2leʰa+V [2 2e˰a+V [2leʰa+V [2le>>>>>>>>555555555#3Q3Q3Q3Q3Q3Q3Q3Q%BBBBBBBBBB3QgD:u<P(CQ E2[[B(Q(CQ E2e(P(CQ E2e(po5o ~(Q(CQ E2e(P(CQ E2eHO?~(P(CQ E2e(P(CQ E2[; яE?~e(P(CQ E2e(P(CQ E-!ӏE?2e(P)CS M24ehД)CS ͇EӏM?~4ehД)CS M24ehД)CS MM?~4hД)CS M24ehД)CS M24M?~4hє)CS M24ehД)CS M24eh>,~4h)CS M24ehД)CS M24eh|X4hjtojˀ@:@u~[{"F$ IdD "`fP BP  BШU`6 f`6####j59999999999000000000V33333    g A8pZ,~4h)CS M24ehД)CS M24eh|X4hGS M24ehД)CS M24ehДhGӏ M24ehД)CS M24ehД)CaGӏy7yo5eu ԁXRuԁ: 潊L#$D2"0 @( @( AhԪl0l0@@@@@AAAAQ3g A8pF`>>>>>>>>555555555#3Q3Q3Q3Q3Q3Q3Q3Q%BBBBBBBBBB3QgD:u<P(CQ E2_; ^Gя E2e(P(CQ E2e(P(ռGяE2e(P(CQ E2e(P(CQyg!ӏE?2e(P(CQ E2e(P(CQ W^GяE?2e(P(CQ E2e(P(CQ WBE?~e(P(CS M24ehД)CS MM?~4hД)CS M24ehД)CS M24M?~4hє)CS M24ehД)CS M24eh>,~4h)CS M24ehД)CS M24eh|X4hGS M24ehД)CS M24ehДhy''yQz(bb"BradleyTerry2/data/chameleons.rda0000644000176200001440000000425712465715316016505 0ustar liggesusersX pT޽ym&$E4ewHpy@B64RpIbvFik8iҡ #-NgjZ ZHZQ!=߹rY;8ܙ/s5.󸖹l6dsHA]'ulvӖF+.tGh9fHġNj3]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qpGXq+belRӄ}tum]eߏ|N]:/:?AMHߚ25Ix{9xQ[`ԸAή+rc)*1C~]Aq>Vx<Ԛ/K$ţ||$u3h5_|wv=|o~vzgvw~n^?s3yW<ӥwm߼{p,ro|stW'N^x?=3YӲgɝݩNC6އK7]:w~tg~ GgE1ʼnAy]QuYJTi*0wnASskDC ]x͉̬D.Vb~D׈75%<+L|47OJTxjhY M>U=t8Z۩!BK4H#Ȗojе#N<?fnȿ5QDfJ]MR0Bdpbl ִ㺖bZ$/qgcl^L/3N;5d߮Ɉj s!𔬦bƑN_0  ͌Qe۞vV鐑4ݗ&Buq@B+NVZjH(cf&u 'VWu#iivqDm@1ĩ'^#+hϙ𕻻vYONMܸ_:~۷O}o/t#Wߙ/}|ooyzkåG7?w|wD JtF^V/5ĕgwwvwvz/F~_?"BradleyTerry2/data/sound.fields.rda0000644000176200001440000000151012465715316016751 0ustar liggesusersXQn@u7 h?8⣿&qcm9w*=B?]g hy3rx3$"IJVߪzՄytTQݦ"y^9}IүJ~̝c}PzU~EI>7Vuqq4Zl}o *v, sgEf?Y,9&:6|nx20VeWTشh_-m>k[l|xD#Y|^0 G}z ,AA<^}bp畟KL%tC`1 ꡀ3؞ p-`ɲsdܺ"\A}y yHK^џ^GJ1"!N ^ռ^n -A iy -M387xh\=i}k~cXq|䤽w_=eL`0_]=B_yozuӧc C>z ɞ:p6!7>x|w?;u\?9xwy4~ٛ:欚L$Qmwݻ8KwބW4\FxAKԚwkxGl\eο08͋2J <,bUaG~j0׭'U_eY~M{_Rr!^-fYZ¼^} j/MW_|?nOv-7 J{~GYIwyL>lW7sܤb-8:sj23?BradleyTerry2/data/seeds.rda0000644000176200001440000000047512465715316015470 0ustar liggesusersJ@omRЂ .\Iۤh !vhJ+$]|$@tν Lw83f4>9: P<(l^U-3{F7;Л[h#iC#h@u߶^`;lcr+T߾Ł[>ց9(%%lZmmCҚJk~E<Ze5?P@Ye @Y;u0quLTRa*f%VF< H a**S b"s*TK׿SI@EKŶQ "*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CCfC)jڵ櫜/3i-k㯙iʺ㯹j.:knJko2;kЛ*`_vWd7_MHת7tͫUWB7AǠIVm)IГ@wBwCwA@Oz:UӠ=zTNC~ TAP: Aφ5jyh==z:y󡯇z"Ћ@/zMˡW@ z%Ы@^}+mo; {~臠~QǠ~I觡砟~y_~uMЯBoB @!GC П@@57C f[gmۡ ;wAz~ߠ>;>}Qyc'>i3ЧA>}_ ~O?}'x}'O`>}'O 'x O7@ >@'O` 'O @=| 'pO'O?y 'O @ 'O? 'O @>'O 'N= ^@` 'O`> 'O? @ 'O{ 8&O OO O O >@ |>{ ~@` @` &< @ O>}'O <>{/  'O? O @? &O'|@&}"0gx}0g` 3| /`0< ` 3g`=>3gx} ``=0g 3| 3gx ?}s'4p O5w?} ^i> {03gx =~ `? 3gx3g `< /`y0|> 3 ` ` > >`;  3< `? ? `; `x 3|= `? 3g 3g 3<>3g? 3# @ku{YxU ._ /`_# x}/`_ _  @/^> _}/_ Xp///^}/_ `_x-`_ ????0rZG$}+t$& BradleyTerry2/R/0000755000176200001440000000000012465715316013157 5ustar liggesusersBradleyTerry2/R/vcov.BTglmmPQL.R0000644000176200001440000000017612153401050015776 0ustar liggesusersvcov.BTglmmPQL <- function (object, ...) { so <- summary(object, corr = FALSE, ...) so$dispersion * so$cov.unscaled } BradleyTerry2/R/print.BTm.R0000644000176200001440000000016311723723170015110 0ustar liggesusersprint.BTm <- function (x, ...) { cat("Bradley Terry model fit by ") cat(x$method, "\n") NextMethod() } BradleyTerry2/R/predict.BTm.R0000644000176200001440000000651111723723170015411 0ustar liggesuserspredict.BTm <- function (object, newdata = NULL, level = 1, type = c("link", "response", "terms"), se.fit = FALSE, dispersion = NULL, terms = NULL, na.action = na.pass, ...) { type <- match.arg(type) if (!is.null(newdata)) { ## need to define X so will work with model terms setup <- match(c("player1", "player2", "formula", "id", "separate.ability", "refcat", "weights", "subset", "offset", "contrasts"), names(object$call), 0L) setup <- do.call(BTm.setup, c(as.list(object$call)[setup], list(data = newdata)), envir = environment(object$formula)) nfix <- length(object$coefficients) newdata <- data.frame(matrix(, nrow(setup$X), 0)) keep <- match(names(object$coefficients), colnames(setup$X), nomatch = 0) if (0 %in% keep){ ## new players with missing data - set to NA missing <- rowSums(setup$X[,-keep, drop = FALSE]) != 0 setup$X <- setup$X[, keep] setup$X[missing,] <- NA } if (ncol(setup$X) != nfix) { ## newdata does not include original players with missing data X <- matrix(0, nrow(setup$X), nfix, dimnames = list(rownames(setup$X), names(object$coefficients))) X[, colnames(setup$X)] <- setup$X newdata$X <- X } else newdata$X <- setup$X nran <- length(attr(object$coefficients, "random")) if (1 %in% level && type != "terms"){ if (ncol(setup$random) != nran) { ## expand to give col for every random effect Z <- matrix(0, nrow(setup$random), nran, dimnames = list(rownames(setup$random), colnames(object$random))) #ranef need names!! ## set to NA for contests with new players (with predictors present) miss <- !colnames(setup$random) %in% colnames(Z) Z[, colnames(setup$random)[!miss]] <- setup$random[,!miss] if (any(miss)) { miss <- rowSums(setup$random[, miss, drop = FALSE] != 0) > 0 Z[miss,] <- NA } newrandom <- Z } else newrandom <- setup$random return(NextMethod(newrandom = newrandom)) } } if (type == "terms") { object$x <- model.matrix(object) attr(object$x, "assign") <- object$assign id <- unique(object$assign) terms <- paste("X", id, sep = "") object$terms <- terms(reformulate(c(0, terms))) splitX <- function(X) { newdata <- data.frame(matrix(, nrow(X), 0)) for (i in seq(id)) newdata[terms[i]] <- X[,object$assign == id[i]] newdata } if (is.null(newdata)) newdata <- splitX(object$x) else newdata <- splitX(newdata$X) tmp <- NextMethod(newdata = newdata) #tmp$fit[tmp$se.fit == 0] <- NA tmp$se.fit[tmp$se.fit == 0] <- NA colnames(tmp$fit) <- colnames(tmp$se.fit) <- c("(separate)"[0 %in% id], object$term.labels) return(tmp) } else NextMethod() } BradleyTerry2/R/glmmPQL.control.R0000644000176200001440000000101211723723170016255 0ustar liggesusersglmmPQL.control <- function (maxiter = 50, IWLSiter = 10, tol = 1e-6, trace = FALSE) { call <- as.list(match.call()) if (length(call) > 1) { argPos <- match(c("maxiter", "IWLSiter", "tol"), names(call)) for (n in argPos[!is.na(argPos)]) { if (!is.numeric(call[[n]]) || call[[n]] <= 0) stop("value of '", names(call)[n], "' must be > 0") } } list(maxiter = maxiter, IWLSiter = IWLSiter, tol = tol, trace = trace) } BradleyTerry2/R/missToZero.R0000644000176200001440000000015411723723170015411 0ustar liggesusersmissToZero <- function(x, miss, dim = 1) { if (dim == 1) x[miss, ] <- 0 else x[, miss] <- 0 x } BradleyTerry2/R/add1.BTm.R0000644000176200001440000001426612214302420014561 0ustar liggesusersadd1.BTm <- function(object, scope, scale = 0, test = c("none", "Chisq", "F"), x = NULL, ...) { old.form <- formula(object) new.form <- update.formula(old.form, scope) if (!is.character(scope)){ orandom <- findbars(old.form[[2]]) srandom <- findbars(new.form[[2]]) if (length(srandom) && !identical(orandom, srandom)) stop("Random effects structure of object and scope must be identical.") scope <- add.scope(old.form, new.form) } if (!length(scope)) stop("no terms in scope for adding to object") if (is.null(x)) { # create model.matrix for maximum scope model <- Diff(object$player1, object$player2, new.form, object$id, object$data, object$separate.ability, object$refcat) if (sum(model$offset) > 0) warning("ignoring offset terms in scope") x <- model$X asgn <- attr(x, "assign") ## add dummy term for any separate effects oTerms <- c("sep"[0 %in% asgn], object$term.labels) object$terms <- terms(reformulate(oTerms)) y <- object$y dummy <- y ~ x - 1 if (!is.null(model$random)) { dummy <- update(dummy, .~ . + Z) Z <- model$random } argPos <- match(c("weights", "subset", "na.action"), names(object$call), 0) mf <- as.call(c(model.frame, as.list(object$call)[argPos], list(formula = dummy, offset = object$offset))) mf <- eval(mf, parent.frame()) x <- mf$x y <- model.response(mf) Z <- mf$Z wt <- model.weights(mf) if (is.null(wt)) wt <- rep.int(1, length(y)) offset <- model.offset(mf) } else { asgn <- attr(x, "assign") y <- object$y wt <- object$prior.weights offset <- object$offset Z <- object$random } if (is.null(object$random)){ attr(x, "assign") <- asgn + 1 object$formula <- formula(object$terms) object$x <- x object$y <- y object$random <- Z object$prior.weights <- wt object$offset <- offset stat.table <- NextMethod(x = x) attr(stat.table, "heading")[3] <- deparse(old.form) if (newsep <- sum(asgn == 0) - sum(object$assign ==0)) attr(stat.table, "heading") <- c(attr(stat.table, "heading"), paste("\n", newsep, " separate effects added\n", sep = "")) attr(stat.table, "separate.abilities") <- colnames(x)[asgn == 0] return(stat.table) } ## use original term labels: no sep effects or backticks (typically) oTerms <- attr(terms(nobars(old.form)), "term.labels") Terms <- attr(terms(nobars(new.form)), "term.labels") ousex <- asgn %in% c(0, which(Terms %in% oTerms)) sTerms <- sapply(strsplit(Terms, ":", fixed = TRUE), function(x) paste(sort(x), collapse = ":")) method <- switch(object$method, glmmPQL.fit) control <- object$control control$trace <- FALSE if (scale == 0) dispersion <- 1 else dispersion <- scale ns <- length(scope) stat <- df <- numeric(ns) # don't add in original as don't need for tests names(stat) <- names(df) <- as.character(scope) tryerror <- FALSE for (i in seq(scope)) { stt <- paste(sort(strsplit(scope[i], ":")[[1]]), collapse = ":") usex <- match(asgn, match(stt, sTerms), 0) > 0 | ousex fit <- method(X = x[, usex, drop = FALSE], y = y, Z = Z, weights = wt, offset = offset, family = object$family, control = control, sigma = object$call$sigma, sigma.fixed = object$sigma.fixed) class(fit) <- oldClass(object) ind <- (usex & !ousex)[usex] trystat <- try(t(coef(fit)[ind]) %*% chol2inv(chol(vcov(fit, dispersion = dispersion)[ind, ind])) %*% coef(fit)[ind], silent = TRUE) #vcov should deal with dispersion != 1 if (inherits(trystat, "try-error")) { stat[i] <- df[i] <- NA tryerror <- TRUE } else { stat[i] <- trystat df[i] <- sum(ind) } } table <- data.frame(stat, df) dimnames(table) <- list(names(df), c("Statistic", "Df")) title <- "Single term additions\n" topnote <- paste("Model: ", deparse(as.vector(formula(object))), if (scale > 0) paste("\nscale: ", format(scale), "\n"), if (tryerror) "\n\nTest statistic unestimable for at least one term") test <- match.arg(test) if (test == "Chisq") { dfs <- table[, "Df"] vals <- table[, "Statistic"] vals[dfs %in% 0] <- NA table <- cbind(table, `P(>|Chi|)` = pchisq(vals, abs(dfs), lower.tail = FALSE)) } else if (test == "F") { ## Assume dispersion fixed at one - if dispersion estimated, would use ## "residual" df from larger model in each comparison df.dispersion <- Inf if (df.dispersion == Inf) { fam <- object[[1]]$family$family if (fam == "binomial" || fam == "poisson") warning(gettextf("using F test with a '%s' family is inappropriate", fam), domain = NA, call. = FALSE) else warning("using F test with a fixed dispersion is inappropriate") } dfs <- table[, "Df"] Fvalue <- table[, "Statistic"]/abs(dfs) Fvalue[dfs %in% 0] <- NA table <- cbind(table, F = Fvalue, `Pr(>F)` = pf(Fvalue, abs(dfs), df.dispersion, lower.tail = FALSE)) } if (newsep <- sum(asgn == 0) - sum(object$assign ==0)) heading <- c(heading, paste("\n", newsep, " separate effects added\n", sep = "")) structure(table, heading = c(title, topnote), class = c("anova", "data.frame"), separate.abilities = colnames(x)[asgn == 0]) } BradleyTerry2/R/model.matrix.BTm.R0000644000176200001440000000026312464135260016360 0ustar liggesusersmodel.matrix.BTm <- function(object, ...){ ## set contrasts to NULL as apply to player formula not dummy formula object$contrasts <- NULL NextMethod("model.matrix") } BradleyTerry2/R/formula.BTm.R0000644000176200001440000000005311723723170015417 0ustar liggesusersformula.BTm <- function(x, ...) x$formula BradleyTerry2/R/plotProportions.R0000644000176200001440000001355512171565163016545 0ustar liggesusers## P(win|not tie) in terms of expit(lambda_i - lambda_j) GenDavidsonTie <- function(p){ scale <- match("tie.scale", substring(names(coef), 1, 9), 0) if (scale != 0) scale <- exp(coef[scale]) else scale <- 1 tie.mode <- match("tie.mode", substring(names(coef), 1, 8), 0) if (tie.mode != 0) tie.mode <- coef["tie.mode"] delta <- coef[match("tie.max", substring(names(coef), 1, 7))] ## first player is at home weight1 <- plogis(tie.mode) weight2 <- 1 - weight1 ## plogis = expit plogis(delta - scale * (weight1 * log(weight1) + weight2 * log(weight2)) + scale * (weight1 * log(p) + weight2 * log(1-p))) } #tmp <- eval(substitute(player1), data, parent.frame()) plotProportions <- function(win, tie = NULL, loss, player1, player2, abilities = NULL, home.adv = NULL, tie.max = NULL, tie.scale = NULL, tie.mode = NULL, at.home1 = NULL, at.home2 = NULL, data = NULL, subset = NULL, bin.size = 20, xlab = "P(player1 wins | not a tie)", ylab = "Proportion", legend = NULL, col = 1:2, ...){ call <- as.list(match.call()) var <- intersect(names(call), c("win", "tie", "loss", "player1", "player2", "at.home1", "at.home2")) var <- var[!sapply(call[var], is.null)] dat <- with(data, do.call("data.frame", call[var])) if (!missing(subset)){ subset <- eval(substitute(subset), data, parent.frame()) dat <- subset(dat, subset) } if (!missing(tie) && sum(dat$tie) == 0) dat$tie <- NULL if (!is.null(home.adv) && (missing(at.home1) || missing(at.home2))) stop("at.home1 and at.home2 must be specified") if (!is.null(home.adv)){ ## exclude neutral contests, make sure home player is first dat <- subset(dat, at.home1 | at.home2) swap <- which(as.logical(dat$at.home2)) if (length(swap)) { dat$win[swap] <- dat$loss[swap] if (is.null(dat$tie)) dat$loss[swap] <- !dat$win[swap] else dat$loss[swap] <- !(dat$win[swap] | dat$tie[swap]) tmp <- dat$player1[swap] dat$player1[swap] <- dat$player2[swap] dat$player2[swap] <- tmp dat$at.home1[swap] <- TRUE dat$at.home2[swap] <- FALSE } } else home.adv <- 0 ### get proportions p <- with(dat, plogis(home.adv + abilities[as.character(player1)] - abilities[as.character(player2)])) ## Depending on the distribution of p_ij (across all matches), ## divide the range of probabilities p_ij into discrete "bins", each ## of which has at least (say) 20 matches in it getBins <- function(p, bin.size) { ## alternatively estimate bins to same size intervals ## at least bin.size - distribute extra evenly over range min.size <- bin.size n <- length(p) r <- n %% min.size size <- rep(min.size, n %/% min.size) if (r > 0) { step <- length(size)/r extra <- round(seq(from = step/2 + 0.01, to = step/2 + 0.01 + (r - 1)*step, by = step)) size[extra] <- min.size + 1 } bin <- factor(rep(seq(length(size)), size))[match(p, sort(p))] low <- sort(p)[cumsum(c(1, size[-length(size)]))] #first high <- sort(p)[cumsum(size)] #last mid <- (high - low)/2 + low list(bin = bin, mid = mid) } winBin <- getBins(p, bin.size) ## Within each bin b, calculate ## d_b = proportion of matches in that bin that were drawn if (!is.null(dat$tie)) { tieBin <- winBin tri <- with(dat, win - (!win & !tie)) d_b <- tapply(tri, tieBin$bin, function(x) sum(x == 0)/length(x)) ## recompute bins omitting ties winBin <- getBins(p[!dat$tie], bin.size) } ## h_b = proportion of *non-drawn* matches in that bin that were won ## by the home team if (!is.null(dat$tie)) { h_b <- tapply(tri[!dat$tie], winBin$bin, function(x) sum(x == 1)/length(x)) } else h_b <- tapply(dat$win, winBin$bin, function(x) sum(x == 1)/length(x)) ## Plot d_b and h_b against the bin midpoints, in a plot with ## axis limits both (0,1) plot(h_b ~ winBin$mid, xlim = c(0, 1), ylim = c(0, 1), xlab = xlab, ylab = ylab, ...) if (missing(legend)) { if (is.null(dat$tie)) legend <- "Matches won" else legend <- c("Non-tied matches won", "Matches tied") } legend("topleft", legend, col = col[c(1, 2[!missing(tie)])], pch = 1) if (!is.null(dat$tie)) points(d_b ~ tieBin$mid, col = col[2]) ## Add to the plot the lines/curves ## y = x ## y = expit(log(nu * sqrt(p_ij * (1 - p_ij)))) ## The d_b should lie around the latter curve, and the h_b should ## lie around the former line. Any clear patterns of departure are ## of interest. curve(I, 0, 1, add = TRUE) env <- new.env() environment(GenDavidsonTie) <- env coef <- na.omit(c(home.adv = unname(home.adv), tie.max = unname(tie.max), tie.scale = unname(tie.scale), tie.mode = unname(tie.mode))) assign("coef", coef, envir=env) curve(GenDavidsonTie, 0, 1, col = col[2], add = TRUE) out <- list(win = data.frame(prop.win = h_b, bin.win = winBin$mid)) if (!is.null(dat$tie)) out <- c(out, tie = data.frame(prop.tie = d_b, bin.tie = tieBin$mid)) invisible(out) } BradleyTerry2/R/GenDavidson.R0000644000176200001440000000754512167300376015511 0ustar liggesusersGenDavidson <- function(win, # TRUE/FALSE tie, # TRUE/FALSE loss, # TRUE/FALSE player1, # player1 in each contest player2, # ditto player2 home.adv = NULL, tie.max = ~1, tie.mode = NULL, tie.scale = NULL, at.home1 = NULL, at.home2 = NULL){ call <- as.expression(sys.call()[c(1,5:6)]) extra <- NULL if (is.null(tie.max)) stop("a formula must be specified for tie.max") if (!is.null(home.adv) & is.null(at.home1)) stop("at.home1 and at.home2 must be specified") has.home.adv <- !is.null(home.adv) has.tie.mode <- !is.null(tie.mode) has.tie.scale <- !is.null(tie.scale) if (has.home.adv) extra <- c(extra, list(home.adv = home.adv)) if (has.tie.mode) extra <- c(extra, list(tie.mode = tie.mode)) if (has.tie.scale) extra <- c(extra, list(tie.scale = tie.scale)) i <- has.home.adv + has.tie.mode + has.tie.scale a <- match("home.adv", names(extra), 1) b <- match("tie.mode", names(extra), 1) c <- match("tie.scale", names(extra), 1) adv <- has.home.adv | has.tie.mode list(predictors = {c(extra, list(tie.max = tie.max, substitute(player1), # player1 & 2 are homogeneous substitute(player2)))}, ## substitutes "result" for "outcome", but also substitutes all of code vector variables = {c(list(loss = substitute(loss), tie = substitute(tie), win = substitute(win)), list(at.home1 = substitute(at.home1), at.home2 = substitute(at.home2))[adv])}, common = c(1[has.home.adv], 2[has.tie.mode], 3[has.tie.scale], 4, 5, 5), term = function(predLabels, varLabels){ if (has.home.adv) { ability1 <- paste("(", predLabels[a], ") * ", varLabels[4], " + ", predLabels[i + 2], sep = "") ability2 <- paste("(", predLabels[a], ") * ", varLabels[5], " + ", predLabels[i + 3], sep = "") } else { ability1 <- predLabels[i + 2] ability2 <- predLabels[i + 3] } tie.scale <- ifelse(has.tie.scale, predLabels[c], 0) scale <- paste("exp(", tie.scale, ")", sep = "") if (has.tie.mode) { psi1 <- paste("exp((", predLabels[b], ") * ", varLabels[4], ")", sep = "") psi2 <- paste("exp((", predLabels[b], ") * ", varLabels[5], ")", sep = "") weight1 <- paste(psi1, "/(", psi1, " + ", psi2, ")", sep = "") weight2 <- paste(psi2, "/(", psi1, " + ", psi2, ")", sep = "") } else { weight1 <- weight2 <- "0.5" } nu <- paste(predLabels[i + 1], " - ", scale, " * (", weight1, " * log(", weight1, ") + ", weight2, " * log(", weight2, "))", sep = "") paste(varLabels[1], " * (", ability2, ") + ", varLabels[2], " * (", nu, " + ", scale, " * ", weight1, " * (", ability1, ") + ", scale, " * ", weight2, " * (", ability2, ") + ", "(1 - ", scale, ") * ", "log(exp(", ability1, ") + exp(", ability2, "))) + ", varLabels[3], " * (", ability1, ")", sep = "") }, start = function(theta) { init <- runif(length(theta)) - 0.5 init[c] <- 0.5 } ) } class(GenDavidson) <- "nonlin" BradleyTerry2/R/BTm.setup.R0000644000176200001440000000510512464712244015120 0ustar liggesusersBTm.setup <- function(outcome = 1, player1, player2, formula = NULL, id = "..", separate.ability = NULL, refcat = NULL, data = NULL, weights = NULL, subset = NULL, offset = NULL, contrasts = NULL, ...){ if (!is.data.frame(data)){ keep <- names(data) %in% c(deparse(substitute(player1)), deparse(substitute(player2))) if (!length(keep)) keep <- FALSE ## save row names for checking against index variables (in Diff) nm <- lapply(data, rownames) data <- c(data[keep], unlist(unname(data[!keep]), recursive = FALSE)) if (any(dup <- duplicated(names(data)))) warning("'data' argument specifies duplicate variable names: ", paste(names(data)[dup], collapse = " ")) } ## (will take first occurence of replicated names) withIfNecessary <- function(x, data, as.data.frame = TRUE) { if (as.data.frame) expr <- substitute(data.frame(x), list(x = x)) else expr <- x if (!is.null(data)) with(data, eval(expr)) else eval(expr) } player1 <- withIfNecessary(substitute(player1), data) player2 <- withIfNecessary(substitute(player2), data) if (ncol(player1) == 1) colnames(player1) <- colnames(player2) <- id Y <- withIfNecessary(substitute(outcome), c(player1, player2, data), as.data.frame = FALSE) weights <- withIfNecessary(substitute(weights), data, FALSE) subset1 <- withIfNecessary(substitute(subset), c(player1 = list(player1), player2 = list(player2), player1, data), FALSE) subset2 <- withIfNecessary(substitute(subset), c(player1 = list(player1), player2 = list(player2), player2, data), FALSE) if (is.logical(subset1)) subset <- subset1 | subset2 else subset <- c(subset1, subset2) if (is.null(formula)) formula <- reformulate(id) diffModel <- Diff(player1, player2, formula, id, data, separate.ability, refcat, contrasts, nm) offset <- withIfNecessary(substitute(offset), data, FALSE) #contest level if (!is.null(offset)) { if (is.null(diffModel$offset)) diffModel$offset <- offset else diffModel$offset <- diffModel$offset + offset } res <- c(diffModel, list(data = data, player1 = player1, player2 = player2, Y = Y, weights = weights, subset = subset, formula = formula)) } BradleyTerry2/R/print.summary.glmmPQL.R0000644000176200001440000000405112153401037017424 0ustar liggesusersprint.summary.BTglmmPQL <- function(x, digits = max(3, getOption("digits") - 3), symbolic.cor = x$symbolic.cor, signif.stars = getOption("show.signif.stars"), ...) { cat("\nCall:\n", deparse(x$call), sep = "", fill = TRUE) p <- length(x$aliased) tidy.zeros <- function(vec) ifelse(abs(vec) < 100 * .Machine$double.eps, 0, vec) if (p == 0) { cat("\nNo Fixed Effects\n") } else { if (nsingular <- p - x$rank) { cat("\nFixed Effects: (", nsingular, " not defined because of singularities)\n", sep = "") cn <- names(x$aliased) pars <- matrix(NA, p, 4, dimnames = list(cn, colnames(x$fixef))) pars[!x$aliased, ] <- tidy.zeros(x$fixef) } else { cat("\nFixed Effects:\n") pars <- tidy.zeros(x$fixef) } printCoefmat(pars, digits = digits, signif.stars = signif.stars, na.print = "NA", ...) } cat("\n(Dispersion parameter for ", x$family$family, " family taken to be 1)\n", sep = "") cat("\nRandom Effects:\n") pars <- tidy.zeros(x$ranef) printCoefmat(pars, digits = digits, signif.stars = signif.stars, na.print = "NA", ...) if (nzchar(mess <- naprint(x$na.action))) cat("\n", mess, "\n", sep = "") cat("\nNumber of iterations: ", x$iter, "\n", sep = "") correl <- x$correlation if (!is.null(correl)) { if (x$rank > 1) { cat("\nCorrelation of Coefficients:\n") if (is.logical(symbolic.cor) && symbolic.cor) { print(symnum(correl, abbr.colnames = NULL)) } else { correl <- format(round(correl, 2), nsmall = 2, digits = digits) correl[!lower.tri(correl)] <- "" print(correl[-1, -x$rank, drop = FALSE], quote = FALSE) } } } cat("\n") invisible(x) } BradleyTerry2/R/drop1.BTm.R0000644000176200001440000000702512214302406014774 0ustar liggesusersdrop1.BTm <- function(object, scope, scale = 0, test = c("none", "Chisq", "F"), ...) { x <- model.matrix(object) ## Pass on if no random effects if (is.null(object$random)){ object$x <- x attr(object$x, "assign") <- object$assign object$terms <- terms(object$formula) return(NextMethod()) } form <- formula(object) if (missing(scope)) scope <- drop.scope(nobars(form)) else { if (!is.character(scope)) { srandom <- findbars(scope[[2]]) if (length(srandom)) stop("Scope should not include random effects.") scope <- attr(terms(update.formula(form, scope)), "term.labels") } if (!all(match(scope, terms(form), 0L) > 0L)) stop("scope is not a subset of term labels") } asgn <- object$assign coefs <- coef(object) if (scale == 0) dispersion <- 1 else dispersion <- scale vc <- vcov(object, dispersion = dispersion) #vcov should deal with dispersion != 1 sTerms <- sapply(strsplit(scope, ":", fixed = TRUE), function(x) paste(sort(x), collapse = ":")) stat <- df <- numeric(length(scope)) names(stat) <- names(df) <- as.character(sapply(scope, as.name)) tryerror <- FALSE for (i in seq(scope)) { stt <- paste(sort(strsplit(scope[i], ":")[[1]]), collapse = ":") usex <- match(asgn, match(stt, sTerms), 0) > 0 trystat <- try(t(coefs[usex]) %*% chol2inv(chol(vc[usex, usex])) %*% coefs[usex], silent = TRUE) if (inherits(trystat, "try-error")) { stat[i] <- df[i] <- NA tryerror <- TRUE } else { stat[i] <- trystat df[i] <- sum(usex) } } table <- data.frame(stat, df) dimnames(table) <- list(names(df), c("Statistic", "Df")) title <- "Single term deletions\n" topnote <- gsub("\\s+", " ", paste("Model: ", paste(deparse(as.vector(formula(object))), collapse = ""), if (scale > 0) paste("\nscale: ", format(scale), "\n"), if (tryerror) "\n\nTest statistic unestimable for at least one term"), perl = TRUE) test <- match.arg(test) if (test == "Chisq") { dfs <- table[, "Df"] vals <- table[, "Statistic"] vals[dfs %in% 0] <- NA table <- cbind(table, `P(>|Chi|)` = pchisq(vals, abs(dfs), lower.tail = FALSE)) } else if (test == "F") { ## Assume dispersion fixed at one - if dispersion estimated, would use ## "residual" df from larger model in each comparison df.dispersion <- Inf if (df.dispersion == Inf) { fam <- object[[1]]$family$family if (fam == "binomial" || fam == "poisson") warning(gettextf("using F test with a '%s' family is inappropriate", fam), domain = NA, call. = FALSE) else warning("using F test with a fixed dispersion is inappropriate") } dfs <- table[, "Df"] Fvalue <- table[, "Statistic"]/abs(dfs) Fvalue[dfs %in% 0] <- NA table <- cbind(table, F = Fvalue, `Pr(>F)` = pf(Fvalue, abs(dfs), df.dispersion, lower.tail = FALSE)) } structure(table, heading = c(title, topnote), class = c("anova", "data.frame")) } BradleyTerry2/R/countsToBinomial.R0000644000176200001440000000142011723723170016561 0ustar liggesuserscountsToBinomial <- function(xtab) { ## make square if necessary if (nrow(xtab) != ncol(xtab) || rownames(xtab) != colnames(xtab)) { dat <- as.data.frame(xtab) lev <- union(rownames(xtab), colnames(xtab)) dat[,1] <- factor(dat[,1], levels = lev) dat[,2] <- factor(dat[,2], levels = lev) xtab <- tapply(dat[,3], dat[1:2], sum) xtab[is.na(xtab)] <- 0 } ##assumes square players <- rownames(xtab) comb <- combinations(nrow(xtab), 2) won <- xtab[comb] lost <- t(xtab)[comb] res <- !(won == 0 & lost == 0) player1 <- factor(players[comb[,1]], levels = players)[res] player2 <- factor(players[comb[,2]], levels = players)[res] data.frame(player1, player2, win1 = won[res], win2 = lost[res]) } BradleyTerry2/R/BTabilities.R0000755000176200001440000001062712465156361015505 0ustar liggesusersBTabilities <- function (model) { if (!inherits(model, "BTm")) stop("model is not of class BTm") X0 <- model.matrix(model) player1 <- model$player1[, model$id] player.names <- levels(player1) factors <- attr(terms(model$formula), "factors") if (!(model$id %in% rownames(factors))) { players <- data.frame(factor(seq(player.names), labels = player.names)) names(players) <- model$id ## assume player covariates indexed by id fixed <- nobars(model$formula) factors <- attr(terms(fixed), "factors") vars <- rownames(factors) by.id <- grep(paste("[", model$id, "]", sep = ""), vars, fixed = TRUE) drop <- setdiff(seq(length(vars)), by.id) ## following will only work for linear terms ## (drop any term involving non-player covariate) keep <- colSums(factors[drop, , drop = FALSE]) == 0 formula <- reformulate(names(keep)[keep]) mf <- model.frame(terms(formula), data = c(players, model$data), na.action = na.pass) players <- players[, model$id] offset <- model.offset(mf) if (is.null(offset)) offset <- 0 predvars <- setdiff(seq(ncol(mf)), attr(attr(mf, "terms"), "offset")) predvars <- terms(~ . ,data = mf[, predvars, drop = FALSE]) X <- model.matrix(predvars, mf) Xmiss <- is.na(rowSums(X)) | players %in% model$separate.ability X[Xmiss, ] <- 0 X <- X[, -1, drop = FALSE] separate.ability <- unique(union(players[Xmiss], model$separate.ability)) ns <- length(separate.ability) if (ns) { S <- matrix(0, nrow = nrow(X), ncol = ns) S[cbind(which(players %in% separate.ability), seq(ns))] <- 1 X <- cbind(S, X) } ## remove inestimable coef est <- !is.na(model$coef) X <- X[, est, drop = FALSE] ## keep coef of player covariates kept <- model$assign[est] %in% c(0, which(keep)) sqrt.vcov <- chol(vcov(model)[kept, kept]) V <- crossprod(sqrt.vcov %*% t(X)) se <- sqrt(diag(V)) abilities <- cbind(X %*% coef(model)[est][kept] + offset, se) attr(abilities, "vcov") <- V if (length(separate.ability)) { attr(abilities, "separate") <- separate.ability } } else { ## get ability coef and corresponding vcov asgn <- model$assign if (is.null(asgn)) abilities <- TRUE else { idterm <- attr(terms(model$formula), "term.labels") == model$id if (!any(idterm)) stop("abilities not uniquely defined for this parameterization") coefs.to.include <- asgn == which(idterm) vcov.to.include <- asgn[!is.na(coef(model))] == which(idterm) } coef <- na.exclude(coef(model)[coefs.to.include]) vc <- vcov(model)[names(coef), names(coef), drop = FALSE] ## setup factor reflecting contrasts used .. fac <- factor(player.names, paste0(model$id, player.names)) if (!is.null(model$refcat)) { fac <- C(relevel(fac, model$refcat), "contr.treatment") } else fac <- C(fac, model$contrasts[[model$id]]) contr <- contrasts(fac) ## calc abilities and s.e., fill in NA as necessary if (!is.null(attr(coef, "na.action"))) { contr <- contr[, -attr(coef, "na.action"), drop = FALSE] } est <- contr %*% coef se <- sqrt(diag(contr %*% vc %*% t(contr))) if (!is.null(attr(coef, "na.action"))){ id <- match(names(attr(coef, "na.action")), rownames(contr)) est[id] <- se[id] <- NA } abilities <- cbind(est, se) attr(abilities, "vcov") <- vc } colnames(abilities) <- c("ability", "s.e.") rownames(abilities) <- player.names attr(abilities, "modelcall") <- model$call attr(abilities, "factorname") <- model$id class(abilities) <- c("BTabilities", "matrix") abilities } print.BTabilities <- function(x, ...) { attr(x, "vcov") <- attr(x, "modelcall") <- attr(x, "factorname") <- NULL class(x) <- "matrix" print(x) ## ie, print without showing the messy attributes } vcov.BTabilities <- function(object, ...) { attr(object, "vcov") } coef.BTabilities <- function(object, ...) { object[, "ability"] } BradleyTerry2/R/predict.BTglmmPQL.R0000644000176200001440000001261612153400721016461 0ustar liggesuserspredict.BTglmmPQL <- function (object, newdata = NULL, newrandom = NULL, level = 1, type = c("link", "response", "terms"), se.fit = FALSE, terms = NULL, na.action = na.pass, ...) { ## only pass on if a glm if (object$sigma == 0) { if (level != 0) warning("Fixed effects model: setting level to 0") return(NextMethod()) } if (!all(level %in% c(0, 1))) stop("Only level %in% c(0, 1) allowed") type <- match.arg(type) if (!is.null(newdata) || type == "terms") tt <- terms(object) if (!is.null(newdata)) { ## newdata should give variables in terms formula Terms <- delete.response(tt) m <- model.frame(Terms, newdata, na.action = na.action, xlev = object$xlevels) na.action <- attr(m, "na.action") if (!is.null(cl <- attr(Terms, "dataClasses"))) .checkMFClasses(cl, m) D <- model.matrix(Terms, m, contrasts.arg = object$contrasts) np <- nrow(D) # n predictions offset <- rep(0, np) if (!is.null(off.num <- attr(tt, "offset"))) for (i in off.num) offset <- offset + eval(attr(tt, "variables")[[i + 1]], newdata) if (!is.null(object$call$offset)) offset <- offset + eval(object$call$offset, newdata) } else { D <- model.matrix(object) newrandom <- object$random na.action <- object$na.action offset <- object$offset } if (se.fit == TRUE) { sigma <- object$sigma w <- sqrt(object$weights) if (!is.null(newdata)) { wX <- w * model.matrix(object) wZ <- w * object$random } else { wX <- w * D wZ <- w * newrandom } XWX <- crossprod(wX) XWZ <- crossprod(wX, wZ) ZWZ <- crossprod(wZ, wZ) diag(ZWZ) <- diag(ZWZ) + 1/sigma^2 C <- cbind(XWX, XWZ) C <- chol(rbind(C, cbind(t(XWZ), ZWZ))) if (type == "terms" || level == 0){ ## work out (chol of inverse of) topleft of C-inv directly A <- backsolve(chol(ZWZ), t(XWZ), transpose = TRUE) A <- chol(XWX - t(A) %*% A) } } if (type == "terms") { # ignore level if (1 %in% level) warning("type = \"terms\": setting level to 0", call. = FALSE) coef <- coef(object) #fixef aa <- attr(D, "assign") ll <- attr(tt, "term.labels") if (!is.null(terms)) { include <- ll %in% terms ll <- ll[include] } hasintercept <- attr(tt, "intercept") > 0L if (hasintercept) { avx <- colMeans(model.matrix(object)) termsconst <- sum(avx * coef) #NA coefs? D <- sweep(D, 2, avx) } pred0 <- matrix(ncol = length(ll), nrow = NROW(D)) colnames(pred0) <- ll if (se.fit) { A <- chol2inv(A) se.pred0 <- pred0 } for (i in seq(length.out = length(ll))){ ind <- aa == which(attr(tt, "term.labels") == ll[i]) pred0[, i] <- D[, ind, drop = FALSE] %*% coef[ind] if (se.fit) { se.pred0[, i] <- sqrt(diag(D[, ind] %*% tcrossprod(A[ind, ind], D[, ind]))) } } if (hasintercept) attr(pred0, "constant") <- termsconst if (se.fit) return(list(fit = pred0, se.fit = se.pred0)) return(pred0) } if (0 %in% level) { pred0 <- napredict(na.action, c(D %*% coef(object)) + offset) if (type == "response") pred0 <- family(object)$linkinv(pred0) if (se.fit == TRUE) { na.act <- attr(na.exclude(pred0), "na.action") H <- backsolve(A, t(na.exclude(D)), transpose = TRUE) ## se.pred0 <- sqrt(diag(D %*% chol2inv(C)[1:ncol(D), 1:ncol(D)] %*% t(D))) se.pred0 <- napredict(na.action, napredict(na.act, sqrt(colSums(H^2)))) if (type == "response") se.pred0 <- se.pred0*abs(family(object)$mu.eta(pred0)) pred0 <- list(fit = pred0, se.fit = se.pred0) } if (identical(level, 0)) return(pred0) } r <- nrow(D) ## newrandom should give new design matrix for original random effects if (!is.null(newdata)){ if(is.null(newrandom)) stop("newdata specified without newrandom") if (!is.null(na.action)) newrandom <- newrandom[-na.action, , drop = FALSE] } if (!identical(dim(newrandom), c(r, ncol(object$random)))) stop("newrandom should have ", r, " rows and ", ncol(object$random), " columns") D <- cbind(D, newrandom) coef <- c(coef(object), attr(coef(object), "random")) pred <- napredict(na.action, c(D %*% coef) + offset) if (type == "response") pred <- family(object)$linkinv(pred) if (se.fit == TRUE) { ##se.pred <- sqrt(diag(D %*% chol2inv(C) %*% t(D))) na.act <- attr(na.exclude(pred), "na.action") H <- backsolve(C, t(na.exclude(D)), transpose = TRUE) se.pred <- napredict(na.action, napredict(na.act, sqrt(colSums(H^2)))) if (type == "response") se.pred <- se.pred*abs(family(object)$mu.eta(pred)) pred <- list(fit = pred, se.fit = se.pred) } if (0 %in% level) list(population = pred0, individual = pred) else pred } BradleyTerry2/R/anova.BTm.R0000644000176200001440000001365611723723170015073 0ustar liggesusersanova.BTm <- function (object, ..., dispersion = NULL, test = NULL) { ## Only list models in ... dotargs <- list(...) named <- if (is.null(names(dotargs))) rep(FALSE, length(dotargs)) else (names(dotargs) != "") if (any(named)) warning("the following arguments to 'anova.BTm' are invalid and dropped: ", paste(deparse(dotargs[named]), collapse = ", ")) dotargs <- dotargs[!named] is.BTm <- unlist(lapply(dotargs, function(x) inherits(x, "BTm"))) dotargs <- dotargs[is.BTm] ## Compare list of models models <- c(list(object), dotargs) if (length(dotargs) > 0){ fixed <- unlist(lapply(models, function(x) is.null(x$random))) if (all(fixed)) { variables <- lapply(models, function(x) paste(deparse(formula(x)), collapse = "\n")) models <- lapply(models, function(x) { x$formula <- formula(x$terms) class(x) <- setdiff(class(x), "BTm") x}) call <- match.call() anova.table <- do.call("anova", c(models, call$dispersion, call$test)) attr(anova.table, "heading") <- c(paste("Analysis of Deviance Table\n\n", "Response: ", deparse(object$call$outcome, 500), "\n", sep = ""), paste("Model ", format(seq(models)), ": ", variables, sep = "", collapse = "\n")) return(anova.table) } else return(anova.BTmlist(c(list(object), dotargs), dispersion = dispersion, test = test)) } X <- model.matrix(object) Z <- object$random sep <- 0 %in% object$assign ## Passing on to glm when no random effects if (is.null(Z)) { object$x <- X attr(object$x, "assign") <- object$assign + sep attr(object$terms, "term.labels") <- c("[sep]"[sep], object$term.labels) anova.table <- NextMethod() attr(anova.table, "heading") <- paste("Analysis of Deviance Table", "\n\nModel: ", object$family$family, ", link: ", object$family$link, "\n\nResponse: ", deparse(object$call$outcome, 500), "\n\nTerms added sequentially (first to last)\n\n", sep = "") if (sep) { anova.table <- anova.table[-1,] rownames(anova.table)[1] <- "NULL" anova.table[1, 1:2] <- NA } return(anova.table) } varseq <- object$assign nvars <- max(0, varseq) stat <- df <- numeric(nvars) tryerror <- FALSE if (nvars > 1) { y <- object$y ## Extension to further methods method <- object$method if (!is.function(method)) method <- get(method, mode = "function") control <- object$control control$trace <- FALSE for (i in 1:(nvars - 1)) { fit <- method(X = X[, varseq <= i, drop = FALSE], y = y, Z = Z, weights = object$prior.weights, start = object$start, offset = object$offset, family = object$family, control = control, sigma = object$call$sigma, sigma.fixed = object$sigma.fixed) class(fit) <- oldClass(object) ind <- (varseq == i)[varseq <= i] trystat <- try(t(coef(fit)[ind]) %*% chol2inv(chol(suppressMessages(vcov(fit, dispersion = dispersion))[ind, ind])) %*% coef(fit)[ind], silent = TRUE) #vcov should deal with dispersion != 1 if (inherits(trystat, "try-error")) { stat[i] <- df[i] <- NA tryerror <- TRUE } else { stat[i] <- trystat df[i] <- sum(ind) } } } ind <- varseq == nvars trystat <- try(t(coef(object)[ind]) %*% chol2inv(chol(object$varFix[ind, ind])) %*% coef(object)[ind], silent = TRUE) if (inherits(trystat, "try-error")) { stat[nvars] <- df[nvars] <- NA tryerror <- TRUE } else { stat[nvars] <- trystat df[nvars] <- sum(ind) } table <- data.frame(c(NA, stat), c(NA, df)) dimnames(table) <- list(c("NULL", object$term.labels), c("Statistic", "Df")) title <- paste("Sequential Wald Tests", "\n\nModel: ", object$family$family, ", link: ", object$family$link, "\n\nResponse: ", deparse(object$call$outcome, 500), "\n\nPredictor: ", paste(formula(object), collapse = ""), "\n\nTerms added sequentially (first to last)", if (tryerror) "\n\nTest statistic unestimable for at least one term", "\n", sep = "") ## Assume dispersion fixed at one - if dispersion estimated, would use ## "residual" df from larger model in each comparison df.dispersion <- Inf if (!is.null(test)) { if (test == "F" && df.dispersion == Inf) { fam <- object$family$family if (fam == "binomial" || fam == "poisson") warning(gettextf("using F test with a %s family is inappropriate", fam), domain = NA) else warning("using F test with a fixed dispersion is inappropriate") } table <- switch(test, Chisq = { dfs <- table[, "Df"] vals <- table[, "Statistic"] vals[dfs %in% 0] <- NA cbind(table, `P(>|Chi|)` = pchisq(vals, dfs, lower.tail = FALSE)) }, F = { dfs <- table[, "Df"] Fvalue <- table[, "Statistic"]/dfs Fvalue[dfs %in% 0] <- NA cbind(table, F = Fvalue, `Pr(>F)` = pf(Fvalue, dfs, df.dispersion, lower.tail = FALSE)) }) } structure(table, heading = title, class = c("anova", "data.frame")) } BradleyTerry2/R/glmmPQL.fit.R0000644000176200001440000002055711723723170015376 0ustar liggesusersglmmPQL.fit <- function(X, y, Z, weights = rep(1, NROW(y)), start = NULL, etastart = NULL, mustart = NULL, offset = rep(0, NROW(y)), family = gaussian(), control = glmmPQL.control(...), sigma = NULL, sigma.fixed = FALSE, ...) { matchCall <- as.list(match.call(expand.dots = FALSE)) dots <- names(matchCall[["..."]]) dots <- intersect(dots, names(formals(glm))) fit0 <- do.call("glm.fit", c(list(X, y, weights, start = start, etastart = etastart, mustart = mustart, offset = offset, family = family), matchCall[dots])) w <- fit0$prior.weights # QR missing from glm.fit if ncol(X) = 0 QR <- qr(X) R <- qr.R(QR) rank <- QR$rank p <- ncol(R) nm <- colnames(R)[seq(length = rank)] if (rank < p) { X0 <- X[,colnames(R)[-seq(length = rank)]] X <- X[, nm] } empty <- !length(X) if (empty) { alpha <- numeric(0) Xa <- matrix(0, length(y), 1) } eta <- fit0$linear.predictors residuals <- fit0$residuals Y <- eta + residuals - offset #working response wy <- fit0$weights # iterative weights wY <- sqrt(wy) * Y wZ <- sqrt(wy) * Z ZWy <- crossprod(wZ, wY) ZWZ <- crossprod(wZ, wZ) if (!empty) { wX <- sqrt(wy) * X XWy <- crossprod(wX, wY) XWX <- crossprod(wX, wX) ZWX <- crossprod(wZ, wX) E <- chol(XWX) F <- backsolve(E, t(ZWX), transpose = TRUE) f <- backsolve(E, XWy, transpose = TRUE) ZSy <- ZWy - crossprod(F, f) ZSZ <- ZWZ - crossprod(F, F) } if (is.null(sigma)) sigma <- 0.1 logtheta <- log(sigma^2) conv <- FALSE for (i in 1:control$maxiter) { ## Update coefficients for (j in 1:control$IWLSiter) { IZWZD <- ZWZ * sigma^2 diag(IZWZD) <- 1 + diag(IZWZD) A <- chol(IZWZD) if (!empty) { IZSZD <- ZSZ * sigma^2 diag(IZSZD) <- 1 + diag(IZSZD) G <- chol(IZSZD) g <- backsolve(G, ZSy, transpose = TRUE) v <- backsolve(G, g) B <- backsolve(A, sigma * ZWX, transpose = TRUE) C <- chol(XWX - crossprod(B, B)) b <- backsolve(A, sigma * ZWy, transpose = TRUE) c <- backsolve(C, XWy - t(B) %*% b, transpose = TRUE) alpha <- backsolve(C, c) Xa <- X %*% alpha beta <- sigma^2 * v } else { g <- backsolve(A, ZWy, transpose = TRUE) v <- backsolve(A, g) beta <- sigma^2 * v } eta <- c(Xa + Z %*% beta + offset) ## Update working response & weights mu <- family$linkinv(eta) mu.eta.val <- family$mu.eta(eta) residuals <- (fit0$y - mu)/mu.eta.val Y <- eta + residuals - offset wy <- w * mu.eta.val^2/family$variance(mu) wY <- sqrt(wy) * Y wZ <- sqrt(wy) * Z ZWy <- crossprod(wZ, wY) ZWZ <- crossprod(wZ, wZ) if (!empty) { wX <- sqrt(wy) * X XWy <- crossprod(wX, wY) XWX <- crossprod(wX, wX) ZWX <- crossprod(wZ, wX) E <- chol(XWX) F <- backsolve(E, t(ZWX), transpose = TRUE) f <- backsolve(E, XWy, transpose = TRUE) ZSy <- ZWy - crossprod(F, f) ZSZ <- ZWZ - crossprod(F, F) score <- c(crossprod(X, wy * residuals), crossprod(Z, wy * residuals) - v) diagInfo <- c(diag(XWX), diag(ZWZ)) if (all(diagInfo < 1e-20) || all(abs(score) < control$tol * sqrt(control$tol + diagInfo))) { if (sigma.fixed) conv <- TRUE break } } else { score <- crossprod(Z, wy * residuals) - v diagInfo <- diag(ZWZ) if (all(diagInfo < 1e-20) || all(abs(score) < control$tol * sqrt(control$tol + diagInfo))) { if (sigma.fixed) conv <- TRUE break } } } if (!sigma.fixed){ ## Update sigma ## sigma^2 = exp(logtheta) ## One Fisher scoring iteration IZWZD <- ZWZ * sigma^2 diag(IZWZD) <- 1 + diag(IZWZD) A <- chol(IZWZD) if (!empty) { IZSZD <- ZSZ * sigma^2 diag(IZSZD) <- 1 + diag(IZSZD) G <- chol(IZSZD) g <- backsolve(G, ZSy, transpose = TRUE) v <- backsolve(G, g) h <- backsolve(G, ZSZ, transpose = TRUE) H <- backsolve(G, h) } else { g <- backsolve(A, ZWy, transpose = TRUE) v <- backsolve(A, g) h <- backsolve(A, ZWZ, transpose = TRUE) H <- backsolve(A, h) } ## Harville p326 score <- drop(-0.5 * sum(diag(H)) + 0.5 * crossprod(v, v)) * sigma^2 Info <- 0.5 * sum(H^2) * sigma^4 if (control$trace) { ##B & C eq 5 - still not consistently increasing cat("Iteration ", i, ". Score = ", abs(score) , "\n", sep = "") flush.console() } ## check for overall convergence if (Info < 1e-20 || abs(score) < control$tol * sqrt(control$tol + Info)){ conv <- TRUE break } ## Cannot use beta to update t(YXa) %*% Vinv %*% YXa ZWYXa <- crossprod(wZ, sqrt(wy) * (Y - Xa)) optfun <- function(logtheta) { IZWZD <- ZWZ * exp(logtheta) diag(IZWZD) <- 1 + diag(IZWZD) A <- chol(IZWZD) if (!empty) { IZSZD <- ZSZ * exp(logtheta) diag(IZSZD) <- 1 + diag(IZSZD) G <- chol(IZSZD) d <- backsolve(A, sqrt(exp(logtheta)) * ZWYXa, transpose = TRUE) sum(log(diag(G))) - 0.5 * crossprod(d, d) } else { d <- backsolve(A, sqrt(exp(logtheta)) * ZWy, transpose = TRUE) sum(log(diag(A))) - 0.5 * crossprod(d, d) } } optres <- optimize(optfun, c(-10, 10)) if (optfun(-10) < optfun(optres$minimum)) sigma <- 0 else { if (abs(optres$minimum - (logtheta + score/Info)) > 0.1) logtheta <- optres$minimum else logtheta <- logtheta + score/Info sigma <- sqrt(exp(logtheta)) } } else if (conv) break } if (!empty) varFix <- chol2inv(C) else varFix <- matrix(, 0, 0) rownames(varFix) <- colnames(varFix) <- colnames(X) fit0$coef[nm] <- alpha if (!sigma.fixed) varSigma <- sigma^2/(4 * Info) else varSigma <- NA glm <- identical(sigma, 0) if (!empty) { if (rank < p) QR <- qr(cbind(wX, sqrt(w) * X0)) else QR <- qr(wX) R <- qr.R(QR) } list(coefficients = structure(fit0$coef, random = beta), residuals = residuals, fitted.values = mu, #effect = ? R = if (!empty) R, rank = rank, qr = if (!empty) QR, family = family, linear.predictors = eta, deviance = if (glm) sum(family$dev.resids(y, mu, w)), aic = if (glm) family$aic(y, length(y), mu, w, sum(family$dev.resids(y, mu, w))) + 2 * rank, null.deviance = if (glm) { wtdmu <- family$linkinv(offset) sum(family$dev.resids(y, wtdmu, w)) }, iter = ifelse(glm, NA, i), weights = wy, prior.weights = w, df.residual = length(y) - rank, df.null = if (glm) length(y) - sum(w == 0), y = y, sigma = sigma, sigma.fixed = sigma.fixed, varFix = varFix, varSigma = varSigma, converged = conv) } BradleyTerry2/R/Diff.R0000644000176200001440000001324512464720554014156 0ustar liggesusersDiff <- function(player1, player2, formula = NULL, id = "..", data = NULL, separate.ability = NULL, refcat = NULL, contrasts = NULL, subset = NULL) { player.one <- player1[[id]] player.two <- player2[[id]] if (!is.factor(player.one) || !is.factor(player.two) || !identical(levels(player.one), levels(player.two))) stop("'player1$", id, "' and 'player2$", id, "' must be factors with the same levels") if (!identical(attr(player.one, "contrasts"), attr(player.two, "contrasts"))) stop("'player1$", id, "' and 'player2$", id, "' must have the same contrasts attribute") if(is.null(formula)) formula <- reformulate(id) players <- levels(player.one) nplayers <- nlevels(player.one) ncontests <- length(player.one) D <- matrix(nrow = ncontests, ncol = nplayers) D <- col(D) == as.numeric(player.one) D <- D - (col(D) == as.numeric(player.two)) colnames(D) <- paste(id, players, sep = "") fixed <- nobars(formula) X <- offset <- missing <- term.labels <- NULL saturated <- FALSE sep <- list() empty <- is.null(fixed) || is.empty.model(mt <- terms(fixed)) if (!empty) { factors <- attr(mt, "factors") term.labels <- as.character(colnames(factors)) vars <- rownames(factors) indexed <- grep("[[][^],]+[],]", vars) if (length(indexed)) { #set NAs to zero indices <- gsub("[^[]*[[]([^],]+)[],].*", "\\1", vars[indexed]) vars <- gsub("[[][^]]*[]]", "", vars[indexed]) ## assumes no overlap, e.g. no age[..]:judge.gender[judge] grp <- split(vars, indices) for (ind in names(grp)) { vars <- model.frame(terms(reformulate(grp[[ind]])), data = data, na.action = na.pass) lev <- levels(eval(as.name(ind), c(player1, data))) as.sep <- rowSums(is.na(vars)) | lev %in% separate.ability if (any(as.sep)) { sep[[ind]] <- as.sep vars[sep[[ind]], ] <- lapply(vars, function(x) max(levels(x)[1], 0)) colnames(vars) <- gsub(".*[$[],? ?\"?([^]\"]*).*", "\\1", grp[[ind]]) labels <- gsub("([^[$]*)[[$].*", "\\1", grp[[ind]]) for (lab in intersect(labels, grp[[ind]])) data[lab] <- vars[lab] for (lab in setdiff(labels, grp[[ind]])) data[[lab]] <- vars[, labels == lab, drop = FALSE] } } if (length(sep)) { fixed <- reformulate(c(names(sep), attr(mt, "term.labels"), rownames(attr(mt, "factors"))[attr(mt, "offset")])) mt <- terms(fixed) } } idterm <- id %in% rownames(attr(mt, "factors")) mf1 <- model.frame(mt, data = c(player1, data), na.action = na.pass) if (nrow(mf1) != ncontests) stop("Predictor variables are not of the correct length --", "they probably need indexing in 'formula'.") mf2 <- model.frame(mt, data = c(player2, data), na.action = na.pass) if (idterm){ if (!is.null(refcat)) { mf1[[id]] <- relevel(mf1[[id]], refcat) mf2[[id]] <- relevel(mf2[[id]], refcat) if (!missing(contrasts)) contrasts[[id]] <- "contr.treatment" } else { ## 'else' defined by contrasts arg/contrasts attr of id factor ## leave refcat NULL if (is.null(contrasts)) contrasts[[id]] <- attr(player.one, "contrasts") } } offset <- model.offset(mf1) if (!is.null(offset)) offset <- offset - model.offset(mf2) if (length(sep)){ #create separate effect factor recode <- function(x, keep){ lev <- levels(x) ext <- make.unique(c(lev[keep], "nosep"))[sum(keep) + 1] levels(x)[!keep] <- ext relevel(x, ref = ext) } for (ind in names(grp)) { mf1[ind] <- recode(mf1[[ind]], sep[[ind]]) mf2[ind] <- recode(mf2[[ind]], sep[[ind]]) } } X1 <- model.matrix(fixed, mf1, contrasts = contrasts) X2 <- model.matrix(fixed, mf2, contrasts = contrasts) X <- X1 - X2 ## will need to check for saturation in each set of indexed var ## - however as only allowing (1|..) just consider player id for now saturated <- qr(na.omit(X))$rank == qr(na.omit(cbind(D, X)))$rank && !idterm if (all(X[,1] == 0)) X <- X[, -1, drop = FALSE] attr(X, "assign") <- attr(X1, "assign")[-1] } random <- findbars(formula[[2]]) if (!is.null(random)) { if (!is.list(random)) random <- list(random) if (length(random) > 1 || random[[1]] != parse(text = paste("1|", id, sep = ""))[[1]]) stop("Currently '(1 | ", id, ")' is the only random effects", "structure allowed.") random <- D } else if (!empty && (!idterm & !saturated)) warning("Ability modelled by predictors but no random effects", call. = FALSE) if (length(sep)) { attr(X, "assign") <- attr(X, "assign") - 1 if (!is.null(random)) random <- D[,!sep[[id]], drop = FALSE] } list(X = X, random = random, offset = offset, term.labels = term.labels, refcat = refcat, contrasts = contrasts, saturated = saturated) } BradleyTerry2/R/BTm.R0000644000176200001440000001005512464127770013765 0ustar liggesusersBTm <- function(outcome = 1, player1, player2, formula = NULL, id = "..", separate.ability = NULL, refcat = NULL, family = binomial, data = NULL, weights = NULL, subset = NULL, na.action = NULL, start = NULL, etastart = NULL, mustart = NULL, offset = NULL, br = FALSE, model = TRUE, x = FALSE, contrasts = NULL, ...){ call <- match.call() if (is.character(family)) family <- get(family, mode = "function", envir = parent.frame()) if (is.function(family)) family <- family() if (is.null(family$family)) { print(family) stop("`family' not recognized") } if (family$family != "binomial") stop("`family' must be binomial") if (!family$link %in% c("logit", "probit", "cauchit")) stop("link for binomial family must be one of \"logit\", \"probit\"", "or \"cauchit\"") fcall <- as.list(match.call(expand.dots = FALSE)) setup <- match(c("outcome", "player1", "player2", "formula", "id", "separate.ability", "refcat", "data", "weights", "subset", "offset", "contrasts"), names(fcall), 0L) if (is.null(formula)) env <- parent.frame() else env <- environment(formula) setup <- do.call(BTm.setup, fcall[setup], envir = env) if (setup$saturated) warning("Player ability saturated - equivalent to fitting ", "separate abilities.") mf <- data.frame(X = setup$player1) #just to get length if (!is.null(setup$X)) { mf$X <- setup$X formula <- Y ~ X - 1 } else formula <- Y ~ 0 mf$Y <- setup$Y argPos <- match(c("na.action", "start", "etastart", "mustart", "control", "model", "x"), names(fcall), 0) dotArgs <- fcall$"..." if (is.null(setup$random)) { method <- get(ifelse(br, "brglm", "glm"), mode = "function") fit <- as.call(c(method, fcall[argPos], list(formula = formula, family = family, data = mf, offset = setup$offset, subset = setup$subset, weights = setup$weights), dotArgs)) fit <- eval(fit, parent.frame()) } else { method <- get("glmmPQL", mode = "function") fit <- as.call(c(method, fcall[argPos], list(formula, setup$random, family = family, data = mf, offset = setup$offset, subset = setup$subset, weights = setup$weights), dotArgs)) fit <- eval(fit, parent.frame()) if (br) { if (identical(fit$sigma, 0)){ argPos <- match(c("na.action", "model", "x"), names(fcall), 0) method <- get("brglm", mode = "function") fit <- as.call(c(method, fcall[argPos], list(formula, family = family, data = mf, offset = setup$offset, subset = setup$subset, weights = setup$weights, etastart = fit$linear.predictors))) fit <- eval(fit, parent.frame()) fit$class <- c("glmmPQL", class(fit)) } else warning("'br' argument ignored for models with random effects", call. = FALSE) } } if (length(fit$coefficients)) { if (ncol(setup$X) > 1) names(fit$coefficients) <- substring(names(fit$coefficients), 2) else names(fit$coefficients) <- colnames(setup$X) fit$assign <- attr(setup$X, "assign") } fit$call <- call fit$id <- id fit$separate.ability <- separate.ability fit$contrasts <- setup$contrasts fit$refcat <- setup$refcat fit$formula <- setup$formula fit$player1 <- setup$player1 fit$player2 <- setup$player2 fit$term.labels <- setup$term.labels fit$data <- setup$data fit$random <- setup$random class(fit) <- c("BTm", class(fit)) fit } BradleyTerry2/R/print.BTglmmPQL.R0000644000176200001440000000116512153400741016162 0ustar liggesusersprint.BTglmmPQL <- function (x, digits = max(3, getOption("digits") - 3), ...) { if (identical(x$sigma, 0)){ cat("PQL algorithm converged to fixed effects model\n") return(NextMethod()) } cat("\nCall: ", deparse(x$call), "\n", sep = "", fill = TRUE) if (length(coef(x))) { cat("Fixed effects:\n\n") print.default(format(x$coefficients, digits = digits), print.gap = 2, quote = FALSE) } else cat("No fixed effects\n\n") cat("\nRandom Effects Std. Dev.:", x$sigma, "\n") if (nzchar(mess <- naprint(x$na.action))) cat("\n", mess, "\n", sep = "") } BradleyTerry2/R/anova.BTmlist.R0000644000176200001440000000616311723723170015762 0ustar liggesusersanova.BTmlist <- function (object, ..., dispersion = NULL, test = NULL) { ## Pass on if no random effects fixed <- unlist(lapply(object, function(x) is.null(x$random))) if (!all(!fixed)) stop("Models must have the same random effects structure") responses <- as.character(lapply(object, function(x) { deparse(formula(terms(x))[[2]]) })) sameresp <- responses == responses[1] if (!all(sameresp)) { object <- object[sameresp] warning("models with response ", deparse(responses[!sameresp]), " removed because response differs from model 1") } ns <- sapply(object, function(x) length(fitted(x))) if (any(ns != ns[1])) stop("models were not all fitted to the same size of dataset") nmodels <- length(object) ncoefs <- sapply(object, function(x) length(na.omit(coef(x)))) #omit aliased labels <- lapply(object, function(x) x$term.labels) stat <- numeric(nmodels) for (i in 2:nmodels) { descending <- ncoefs[i] < ncoefs[i - 1] bigger <- i - descending smaller <- i - !descending if (!all(labels[[smaller]] %in% labels[[bigger]])) stop("models are not nested") ind <- !(labels[[bigger]] %in% labels[[smaller]]) stat[i] <- t(coef(object[[bigger]])[ind]) %*% chol2inv(chol(vcov(object[[bigger]], dispersion = dispersion)[ind, ind])) %*% coef(object[[bigger]])[ind] #vcov should deal with dispersion != 1 } stat[1] <- NA table <- data.frame(stat, c(NA, diff(ncoefs))) variables <- lapply(object, function(x) paste(deparse(formula(x)), collapse = "\n")) dimnames(table) <- list(1:nmodels, c("Statistic", "Df")) title <- paste("Sequential Wald Tests\n\n", "Response: ", responses[1], "\n", sep = "") topnote <- paste("Model ", format(1:nmodels), ": ", variables, sep = "", collapse = "\n") if (!is.null(test)) { ## Assume dispersion fixed at one - if dispersion estimated, would use ## "residual" df from larger model in each comparison df.dispersion <- Inf if (test == "F" && df.dispersion == Inf) { fam <- object[[1]]$family$family if (fam == "binomial" || fam == "poisson") warning(gettextf("using F test with a '%s' family is inappropriate", fam), domain = NA, call. = FALSE) else warning("using F test with a fixed dispersion is inappropriate") } table <- switch(test, Chisq = { dfs <- table[, "Df"] vals <- table[, "Statistic"] vals[dfs %in% 0] <- NA cbind(table, `P(>|Chi|)` = pchisq(vals, abs(dfs), lower.tail = FALSE)) }, F = { dfs <- table[, "Df"] Fvalue <- table[, "Statistic"]/abs(dfs) Fvalue[dfs %in% 0] <- NA cbind(table, F = Fvalue, `Pr(>F)` = pf(Fvalue, abs(dfs), df.dispersion, lower.tail = FALSE)) }) } structure(table, heading = c(title, topnote), class = c("anova", "data.frame")) } BradleyTerry2/R/model.frame.BTm.R0000644000176200001440000000211311723723170016142 0ustar liggesusersmodel.frame.BTm <- function (formula, ...) { dots <- list(...) nargs <- dots[match(c("outcome", "player1", "player2", "separate.ability", "refcat", "data", "weights", "subset", "offset", "contrasts"), names(dots), 0L)] mfArgs <- dots[match(c("na.action", "start", "etastart", "mustart"), names(dots), 0L)] if (length(nargs) || is.null(formula$model)) { fcall <- formula$call[-1] fcall[names(nargs)] <- nargs env <- environment(formula$terms) if (is.null(env)) env <- parent.frame() setup <- do.call(BTm.setup, fcall, envir = env) mf <- data.frame(X = setup$X[,1]) mf$X <- setup$X mf$Y <- setup$Y mf <- as.call(c(model.frame, mfArgs, list(formula = Y ~ X - 1, data = mf, offset = setup$offset, subset = setup$subset, weights = setup$weights))) eval(mf, parent.frame()) } else formula$model } BradleyTerry2/R/glmmPQL.R0000644000176200001440000000725012153400407014601 0ustar liggesusersglmmPQL <- function(fixed, random = NULL, family = binomial, data = NULL, subset = NULL, weights = NULL, offset = NULL, na.action = NULL, start = NULL, etastart = NULL, mustart = NULL, control = glmmPQL.control(...), sigma = 0.1, sigma.fixed = FALSE, model = TRUE, x = FALSE, contrasts = NULL, ...) { call <- match.call() nm <- names(call)[-1] if (is.null(random)) { keep <- is.element(nm, c("family", "data", "subset", "weights", "offset", "na.action")) for (i in nm[!keep]) call[[i]] <- NULL call$formula <- fixed environment(call$formula) <- environment(fixed) call[[1]] <- as.name("glm") return(eval.parent(call)) } modelTerms <- terms(fixed, data = data) modelCall <- as.list(match.call(expand.dots = FALSE)) argPos <- match(c("data", "subset", "na.action", "weights", "offset"), names(modelCall), 0) modelData <- as.call(c(model.frame, list(formula = modelTerms, drop.unused.levels = TRUE), modelCall[argPos])) modelData <- eval(modelData, parent.frame()) if (!is.null(modelCall$subset)) Z <- random[eval(modelCall$subset, data, parent.frame()),] else Z <- random if (!is.null(attr(modelData, "na.action"))) Z <- Z[-attr(modelData, "na.action"),] nObs <- nrow(modelData) y <- model.response(modelData, "numeric") if (is.null(y)) y <- rep(0, nObs) weights <- as.vector(model.weights(modelData)) if (!is.null(weights) && any(weights < 0)) stop("negative weights are not allowed") if (is.null(weights)) weights <- rep.int(1, nObs) offset <- as.vector(model.offset(modelData)) if (is.null(offset)) offset <- rep.int(0, nObs) if (is.character(family)) family <- get(family, mode = "function", envir = parent.frame()) if (is.function(family)) family <- family() if (is.null(family$family)) { print(family) stop("`family' not recognized") } if (family$family == "binomial") { if (is.factor(y) && NCOL(y) == 1) y <- y != levels(y)[1] else if (NCOL(y) == 2) { n <- y[, 1] + y[, 2] y <- ifelse(n == 0, 0, y[, 1]/n) weights <- weights * n } } ## Use GLM to estimate fixed effects empty <- is.empty.model(modelTerms) if (!empty) X <- model.matrix(fixed, data = modelData, contrasts) else X <- matrix(, nObs, 0) fit <- glmmPQL.fit(X = X, y = y, Z = Z, weights = weights, start = start, etastart = etastart, mustart = mustart, offset = offset, family = family, control = control, sigma = sigma, sigma.fixed = sigma.fixed, ...) if (sum(offset) && attr(modelTerms, "intercept") > 0) { fit$null.deviance <- glm.fit(x = X[, "(Intercept)", drop = FALSE], y = y, weights = weights, offset = offset, family = family, control = control, intercept = TRUE)$deviance } if (model) fit$model <- modelData fit$na.action <- attr(modelData, "na.action") if (x) fit$x <- X fit <- c(fit, list(call = call, formula = fixed, random = random, terms = modelTerms, data = data, offset = offset, control = control, method = "glmmPQL.fit", contrasts = attr(X, "contrasts"), xlevels = .getXlevels(modelTerms, modelData))) class(fit) <- c("BTglmmPQL", "glm", "lm") fit } BradleyTerry2/R/summary.BTglmmPQL.R0000644000176200001440000000276712153401010016522 0ustar liggesuserssummary.BTglmmPQL <- function(object, dispersion = NULL, correlation = FALSE, symbolic.cor = FALSE, ...) { if (identical(object$sigma, 0)){ cat("PQL algorithm converged to fixed effects model\n") return(NextMethod("summary")) } aliased <- is.na(coef(object)) coefs <- coef(object)[!aliased] cov.scaled <- cov.unscaled <- object$varFix # when dispersion != 1? dn <- c("Estimate", "Std. Error", "z value", "Pr(>|z|)") if (object$rank > 0) { sterr <- sqrt(diag(cov.scaled)) tvalue <- coefs/sterr pvalue <- 2 * pnorm(-abs(tvalue)) fixef.table <- cbind(coefs, sterr, tvalue, pvalue) dimnames(fixef.table) <- list(names(coefs), dn) } else { fixef.table <- matrix(, 0, 4) dimnames(fixef.table) <- list(NULL, dn) } sterr <- sqrt(object$varSigma) tvalue <- object$sigma/sterr pvalue <- 2 * pnorm(-abs(tvalue)) ranef.table <- cbind(object$sigma, sterr, tvalue, pvalue) dimnames(ranef.table) <- list("Std. Dev.", dn) ans <- c(object[c("call", "family", "iter", "rank", "na.action")], list(fixef = fixef.table, ranef = ranef.table, aliased = aliased, dispersion = 1, cov.unscaled = cov.unscaled)) if (correlation & object$rank > 0) { dd <- sqrt(diag(cov.unscaled)) ans$correlation <- cov.unscaled/outer(dd, dd) ans$symbolic.cor <- symbolic.cor } class(ans) <- "summary.BTglmmPQL" ans } BradleyTerry2/R/residuals.BTm.R0000644000176200001440000000161511723723170015752 0ustar liggesusersresiduals.BTm <- function(object, type = c("deviance", "pearson", "working", "response", "partial", "grouped"), by = object$id, ...) { type <- match.arg(type) if (type != "grouped") return(NextMethod()) ## for glm, lm would just be ## X <- model.matrix(formula, data = object$data) formula <- as.formula(paste("~", by, "- 1")) mt <- terms(formula) mf1 <- model.frame(mt, data = c(object$player1, object$data)) X1 <- model.matrix(mt, data = mf1) mf2 <- model.frame(mt, data = c(object$player2, object$data)) X2 <- model.matrix(mt, data = mf2) X <- X1 - X2 r <- object$residuals ## the "working" residuals w <- object$weights total.resid <- crossprod(X, r * w) total.weight <- crossprod(abs(X), w) result <- total.resid / total.weight attr(result, "weights") <- total.weight result } BradleyTerry2/vignettes/0000755000176200001440000000000012465715316014766 5ustar liggesusersBradleyTerry2/vignettes/baseball-qvplot.pdf0000644000176200001440000000766611752425473020570 0ustar liggesusers%PDF-1.4 %ρ\r 1 0 obj << /CreationDate (D:20100223094452) /ModDate (D:20100223094452) /Title (R Graphics Output) /Producer (R 2.10.1) /Creator (R) >> endobj 2 0 obj << /Type /Catalog /Pages 3 0 R >> endobj 5 0 obj << /Type /Page /Parent 3 0 R /Contents 6 0 R /Resources 4 0 R >> endobj 6 0 obj << /Length 7 0 R >> stream q Q q 59.04 73.44 414.72 371.52 re W n Q q 0.000 0.000 0.000 RG 0.75 w [] 0 d 1 J 1 j 10.00 M 101.83 73.44 m 430.97 73.44 l S 101.83 73.44 m 101.83 66.24 l S 156.69 73.44 m 156.69 66.24 l S 211.54 73.44 m 211.54 66.24 l S 266.40 73.44 m 266.40 66.24 l S 321.26 73.44 m 321.26 66.24 l S 376.11 73.44 m 376.11 66.24 l S 430.97 73.44 m 430.97 66.24 l S BT 0.000 0.000 0.000 rg /F2 1 Tf 12.00 0.00 -0.00 12.00 93.16 47.52 Tm (Bal) Tj ET BT /F2 1 Tf 12.00 0.00 -0.00 12.00 146.35 47.52 Tm (Bos) Tj ET BT /F2 1 Tf 12.00 0.00 -0.00 12.00 202.54 47.52 Tm (Cle) Tj ET BT /F2 1 Tf 12.00 0.00 -0.00 12.00 257.06 47.52 Tm (Det) Tj ET BT /F2 1 Tf 12.00 0.00 -0.00 12.00 313.60 47.52 Tm (Mil) Tj ET BT /F2 1 Tf 12.00 0.00 -0.00 12.00 367.78 47.52 Tm (NY) Tj ET BT /F2 1 Tf 12.00 0.00 -0.00 12.00 422.69 47.52 Tm [(T) 120 (or)] TJ ET 59.04 117.93 m 59.04 394.65 l S 59.04 117.93 m 51.84 117.93 l S 59.04 173.28 m 51.84 173.28 l S 59.04 228.62 m 51.84 228.62 l S 59.04 283.97 m 51.84 283.97 l S 59.04 339.31 m 51.84 339.31 l S 59.04 394.65 m 51.84 394.65 l S BT /F2 1 Tf 0.00 12.00 -12.00 0.00 41.76 106.09 Tm (-0.5) Tj ET BT /F2 1 Tf 0.00 12.00 -12.00 0.00 41.76 164.94 Tm (0.0) Tj ET BT /F2 1 Tf 0.00 12.00 -12.00 0.00 41.76 220.28 Tm (0.5) Tj ET BT /F2 1 Tf 0.00 12.00 -12.00 0.00 41.76 275.63 Tm (1.0) Tj ET BT /F2 1 Tf 0.00 12.00 -12.00 0.00 41.76 330.97 Tm (1.5) Tj ET BT /F2 1 Tf 0.00 12.00 -12.00 0.00 41.76 386.31 Tm (2.0) Tj ET Q q BT 0.000 0.000 0.000 rg /F3 1 Tf 14.00 0.00 -0.00 14.00 131.47 469.45 Tm [(Inter) -10 (v) 20 (als based on quasi standar) 20 (d err) 20 (or) 15 (s)] TJ ET BT /F2 1 Tf 12.00 0.00 -0.00 12.00 253.06 18.72 Tm (team) Tj ET BT /F2 1 Tf 0.00 12.00 -12.00 0.00 12.96 236.53 Tm (estimate) Tj ET Q q 0.000 0.000 0.000 RG 0.75 w [] 0 d 1 J 1 j 10.00 M 59.04 73.44 m 473.76 73.44 l 473.76 444.96 l 59.04 444.96 l 59.04 73.44 l S Q q 59.04 73.44 414.72 371.52 re W n 0.000 0.000 0.000 RG 0.75 w [] 0 d 1 J 1 j 10.00 M BT /F1 1 Tf 1 Tr 7.48 0 0 7.48 98.87 170.68 Tm (l) Tj 0 Tr ET BT /F1 1 Tf 1 Tr 7.48 0 0 7.48 153.72 297.29 Tm (l) Tj 0 Tr ET BT /F1 1 Tf 1 Tr 7.48 0 0 7.48 208.58 248.68 Tm (l) Tj 0 Tr ET BT /F1 1 Tf 1 Tr 7.48 0 0 7.48 263.44 333.99 Tm (l) Tj 0 Tr ET BT /F1 1 Tf 1 Tr 7.48 0 0 7.48 318.30 349.95 Tm (l) Tj 0 Tr ET BT /F1 1 Tf 1 Tr 7.48 0 0 7.48 373.15 312.51 Tm (l) Tj 0 Tr ET BT /F1 1 Tf 1 Tr 7.48 0 0 7.48 428.01 317.58 Tm (l) Tj 0 Tr ET 101.83 115.87 m 101.83 230.69 l S 156.69 251.63 m 156.69 348.14 l S 211.54 201.81 m 211.54 300.75 l S 266.40 287.34 m 266.40 385.82 l S 321.26 302.55 m 321.26 402.53 l S 376.11 266.63 m 376.11 363.58 l S 430.97 271.74 m 430.97 368.61 l S Q endstream endobj 7 0 obj 2612 endobj 3 0 obj << /Type /Pages /Kids [ 5 0 R ] /Count 1 /MediaBox [0 0 504 504] >> endobj 4 0 obj << /ProcSet [/PDF /Text] /Font << /F1 9 0 R /F2 10 0 R /F3 11 0 R >> /ExtGState << >> >> endobj 8 0 obj << /Type /Encoding /BaseEncoding /WinAnsiEncoding /Differences [ 45/minus 96/quoteleft 144/dotlessi /grave /acute /circumflex /tilde /macron /breve /dotaccent /dieresis /.notdef /ring /cedilla /.notdef /hungarumlaut /ogonek /caron /space] >> endobj 9 0 obj << /Type /Font /Subtype /Type1 /Name /F1 /BaseFont /ZapfDingbats >> endobj 10 0 obj << /Type /Font /Subtype /Type1 /Name /F2 /BaseFont /Helvetica /Encoding 8 0 R >> endobj 11 0 obj << /Type /Font /Subtype /Type1 /Name /F3 /BaseFont /Helvetica-Bold /Encoding 8 0 R >> endobj xref 0 12 0000000000 65535 f 0000000021 00000 n 0000000164 00000 n 0000002978 00000 n 0000003061 00000 n 0000000213 00000 n 0000000293 00000 n 0000002958 00000 n 0000003165 00000 n 0000003422 00000 n 0000003505 00000 n 0000003602 00000 n trailer << /Size 12 /Info 1 0 R /Root 2 0 R >> startxref 3704 %%EOF BradleyTerry2/vignettes/residuals.pdf0000644000176200001440000004163211752425473017462 0ustar liggesusers%PDF-1.4 %ρ\r 1 0 obj << /CreationDate (D:20120416000729) /ModDate (D:20120416000729) /Title (R Graphics Output) /Producer (R 2.13.0) /Creator (R) >> endobj 2 0 obj << /Type /Catalog /Pages 3 0 R >> endobj 7 0 obj << /Type /Page /Parent 3 0 R /Contents 8 0 R /Resources 4 0 R >> endobj 8 0 obj << /Length 9 0 R >> stream 1 J 1 j q Q q 59.04 73.44 414.72 371.52 re W n /sRGB CS 0.000 0.000 0.000 SCN 0.75 w [] 0 d 1 J 1 j 10.00 M BT /F1 1 Tf 1 Tr 7.48 0 0 7.48 373.76 370.86 Tm (l) Tj 0 Tr ET BT /F1 1 Tf 1 Tr 7.48 0 0 7.48 297.91 364.27 Tm (l) Tj 0 Tr ET BT /F1 1 Tf 1 Tr 7.48 0 0 7.48 217.06 132.95 Tm (l) Tj 0 Tr ET BT /F1 1 Tf 1 Tr 7.48 0 0 7.48 271.98 383.23 Tm (l) Tj 0 Tr ET BT /F1 1 Tf 1 Tr 7.48 0 0 7.48 285.59 363.98 Tm (l) Tj 0 Tr ET BT /F1 1 Tf 1 Tr 7.48 0 0 7.48 365.30 109.35 Tm (l) Tj 0 Tr ET BT /F1 1 Tf 1 Tr 7.48 0 0 7.48 166.54 150.45 Tm (l) Tj 0 Tr ET BT /F1 1 Tf 1 Tr 7.48 0 0 7.48 274.48 215.97 Tm (l) Tj 0 Tr ET BT /F1 1 Tf 1 Tr 7.48 0 0 7.48 328.67 368.87 Tm (l) Tj 0 Tr ET BT /F1 1 Tf 1 Tr 7.48 0 0 7.48 272.35 115.81 Tm (l) Tj 0 Tr ET BT /F1 1 Tf 1 Tr 7.48 0 0 7.48 455.44 365.89 Tm (l) Tj 0 Tr ET BT /F1 1 Tf 1 Tr 7.48 0 0 7.48 241.51 388.89 Tm (l) Tj 0 Tr ET BT /F1 1 Tf 1 Tr 7.48 0 0 7.48 184.46 84.60 Tm (l) Tj 0 Tr ET BT /F1 1 Tf 1 Tr 7.48 0 0 7.48 290.30 359.01 Tm (l) Tj 0 Tr ET BT /F1 1 Tf 1 Tr 7.48 0 0 7.48 376.27 93.93 Tm (l) Tj 0 Tr ET BT /F1 1 Tf 1 Tr 7.48 0 0 7.48 321.69 225.79 Tm (l) Tj 0 Tr ET BT /F1 1 Tf 1 Tr 7.48 0 0 7.48 325.88 145.31 Tm (l) Tj 0 Tr ET BT /F1 1 Tf 1 Tr 7.48 0 0 7.48 330.24 358.44 Tm (l) Tj 0 Tr ET BT /F1 1 Tf 1 Tr 7.48 0 0 7.48 231.58 186.43 Tm (l) Tj 0 Tr ET BT /F1 1 Tf 1 Tr 7.48 0 0 7.48 175.43 117.56 Tm (l) Tj 0 Tr ET BT /F1 1 Tf 1 Tr 7.48 0 0 7.48 187.64 276.05 Tm (l) Tj 0 Tr ET BT /F1 1 Tf 1 Tr 7.48 0 0 7.48 288.44 145.23 Tm (l) Tj 0 Tr ET BT /F1 1 Tf 1 Tr 7.48 0 0 7.48 300.30 272.64 Tm (l) Tj 0 Tr ET BT /F1 1 Tf 1 Tr 7.48 0 0 7.48 232.39 359.08 Tm (l) Tj 0 Tr ET BT /F1 1 Tf 1 Tr 7.48 0 0 7.48 327.14 288.49 Tm (l) Tj 0 Tr ET BT /F1 1 Tf 1 Tr 7.48 0 0 7.48 267.06 243.62 Tm (l) Tj 0 Tr ET BT /F1 1 Tf 1 Tr 7.48 0 0 7.48 237.09 272.74 Tm (l) Tj 0 Tr ET BT /F1 1 Tf 1 Tr 7.48 0 0 7.48 207.74 117.56 Tm (l) Tj 0 Tr ET BT /F1 1 Tf 1 Tr 7.48 0 0 7.48 220.56 285.87 Tm (l) Tj 0 Tr ET BT /F1 1 Tf 1 Tr 7.48 0 0 7.48 306.99 421.78 Tm (l) Tj 0 Tr ET BT /F1 1 Tf 1 Tr 7.48 0 0 7.48 140.81 135.56 Tm (l) Tj 0 Tr ET BT /F1 1 Tf 1 Tr 7.48 0 0 7.48 336.31 428.60 Tm (l) Tj 0 Tr ET BT /F1 1 Tf 1 Tr 7.48 0 0 7.48 405.04 397.04 Tm (l) Tj 0 Tr ET BT /F1 1 Tf 1 Tr 7.48 0 0 7.48 343.34 137.46 Tm (l) Tj 0 Tr ET BT /F1 1 Tf 1 Tr 7.48 0 0 7.48 321.39 130.95 Tm (l) Tj 0 Tr ET BT /F1 1 Tf 1 Tr 7.48 0 0 7.48 369.62 135.77 Tm (l) Tj 0 Tr ET BT /F1 1 Tf 1 Tr 7.48 0 0 7.48 199.22 378.73 Tm (l) Tj 0 Tr ET BT /F1 1 Tf 1 Tr 7.48 0 0 7.48 197.79 380.58 Tm (l) Tj 0 Tr ET BT /F1 1 Tf 1 Tr 7.48 0 0 7.48 391.71 373.06 Tm (l) Tj 0 Tr ET BT /F1 1 Tf 1 Tr 7.48 0 0 7.48 194.90 141.86 Tm (l) Tj 0 Tr ET BT /F1 1 Tf 1 Tr 7.48 0 0 7.48 363.42 363.47 Tm (l) Tj 0 Tr ET BT /F1 1 Tf 1 Tr 7.48 0 0 7.48 238.05 368.46 Tm (l) Tj 0 Tr ET BT /F1 1 Tf 1 Tr 7.48 0 0 7.48 302.64 365.37 Tm (l) Tj 0 Tr ET BT /F1 1 Tf 1 Tr 7.48 0 0 7.48 247.67 296.91 Tm (l) Tj 0 Tr ET BT /F1 1 Tf 1 Tr 7.48 0 0 7.48 281.16 87.02 Tm (l) Tj 0 Tr ET BT /F1 1 Tf 1 Tr 7.48 0 0 7.48 126.01 145.54 Tm (l) Tj 0 Tr ET BT /F1 1 Tf 1 Tr 7.48 0 0 7.48 272.17 150.16 Tm (l) Tj 0 Tr ET BT /F1 1 Tf 1 Tr 7.48 0 0 7.48 264.87 118.10 Tm (l) Tj 0 Tr ET BT /F1 1 Tf 1 Tr 7.48 0 0 7.48 236.66 239.79 Tm (l) Tj 0 Tr ET BT /F1 1 Tf 1 Tr 7.48 0 0 7.48 231.33 367.70 Tm (l) Tj 0 Tr ET BT /F1 1 Tf 1 Tr 7.48 0 0 7.48 162.43 139.70 Tm (l) Tj 0 Tr ET BT /F1 1 Tf 1 Tr 7.48 0 0 7.48 211.98 266.17 Tm (l) Tj 0 Tr ET BT /F1 1 Tf 1 Tr 7.48 0 0 7.48 313.64 126.71 Tm (l) Tj 0 Tr ET BT /F1 1 Tf 1 Tr 7.48 0 0 7.48 355.45 96.44 Tm (l) Tj 0 Tr ET BT /F1 1 Tf 1 Tr 7.48 0 0 7.48 232.66 147.51 Tm (l) Tj 0 Tr ET BT /F1 1 Tf 1 Tr 7.48 0 0 7.48 152.31 270.06 Tm (l) Tj 0 Tr ET BT /F1 1 Tf 1 Tr 7.48 0 0 7.48 161.55 149.19 Tm (l) Tj 0 Tr ET BT /F1 1 Tf 1 Tr 7.48 0 0 7.48 145.16 140.22 Tm (l) Tj 0 Tr ET BT /F1 1 Tf 1 Tr 7.48 0 0 7.48 254.52 141.46 Tm (l) Tj 0 Tr ET BT /F1 1 Tf 1 Tr 7.48 0 0 7.48 252.23 146.83 Tm (l) Tj 0 Tr ET BT /F1 1 Tf 1 Tr 7.48 0 0 7.48 283.14 144.31 Tm (l) Tj 0 Tr ET BT /F1 1 Tf 1 Tr 7.48 0 0 7.48 236.03 137.25 Tm (l) Tj 0 Tr ET BT /F1 1 Tf 1 Tr 7.48 0 0 7.48 309.92 254.74 Tm (l) Tj 0 Tr ET BT /F1 1 Tf 1 Tr 7.48 0 0 7.48 331.25 368.60 Tm (l) Tj 0 Tr ET BT /F1 1 Tf 1 Tr 7.48 0 0 7.48 288.93 142.56 Tm (l) Tj 0 Tr ET BT /F1 1 Tf 1 Tr 7.48 0 0 7.48 118.77 142.71 Tm (l) Tj 0 Tr ET BT /F1 1 Tf 1 Tr 7.48 0 0 7.48 260.49 356.52 Tm (l) Tj 0 Tr ET BT /F1 1 Tf 1 Tr 7.48 0 0 7.48 317.25 312.25 Tm (l) Tj 0 Tr ET BT /F1 1 Tf 1 Tr 7.48 0 0 7.48 364.78 316.81 Tm (l) Tj 0 Tr ET BT /F1 1 Tf 1 Tr 7.48 0 0 7.48 249.62 128.04 Tm (l) Tj 0 Tr ET BT /F1 1 Tf 1 Tr 7.48 0 0 7.48 282.97 230.71 Tm (l) Tj 0 Tr ET BT /F1 1 Tf 1 Tr 7.48 0 0 7.48 388.64 140.44 Tm (l) Tj 0 Tr ET BT /F1 1 Tf 1 Tr 7.48 0 0 7.48 194.71 143.39 Tm (l) Tj 0 Tr ET BT /F1 1 Tf 1 Tr 7.48 0 0 7.48 71.44 116.05 Tm (l) Tj 0 Tr ET BT /F1 1 Tf 1 Tr 7.48 0 0 7.48 324.14 130.38 Tm (l) Tj 0 Tr ET Q q /sRGB CS 0.000 0.000 0.000 SCN 0.75 w [] 0 d 1 J 1 j 10.00 M 77.70 73.44 m 467.08 73.44 l S 77.70 73.44 m 77.70 66.24 l S 142.60 73.44 m 142.60 66.24 l S 207.50 73.44 m 207.50 66.24 l S 272.39 73.44 m 272.39 66.24 l S 337.29 73.44 m 337.29 66.24 l S 402.18 73.44 m 402.18 66.24 l S 467.08 73.44 m 467.08 66.24 l S BT /sRGB cs 0.000 0.000 0.000 scn /F2 1 Tf 12.00 0.00 -0.00 12.00 70.86 47.52 Tm (-6) Tj ET BT /F2 1 Tf 12.00 0.00 -0.00 12.00 135.76 47.52 Tm (-4) Tj ET BT /F2 1 Tf 12.00 0.00 -0.00 12.00 200.66 47.52 Tm (-2) Tj ET BT /F2 1 Tf 12.00 0.00 -0.00 12.00 269.06 47.52 Tm (0) Tj ET BT /F2 1 Tf 12.00 0.00 -0.00 12.00 333.95 47.52 Tm (2) Tj ET BT /F2 1 Tf 12.00 0.00 -0.00 12.00 398.85 47.52 Tm (4) Tj ET BT /F2 1 Tf 12.00 0.00 -0.00 12.00 463.74 47.52 Tm (6) Tj ET 59.04 74.72 m 59.04 436.85 l S 59.04 74.72 m 51.84 74.72 l S 59.04 165.25 m 51.84 165.25 l S 59.04 255.79 m 51.84 255.79 l S 59.04 346.32 m 51.84 346.32 l S 59.04 436.85 m 51.84 436.85 l S BT /F2 1 Tf 0.00 12.00 -12.00 0.00 41.76 67.88 Tm (-2) Tj ET BT /F2 1 Tf 0.00 12.00 -12.00 0.00 41.76 158.41 Tm (-1) Tj ET BT /F2 1 Tf 0.00 12.00 -12.00 0.00 41.76 252.45 Tm (0) Tj ET BT /F2 1 Tf 0.00 12.00 -12.00 0.00 41.76 342.98 Tm (1) Tj ET BT /F2 1 Tf 0.00 12.00 -12.00 0.00 41.76 433.51 Tm (2) Tj ET 59.04 73.44 m 473.76 73.44 l 473.76 444.96 l 59.04 444.96 l 59.04 73.44 l S Q q BT /sRGB cs 0.000 0.000 0.000 scn /F2 1 Tf 12.00 0.00 -0.00 12.00 179.37 18.72 Tm (flatlizards$predictors$throat.PC3) Tj ET BT /F2 1 Tf 0.00 12.00 -12.00 0.00 12.96 211.52 Tm (lizModel.residuals) Tj ET Q endstream endobj 9 0 obj 6385 endobj 3 0 obj << /Type /Pages /Kids [ 7 0 R ] /Count 1 /MediaBox [0 0 504 504] >> endobj 4 0 obj << /ProcSet [/PDF /Text] /Font << /F1 11 0 R /F2 12 0 R >> /ExtGState << >> /ColorSpace << /sRGB 5 0 R >> >> endobj 5 0 obj [/ICCBased 6 0 R] endobj 6 0 obj << /N 3 /Alternate /DeviceRGB /Length 9433 /Filter /ASCIIHexDecode >> stream 00 00 0c 48 4c 69 6e 6f 02 10 00 00 6d 6e 74 72 52 47 42 20 58 59 5a 20 07 ce 00 02 00 09 00 06 00 31 00 00 61 63 73 70 4d 53 46 54 00 00 00 00 49 45 43 20 73 52 47 42 00 00 00 00 00 00 00 00 00 00 00 00 00 00 f6 d6 00 01 00 00 00 00 d3 2d 48 50 20 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 11 63 70 72 74 00 00 01 50 00 00 00 33 64 65 73 63 00 00 01 84 00 00 00 6c 77 74 70 74 00 00 01 f0 00 00 00 14 62 6b 70 74 00 00 02 04 00 00 00 14 72 58 59 5a 00 00 02 18 00 00 00 14 67 58 59 5a 00 00 02 2c 00 00 00 14 62 58 59 5a 00 00 02 40 00 00 00 14 64 6d 6e 64 00 00 02 54 00 00 00 70 64 6d 64 64 00 00 02 c4 00 00 00 88 76 75 65 64 00 00 03 4c 00 00 00 86 76 69 65 77 00 00 03 d4 00 00 00 24 6c 75 6d 69 00 00 03 f8 00 00 00 14 6d 65 61 73 00 00 04 0c 00 00 00 24 74 65 63 68 00 00 04 30 00 00 00 0c 72 54 52 43 00 00 04 3c 00 00 08 0c 67 54 52 43 00 00 04 3c 00 00 08 0c 62 54 52 43 00 00 04 3c 00 00 08 0c 74 65 78 74 00 00 00 00 43 6f 70 79 72 69 67 68 74 20 28 63 29 20 31 39 39 38 20 48 65 77 6c 65 74 74 2d 50 61 63 6b 61 72 64 20 43 6f 6d 70 61 6e 79 00 00 64 65 73 63 00 00 00 00 00 00 00 12 73 52 47 42 20 49 45 43 36 31 39 36 36 2d 32 2e 31 00 00 00 00 00 00 00 00 00 00 00 12 73 52 47 42 20 49 45 43 36 31 39 36 36 2d 32 2e 31 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 58 59 5a 20 00 00 00 00 00 00 f3 51 00 01 00 00 00 01 16 cc 58 59 5a 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 58 59 5a 20 00 00 00 00 00 00 6f a2 00 00 38 f5 00 00 03 90 58 59 5a 20 00 00 00 00 00 00 62 99 00 00 b7 85 00 00 18 da 58 59 5a 20 00 00 00 00 00 00 24 a0 00 00 0f 84 00 00 b6 cf 64 65 73 63 00 00 00 00 00 00 00 16 49 45 43 20 68 74 74 70 3a 2f 2f 77 77 77 2e 69 65 63 2e 63 68 00 00 00 00 00 00 00 00 00 00 00 16 49 45 43 20 68 74 74 70 3a 2f 2f 77 77 77 2e 69 65 63 2e 63 68 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 64 65 73 63 00 00 00 00 00 00 00 2e 49 45 43 20 36 31 39 36 36 2d 32 2e 31 20 44 65 66 61 75 6c 74 20 52 47 42 20 63 6f 6c 6f 75 72 20 73 70 61 63 65 20 2d 20 73 52 47 42 00 00 00 00 00 00 00 00 00 00 00 2e 49 45 43 20 36 31 39 36 36 2d 32 2e 31 20 44 65 66 61 75 6c 74 20 52 47 42 20 63 6f 6c 6f 75 72 20 73 70 61 63 65 20 2d 20 73 52 47 42 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 64 65 73 63 00 00 00 00 00 00 00 2c 52 65 66 65 72 65 6e 63 65 20 56 69 65 77 69 6e 67 20 43 6f 6e 64 69 74 69 6f 6e 20 69 6e 20 49 45 43 36 31 39 36 36 2d 32 2e 31 00 00 00 00 00 00 00 00 00 00 00 2c 52 65 66 65 72 65 6e 63 65 20 56 69 65 77 69 6e 67 20 43 6f 6e 64 69 74 69 6f 6e 20 69 6e 20 49 45 43 36 31 39 36 36 2d 32 2e 31 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 76 69 65 77 00 00 00 00 00 13 a4 fe 00 14 5f 2e 00 10 cf 14 00 03 ed cc 00 04 13 0b 00 03 5c 9e 00 00 00 01 58 59 5a 20 00 00 00 00 00 4c 09 56 00 50 00 00 00 57 1f e7 6d 65 61 73 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02 8f 00 00 00 02 73 69 67 20 00 00 00 00 43 52 54 20 63 75 72 76 00 00 00 00 00 00 04 00 00 00 00 05 00 0a 00 0f 00 14 00 19 00 1e 00 23 00 28 00 2d 00 32 00 37 00 3b 00 40 00 45 00 4a 00 4f 00 54 00 59 00 5e 00 63 00 68 00 6d 00 72 00 77 00 7c 00 81 00 86 00 8b 00 90 00 95 00 9a 00 9f 00 a4 00 a9 00 ae 00 b2 00 b7 00 bc 00 c1 00 c6 00 cb 00 d0 00 d5 00 db 00 e0 00 e5 00 eb 00 f0 00 f6 00 fb 01 01 01 07 01 0d 01 13 01 19 01 1f 01 25 01 2b 01 32 01 38 01 3e 01 45 01 4c 01 52 01 59 01 60 01 67 01 6e 01 75 01 7c 01 83 01 8b 01 92 01 9a 01 a1 01 a9 01 b1 01 b9 01 c1 01 c9 01 d1 01 d9 01 e1 01 e9 01 f2 01 fa 02 03 02 0c 02 14 02 1d 02 26 02 2f 02 38 02 41 02 4b 02 54 02 5d 02 67 02 71 02 7a 02 84 02 8e 02 98 02 a2 02 ac 02 b6 02 c1 02 cb 02 d5 02 e0 02 eb 02 f5 03 00 03 0b 03 16 03 21 03 2d 03 38 03 43 03 4f 03 5a 03 66 03 72 03 7e 03 8a 03 96 03 a2 03 ae 03 ba 03 c7 03 d3 03 e0 03 ec 03 f9 04 06 04 13 04 20 04 2d 04 3b 04 48 04 55 04 63 04 71 04 7e 04 8c 04 9a 04 a8 04 b6 04 c4 04 d3 04 e1 04 f0 04 fe 05 0d 05 1c 05 2b 05 3a 05 49 05 58 05 67 05 77 05 86 05 96 05 a6 05 b5 05 c5 05 d5 05 e5 05 f6 06 06 06 16 06 27 06 37 06 48 06 59 06 6a 06 7b 06 8c 06 9d 06 af 06 c0 06 d1 06 e3 06 f5 07 07 07 19 07 2b 07 3d 07 4f 07 61 07 74 07 86 07 99 07 ac 07 bf 07 d2 07 e5 07 f8 08 0b 08 1f 08 32 08 46 08 5a 08 6e 08 82 08 96 08 aa 08 be 08 d2 08 e7 08 fb 09 10 09 25 09 3a 09 4f 09 64 09 79 09 8f 09 a4 09 ba 09 cf 09 e5 09 fb 0a 11 0a 27 0a 3d 0a 54 0a 6a 0a 81 0a 98 0a ae 0a c5 0a dc 0a f3 0b 0b 0b 22 0b 39 0b 51 0b 69 0b 80 0b 98 0b b0 0b c8 0b e1 0b f9 0c 12 0c 2a 0c 43 0c 5c 0c 75 0c 8e 0c a7 0c c0 0c d9 0c f3 0d 0d 0d 26 0d 40 0d 5a 0d 74 0d 8e 0d a9 0d c3 0d de 0d f8 0e 13 0e 2e 0e 49 0e 64 0e 7f 0e 9b 0e b6 0e d2 0e ee 0f 09 0f 25 0f 41 0f 5e 0f 7a 0f 96 0f b3 0f cf 0f ec 10 09 10 26 10 43 10 61 10 7e 10 9b 10 b9 10 d7 10 f5 11 13 11 31 11 4f 11 6d 11 8c 11 aa 11 c9 11 e8 12 07 12 26 12 45 12 64 12 84 12 a3 12 c3 12 e3 13 03 13 23 13 43 13 63 13 83 13 a4 13 c5 13 e5 14 06 14 27 14 49 14 6a 14 8b 14 ad 14 ce 14 f0 15 12 15 34 15 56 15 78 15 9b 15 bd 15 e0 16 03 16 26 16 49 16 6c 16 8f 16 b2 16 d6 16 fa 17 1d 17 41 17 65 17 89 17 ae 17 d2 17 f7 18 1b 18 40 18 65 18 8a 18 af 18 d5 18 fa 19 20 19 45 19 6b 19 91 19 b7 19 dd 1a 04 1a 2a 1a 51 1a 77 1a 9e 1a c5 1a ec 1b 14 1b 3b 1b 63 1b 8a 1b b2 1b da 1c 02 1c 2a 1c 52 1c 7b 1c a3 1c cc 1c f5 1d 1e 1d 47 1d 70 1d 99 1d c3 1d ec 1e 16 1e 40 1e 6a 1e 94 1e be 1e e9 1f 13 1f 3e 1f 69 1f 94 1f bf 1f ea 20 15 20 41 20 6c 20 98 20 c4 20 f0 21 1c 21 48 21 75 21 a1 21 ce 21 fb 22 27 22 55 22 82 22 af 22 dd 23 0a 23 38 23 66 23 94 23 c2 23 f0 24 1f 24 4d 24 7c 24 ab 24 da 25 09 25 38 25 68 25 97 25 c7 25 f7 26 27 26 57 26 87 26 b7 26 e8 27 18 27 49 27 7a 27 ab 27 dc 28 0d 28 3f 28 71 28 a2 28 d4 29 06 29 38 29 6b 29 9d 29 d0 2a 02 2a 35 2a 68 2a 9b 2a cf 2b 02 2b 36 2b 69 2b 9d 2b d1 2c 05 2c 39 2c 6e 2c a2 2c d7 2d 0c 2d 41 2d 76 2d ab 2d e1 2e 16 2e 4c 2e 82 2e b7 2e ee 2f 24 2f 5a 2f 91 2f c7 2f fe 30 35 30 6c 30 a4 30 db 31 12 31 4a 31 82 31 ba 31 f2 32 2a 32 63 32 9b 32 d4 33 0d 33 46 33 7f 33 b8 33 f1 34 2b 34 65 34 9e 34 d8 35 13 35 4d 35 87 35 c2 35 fd 36 37 36 72 36 ae 36 e9 37 24 37 60 37 9c 37 d7 38 14 38 50 38 8c 38 c8 39 05 39 42 39 7f 39 bc 39 f9 3a 36 3a 74 3a b2 3a ef 3b 2d 3b 6b 3b aa 3b e8 3c 27 3c 65 3c a4 3c e3 3d 22 3d 61 3d a1 3d e0 3e 20 3e 60 3e a0 3e e0 3f 21 3f 61 3f a2 3f e2 40 23 40 64 40 a6 40 e7 41 29 41 6a 41 ac 41 ee 42 30 42 72 42 b5 42 f7 43 3a 43 7d 43 c0 44 03 44 47 44 8a 44 ce 45 12 45 55 45 9a 45 de 46 22 46 67 46 ab 46 f0 47 35 47 7b 47 c0 48 05 48 4b 48 91 48 d7 49 1d 49 63 49 a9 49 f0 4a 37 4a 7d 4a c4 4b 0c 4b 53 4b 9a 4b e2 4c 2a 4c 72 4c ba 4d 02 4d 4a 4d 93 4d dc 4e 25 4e 6e 4e b7 4f 00 4f 49 4f 93 4f dd 50 27 50 71 50 bb 51 06 51 50 51 9b 51 e6 52 31 52 7c 52 c7 53 13 53 5f 53 aa 53 f6 54 42 54 8f 54 db 55 28 55 75 55 c2 56 0f 56 5c 56 a9 56 f7 57 44 57 92 57 e0 58 2f 58 7d 58 cb 59 1a 59 69 59 b8 5a 07 5a 56 5a a6 5a f5 5b 45 5b 95 5b e5 5c 35 5c 86 5c d6 5d 27 5d 78 5d c9 5e 1a 5e 6c 5e bd 5f 0f 5f 61 5f b3 60 05 60 57 60 aa 60 fc 61 4f 61 a2 61 f5 62 49 62 9c 62 f0 63 43 63 97 63 eb 64 40 64 94 64 e9 65 3d 65 92 65 e7 66 3d 66 92 66 e8 67 3d 67 93 67 e9 68 3f 68 96 68 ec 69 43 69 9a 69 f1 6a 48 6a 9f 6a f7 6b 4f 6b a7 6b ff 6c 57 6c af 6d 08 6d 60 6d b9 6e 12 6e 6b 6e c4 6f 1e 6f 78 6f d1 70 2b 70 86 70 e0 71 3a 71 95 71 f0 72 4b 72 a6 73 01 73 5d 73 b8 74 14 74 70 74 cc 75 28 75 85 75 e1 76 3e 76 9b 76 f8 77 56 77 b3 78 11 78 6e 78 cc 79 2a 79 89 79 e7 7a 46 7a a5 7b 04 7b 63 7b c2 7c 21 7c 81 7c e1 7d 41 7d a1 7e 01 7e 62 7e c2 7f 23 7f 84 7f e5 80 47 80 a8 81 0a 81 6b 81 cd 82 30 82 92 82 f4 83 57 83 ba 84 1d 84 80 84 e3 85 47 85 ab 86 0e 86 72 86 d7 87 3b 87 9f 88 04 88 69 88 ce 89 33 89 99 89 fe 8a 64 8a ca 8b 30 8b 96 8b fc 8c 63 8c ca 8d 31 8d 98 8d ff 8e 66 8e ce 8f 36 8f 9e 90 06 90 6e 90 d6 91 3f 91 a8 92 11 92 7a 92 e3 93 4d 93 b6 94 20 94 8a 94 f4 95 5f 95 c9 96 34 96 9f 97 0a 97 75 97 e0 98 4c 98 b8 99 24 99 90 99 fc 9a 68 9a d5 9b 42 9b af 9c 1c 9c 89 9c f7 9d 64 9d d2 9e 40 9e ae 9f 1d 9f 8b 9f fa a0 69 a0 d8 a1 47 a1 b6 a2 26 a2 96 a3 06 a3 76 a3 e6 a4 56 a4 c7 a5 38 a5 a9 a6 1a a6 8b a6 fd a7 6e a7 e0 a8 52 a8 c4 a9 37 a9 a9 aa 1c aa 8f ab 02 ab 75 ab e9 ac 5c ac d0 ad 44 ad b8 ae 2d ae a1 af 16 af 8b b0 00 b0 75 b0 ea b1 60 b1 d6 b2 4b b2 c2 b3 38 b3 ae b4 25 b4 9c b5 13 b5 8a b6 01 b6 79 b6 f0 b7 68 b7 e0 b8 59 b8 d1 b9 4a b9 c2 ba 3b ba b5 bb 2e bb a7 bc 21 bc 9b bd 15 bd 8f be 0a be 84 be ff bf 7a bf f5 c0 70 c0 ec c1 67 c1 e3 c2 5f c2 db c3 58 c3 d4 c4 51 c4 ce c5 4b c5 c8 c6 46 c6 c3 c7 41 c7 bf c8 3d c8 bc c9 3a c9 b9 ca 38 ca b7 cb 36 cb b6 cc 35 cc b5 cd 35 cd b5 ce 36 ce b6 cf 37 cf b8 d0 39 d0 ba d1 3c d1 be d2 3f d2 c1 d3 44 d3 c6 d4 49 d4 cb d5 4e d5 d1 d6 55 d6 d8 d7 5c d7 e0 d8 64 d8 e8 d9 6c d9 f1 da 76 da fb db 80 dc 05 dc 8a dd 10 dd 96 de 1c de a2 df 29 df af e0 36 e0 bd e1 44 e1 cc e2 53 e2 db e3 63 e3 eb e4 73 e4 fc e5 84 e6 0d e6 96 e7 1f e7 a9 e8 32 e8 bc e9 46 e9 d0 ea 5b ea e5 eb 70 eb fb ec 86 ed 11 ed 9c ee 28 ee b4 ef 40 ef cc f0 58 f0 e5 f1 72 f1 ff f2 8c f3 19 f3 a7 f4 34 f4 c2 f5 50 f5 de f6 6d f6 fb f7 8a f8 19 f8 a8 f9 38 f9 c7 fa 57 fa e7 fb 77 fc 07 fc 98 fd 29 fd ba fe 4b fe dc ff 6d ff ff > endstream endobj 10 0 obj << /Type /Encoding /BaseEncoding /WinAnsiEncoding /Differences [ 45/minus 96/quoteleft 144/dotlessi /grave /acute /circumflex /tilde /macron /breve /dotaccent /dieresis /.notdef /ring /cedilla /.notdef /hungarumlaut /ogonek /caron /space] >> endobj 11 0 obj << /Type /Font /Subtype /Type1 /Name /F1 /BaseFont /ZapfDingbats >> endobj 12 0 obj << /Type /Font /Subtype /Type1 /Name /F2 /BaseFont /Helvetica /Encoding 10 0 R >> endobj xref 0 13 0000000000 65535 f 0000000021 00000 n 0000000164 00000 n 0000006751 00000 n 0000006834 00000 n 0000006958 00000 n 0000006991 00000 n 0000000213 00000 n 0000000293 00000 n 0000006731 00000 n 0000016527 00000 n 0000016785 00000 n 0000016869 00000 n trailer << /Size 13 /Info 1 0 R /Root 2 0 R >> startxref 16967 %%EOF BradleyTerry2/vignettes/BradleyTerry.Rnw0000644000176200001440000011523212464205223020060 0ustar liggesusers% \VignetteIndexEntry{Bradley-Terry models in R} % \VignetteKeyword{generalized linear model} % \VignetteKeyword{logistic regression} % \VignetteKeyword{penalized quasi-likelihood} % \VignetteKeyword{ranking} % \VignetteKeyword{tournament analysis} % \VignetteKeyword{working residuals} % \VignettePackage{BradleyTerry2} %%% For jss: %% \documentclass{jss} %% \newcommand{\pkginfo}{} %%% uncomment for vignette version \documentclass[nojss]{jss} \newcommand{\pkginfo}{\small \\[12pt]For \pkg{BradleyTerry2} version \Sexpr{packageDescription("BradleyTerry2")[["Version"]]}, \Sexpr{Sys.Date()}\\\url{http://bradleyterry2.r-forge.r-project.org/}\\[-12pt]} %% need no \usepackage{Sweave.sty} \usepackage[english]{babel} % to avoid et~al with texi2pdf \usepackage{amsmath} \usepackage{booktabs} \usepackage{thumbpdf} \setkeys{Gin}{width=0.6\textwidth} \SweaveOpts{keep.source=TRUE} %http://www.stat.auckland.ac.nz/~ihaka/downloads/Sweave-customisation.pdf \newcommand{\R}{\proglang{R}} \newcommand{\BT}{\pkg{BradleyTerry2}} \newcommand{\logit}{\mathop{\rm logit}} \newcommand{\pr}{\mathop{\rm pr}} \author{Heather Turner\\University of Warwick \And David Firth\\University of Warwick} \Plainauthor{Heather Turner, David Firth} \title{Bradley-Terry Models in \proglang{R}: The \BT\ Package \pkginfo} \Plaintitle{Bradley-Terry Models in R: The BradleyTerry2 Package} \Shorttitle{\pkg{BradleyTerry2}: Bradley-Terry Models in \proglang{R}} \Abstract{ This is a short overview of the \R\ add-on package \BT, which facilitates the specification and fitting of Bradley-Terry logit, probit or cauchit models to pair-comparison data. Included are the standard `unstructured' Bradley-Terry model, structured versions in which the parameters are related through a linear predictor to explanatory variables, and the possibility of an order or `home advantage' effect or other `contest-specific' effects. Model fitting is either by maximum likelihood, by penalized quasi-likelihood (for models which involve a random effect), or by bias-reduced maximum likelihood in which the first-order asymptotic bias of parameter estimates is eliminated. Also provided are a simple and efficient approach to handling missing covariate data, and suitably-defined residuals for diagnostic checking of the linear predictor. } \Keywords{generalized linear model, logistic regression, penalized quasi-likelihood, ranking, tournament analysis, working residuals} \Address{ David Firth\\ Department of Statistics\\ University of Warwick\\ Coventry\\ CV4 7AL, United Kingdom\\ E-mail: \email{d.firth@warwick.ac.uk}\\ URL: \url{http://go.warwick.ac.uk/dfirth} } \begin{document} @ <>= options(prompt = "R> ", continue = "+ ", width = 70, useFancyQuotes = FALSE, digits = 7) @ %def \section{Introduction} The Bradley-Terry model \citep{brad:terr:52} assumes that in a `contest' between any two `players', say player $i$ and player $j$ $(i, j \in \{1,\ldots,K\})$, the odds that $i$ beats $j$ are $\alpha_i/\alpha_j$, where $\alpha_i$ and $\alpha_j$ are positive-valued parameters which might be thought of as representing `ability'. A general introduction can be found in \citet{brad:84} or \citet{agre:02}. Applications are many, ranging from experimental psychology to the analysis of sports tournaments to genetics (for example, the allelic transmission/disequilibrium test of \citealp{sham:curt:95} is based on a Bradley-Terry model in which the `players' are alleles). In typical psychometric applications the `contests' are comparisons, made by different human subjects, between pairs of items. The model can alternatively be expressed in the logit-linear form \begin{equation} \logit[\pr(i\ \mathrm{beats}\ j)]=\lambda_i-\lambda_j, \label{eq:unstructured} \end{equation} where $\lambda_i=\log\alpha_i$ for all $i$. Thus, assuming independence of all contests, the parameters $\{\lambda_i\}$ can be estimated by maximum likelihood using standard software for generalized linear models, with a suitably specified model matrix. The primary purpose of the \BT\ package \citep{turn:12}, implemented in the \R\ statistical computing environment \citep{ihak:gent:96, R}, is to facilitate the specification and fitting of such models and some extensions. The \BT\ package supersedes the earlier \pkg{BradleyTerry} package \citep{firt:05}, providing a more flexible user interface to allow a wider range of models to be fitted. In particular, \BT\ allows the inclusion of simple random effects so that the ability parameters can be related to available explanatory variables through a linear predictor of the form \begin{equation} \lambda_i=\sum_{r=1}^p\beta_rx_{ir} + U_i. \end{equation} The inclusion of the prediction error $U_i$ allows for variability between players with equal covariate values and induces correlation between comparisons with a common player. \BT\ also allows for general contest-specific effects to be included in the model and allows the logit link to be replaced, if required, by a different symmetric link function (probit or cauchit). The remainder of the paper is organised as follows. Section~\ref{sec:BTmodel} demonstrates how to use the \pkg{BradleyTerry2} package to fit a standard (i.e., unstructured) Bradley-Terry model, with a separate ability parameter estimated for each player, including the use of bias-reduced estimation for such models. Section~\ref{sec:covariates} considers variations of the standard model, including the use of player-specific variables to model ability and allowing for contest-specific effects such as an order effect or judge effects. Sections~\ref{sec:ability} and \ref{sec:residuals} explain how to obtain important information about a fitted model, in particular the estimates of ability and their standard errors, and player-level residuals, whilst Section~\ref{sec:model} notes the functions available to aid model search. Section~\ref{sec:data} explains in more detail how set up data for use with the \BT\ package, Section~\ref{sec:functions} lists the functions provided by the package and finally Section~\ref{sec:finalremarks} comments on two directions for further development of the software. \section{Standard Bradley-Terry model} \label{sec:BTmodel} \subsection{Example: Analysis of journal citations} \label{citations} The following data come from page 448 of \citet{agre:02}, extracted from the larger table of \citet{stig:94}. The data are counts of citations among four prominent journals of statistics and are included the \BT\ package as the data set \code{citations}: @ <>= library("BradleyTerry2") @ @ <>= data("citations", package = "BradleyTerry2") @ @ <>= citations @ %def Thus, for example, \emph{Biometrika} was cited 498 times by papers in \emph{Journal of the American Statistical Association} (JASA) during the period under study. In order to fit a Bradley-Terry model to these data using \code{BTm} from the \BT\ package, the data must first be converted to binomial frequencies. That is, the data need to be organised into pairs (\code{player1}, \code{player2}) and corresponding frequencies of wins and losses for \code{player1} against \code{player2}. The \BT\ package provides the utility function \code{countsToBinomial} to convert a contingency table of wins to the format just described: @ <>= citations.sf <- countsToBinomial(citations) names(citations.sf)[1:2] <- c("journal1", "journal2") citations.sf @ %def Note that the self-citation counts are ignored -- these provide no information on the ability parameters, since the abilities are relative rather than absolute quantities. The binomial response can then be modelled by the difference in player abilities as follows: @ <>= citeModel <- BTm(cbind(win1, win2), journal1, journal2, ~ journal, id = "journal", data = citations.sf) citeModel @ %def The coefficients here are maximum likelihood estimates of $\lambda_2, \lambda_3, \lambda_4$, with $\lambda_1$ (the log-ability for \emph{Biometrika}) set to zero as an identifying convention. The one-sided model formula \begin{verbatim} ~ journal \end{verbatim} specifies the model for player ability, in this case the `citeability' of the journal. The \code{id} argument specifies that \code{"journal"} is the name to be used for the factor that identifies the player -- the values of which are given here by \code{journal1} and \code{journal2} for the first and second players respectively. Therefore in this case a separate citeability parameter is estimated for each journal. If a different `reference' journal is required, this can be achieved using the optional \code{refcat} argument: for example, making use of \code{update} to avoid re-specifying the whole model, @ <>= update(citeModel, refcat = "JASA") @ %def -- the same model in a different parameterization. The use of the standard Bradley-Terry model for this application might perhaps seem rather questionable -- for example, citations within a published paper can hardly be considered independent, and the model discards potentially important information on self-citation. \citet{stig:94} provides arguments to defend the model's use despite such concerns. \subsection{Bias-reduced estimates} %\label{sec:bias} Estimation of the standard Bradley-Terry model in \code{BTm} is by default computed by maximum likelihood, using an internal call to the \code{glm} function. An alternative is to fit by bias-reduced maximum likelihood \citep{firt:93}: this requires additionally the \pkg{brglm} package \citep{kosm:07}, and is specified by the optional argument \code{br = TRUE}. The resultant effect, namely removal of first-order asymptotic bias in the estimated coefficients, is often quite small. One notable feature of bias-reduced fits is that all estimated coefficients and standard errors are necessarily finite, even in situations of `complete separation' where maximum likelihood estimates take infinite values \citep{hein:sche:02}. For the citation data, the parameter estimates are only very slightly changed in the bias-reduced fit: @ <>= update(citeModel, br = TRUE) @ %def Here the bias of maximum likelihood is small because the binomial counts are fairly large. In more sparse arrangements of contests -- that is, where there is less or no replication of the contests -- the effect of bias reduction would typically be more substantial than the insignificant one seen here. \section{Abilities predicted by explanatory variables} \label{sec:covariates} \subsection{`Player-specific' predictor variables} In some application contexts there may be `player-specific' explanatory variables available, and it is then natural to consider model simplification of the form \begin{equation} \lambda_i=\sum_{r=1}^p\beta_rx_{ir} + U_i, \end{equation} in which ability of each player $i$ is related to explanatory variables $x_{i1},\ldots,x_{ip}$ through a linear predictor with coefficients $\beta_1,\ldots,\beta_p$; the $\{U_i\}$ are independent errors. Dependence of the player abilities on explanatory variables can be specified via the \code{formula} argument, using the standard \emph{S}-language model formulae. The difference in the abilities of player $i$ and player $j$ is modelled by \begin{equation} \sum_{r=1}^p\beta_rx_{ir} - \sum_{r=1}^p\beta_rx_{jr} + U_i - U_j, \label{eq:structured} \end{equation} where $U_i \sim N(0, \sigma^2)$ for all $i$. The Bradley-Terry model is then a generalized linear mixed model, which the \code{BTm} function currently fits by using the penalized quasi-likelihood algorithm of \citet{bres:93}. As an illustration, consider the following simple model for the \code{flatlizards} data, which predicts the fighting ability of Augrabies flat lizards by body size (snout to vent length): @ <>= options(show.signif.stars = FALSE) data("flatlizards", package = "BradleyTerry2") lizModel <- BTm(1, winner, loser, ~ SVL[..] + (1|..), data = flatlizards) @ %def Here the winner of each fight is compared to the loser, so the outcome is always 1. The special name `\code{..}' appears in the formula as the default identifier for players, in the absence of a user-specified \code{id} argument. The values of this factor are given by \code{winner} for the winning lizard and \code{loser} for the losing lizard in each contest. %Since \code{winner} %and \code{loser} are specific instances of the factor \code{..}, they must %share the same set of levels (one for each lizard). %The factors \code{winner}and \code{loser} These factors are provided in the data frame \code{contests} that is the first element of the list object \code{flatlizards}. The second element of \code{flatlizards} is another data frame, \code{predictors}, containing measurements on the observed lizards, including \code{SVL}, which is the snout to vent length. Thus \code{SVL[..]} represents the snout to vent length indexed by lizard (\code{winner} or \code{loser} as appropriate). Finally a random intercept for each lizard is included using the bar notation familiar to users of the \pkg{lme4} package \citep{bate:11}. (Note that a random intercept is the only random effect structure currently implemented in \pkg{BradleyTerry2}.) The fitted model is summarized below: @ <>= summary(lizModel) @ %def The coefficient of snout to vent length is weakly significant; however, the standard deviation of the random effect is quite large, suggesting that this simple model has fairly poor explanatory power. A more appropriate model is considered in the next section. \subsection{Missing values} The contest data may include all possible pairs of players and hence rows of missing data corresponding to players paired with themselves. Such rows contribute no information to the Bradley-Terry model and are simply discarded by \code{BTm}. Where there are missing values in player-specific \emph{predictor} (or \emph{explanatory}) variables which appear in the formula, it will typically be very wasteful to discard all contests involving players for which some values are missing. Instead, such cases are accommodated by the inclusion of one or more parameters in the model. If, for example, player $1$ has one or more of its predictor values $x_{11},\ldots,x_{1p}$ missing, then the combination of Equations~\ref{eq:unstructured} and \ref{eq:structured} above yields \begin{equation} \logit[\pr(1\ \mathrm{beats}\ j)]=\lambda_1 - \left(\sum_{r=1}^p\beta_rx_{jr} + U_j\right), \end{equation} for all other players $j$. This results in the inclusion of a `direct' ability parameter for each player having missing predictor values, in addition to the common coefficients $\beta_1,\ldots,\beta_p$ -- an approach which will be appropriate when the missingness mechanism is unrelated to contest success. The same device can be used also to accommodate any user-specified departures from a structured Bradley-Terry model, whereby some players have their abilities determined by the linear predictor but others do not. In the original analysis of the \code{flatlizards} data \citep{whit:06}, the final model included the first and third principal components of the spectral reflectance from the throat (representing brightness and UV intensity respectively) as well as head length and the snout to vent length seen in our earlier model. The spectroscopy data was missing for two lizards, therefore the ability of these lizards was estimated directly. The following fits this model, with the addition of a random intercept as before: @ <>= lizModel2 <- BTm(1, winner, loser, ~ throat.PC1[..] + throat.PC3[..] + head.length[..] + SVL[..] + (1|..), data = flatlizards) summary(lizModel2) @ %def Note that \code{BTm} detects that lizards 96 and 99 have missing values in the specified predictors and automatically includes separate ability parameters for these lizards. This model was found to be the single best model based on the principal components of reflectance and the other predictors available and indeed the standard deviation of the random intercept is much reduced, but still highly significant. Allowing for this significant variation between lizards with the same predictor values produces more realistic (i.e., larger) standard errors for the parameters when compared to the original analysis of \citet{whit:06}. Although this affects the significance of the morphological variables, it does not affect the significance of the principal components, so in this case does not affect the main conclusions of the study. \subsection{Order effect} \label{sec:order} In certain types of application some or all contests have an associated `bias', related to the order in which items are presented to a judge or with the location in which a contest takes place, for example. A natural extension of the Bradley-Terry model (Equation~\ref{eq:unstructured}) is then \begin{equation} \logit[\pr(i\ \mathrm{beats}\ j)]=\lambda_i-\lambda_j + \delta z, \end{equation} where $z=1$ if $i$ has the supposed advantage and $z=-1$ if $j$ has it. (If the `advantage' is in fact a disadvantage, $\delta$ will be negative.) The scores $\lambda_i$ then relate to ability in the absence of any such advantage. As an example, consider the baseball data given in \citet{agre:02}, page 438: @ <>= data("baseball", package = "BradleyTerry2") head(baseball) @ %def The data set records the home wins and losses for each baseball team against each of the 6 other teams in the data set. The \code{head} function is used to show the first 6 records, which are the Milwaukee home games. We see for example that Milwaukee played 7 home games against Detroit and won 4 of them. The `standard' Bradley-Terry model without a home-advantage parameter will be fitted if no formula is specified in the call to \code{BTm}: @ <>= baseballModel1 <- BTm(cbind(home.wins, away.wins), home.team, away.team, data = baseball, id = "team") summary(baseballModel1) @ %def The reference team is Baltimore, estimated to be the weakest of these seven, with Milwaukee and Detroit the strongest. In the above, the ability of each team is modelled simply as \code{~ team} where the values of the factor \code{team} are given by \code{home.team} for the first team and \code{away.team} for the second team in each game. To estimate the home-advantage effect, an additional variable is required to indicate whether the team is at home or not. Therefore data frames containing both the team factor and this new indicator variable are required in place of the factors \code{home.team} and \code{away.team} in the call to \code{BTm}. This is achieved here by over-writing the \code{home.team} and \code{away.team} factors in the \code{baseball} data frame: @ <>= baseball$home.team <- data.frame(team = baseball$home.team, at.home = 1) baseball$away.team <- data.frame(team = baseball$away.team, at.home = 0) @ %def The \code{at.home} variable is needed for both the home team and the away team, so that it can be differenced as appropriate in the linear predictor. With the data organised in this way, the ability formula can now be updated to include the \code{at.home} variable as follows: @ <>= baseballModel2 <- update(baseballModel1, formula = ~ team + at.home) summary(baseballModel2) @ %def \vspace*{-0.3cm} This reproduces the results given on page 438 of \citet{agre:02}: the home team has an estimated odds-multiplier of $\exp(0.3023) = 1.35$ in its favour. \vspace*{-0.2cm} \subsection{More general (contest-specific) predictors} \label{sec:CEMS} The `home advantage' effect is a simple example of a contest-specific predictor. Such predictors are necessarily interactions, between aspects of the contest and (aspects of) the two `players' involved. For more elaborate examples of such effects, see \code{?chameleons} and \code{?CEMS}. The former includes an `experience' effect, which changes through time, on the fighting ability of male chameleons. The latter illustrates a common situation in psychometric applications of the Bradley-Terry model, where \emph{subjects} express preference for one of two \emph{objects} (the `players'), and it is the influence on the results of subject attributes that is of primary interest. As an illustration of the way in which such effects are specified, consider the following model specification taken from the examples in \code{?CEMS}, where data on students' preferences in relation to six European management schools is analysed. \vspace*{-0.3cm} @ <>= data("CEMS", package = "BradleyTerry2") table8.model <- BTm(outcome = cbind(win1.adj, win2.adj), player1 = school1, player2 = school2, formula = ~ .. + WOR[student] * LAT[..] + DEG[student] * St.Gallen[..] + STUD[student] * Paris[..] + STUD[student] * St.Gallen[..] + ENG[student] * St.Gallen[..] + FRA[student] * London[..] + FRA[student] * Paris[..] + SPA[student] * Barcelona[..] + ITA[student] * London[..] + ITA[student] * Milano[..] + SEX[student] * Milano[..], refcat = "Stockholm", data = CEMS) @ %def This model reproduces results from Table~8 of \cite{ditt:01} apart from minor differences due to the different treatment of ties. Here the outcome is the binomial frequency of preference for \code{school1} over \code{school2}, with ties counted as half a `win' and half a `loss'. The formula specifies the model for school `ability' or worth. In this formula, the default label `\code{..}' represents the school (with values given by \code{school1} or \code{school2} as appropriate) and \code{student} is a factor specifying the student that made the comparison. The remaining variables in the formula use \proglang{R}'s standard indexing mechanism to include student-specific variables, e.g., \code{WOR}: whether or not the student was in full-time employment, and school-specific variables, e.g., \code{LAT}: whether the school was in a `Latin' city. Thus there are three types of variables: contest-specific (\code{school1}, \code{school2}, \code{student}), subject-specific (\code{WOR}, \code{DEG}, \ldots) and object-specific (\code{LAT}, \code{St.Gallen}, \ldots). These three types of variables are provided in three data frames, contained in the list object \code{CEMS}. \section{Ability scores} \label{sec:ability} The function \code{BTabilities} extracts estimates and standard errors for the log-ability scores $\lambda_1, \ldots,\lambda_K$. These will either be `direct' estimates, in the case of the standard Bradley-Terry model or for players with one or more missing predictor values, or `model-based' estimates of the form $\hat\lambda_i=\sum_{r=1}^p\hat\beta_rx_{ir}$ for players whose ability is predicted by explanatory variables. As a simple illustration, team ability estimates in the home-advantage model for the \code{baseball} data are obtained by: @ <>= BTabilities(baseballModel2) @ %def This gives, for each team, the estimated ability when the team enjoys no home advantage. Similarly, estimates of the fighting ability of each lizard in the \code{flatlizards} data under the model based on the principal components of the spectral reflectance from the throat are obtained as follows: @ <>= head(BTabilities(lizModel2), 4) @ %def % The ability estimates in an unstructured Bradley-Terry model are particularly well suited to presentation using the device of \emph{quasi-variances} \citep{firt:04}. The \pkg{qvcalc} package \citep[][version 0.8-5 or later]{firt:10} contains a function of the same name which does the necessary work: \begin{Sinput} > library("qvcalc") > baseball.qv <- qvcalc(BTabilities(baseballModel2)) > plot(baseball.qv, + levelNames = c("Bal", "Bos", "Cle", "Det", "Mil", "NY", "Tor")) \end{Sinput} % \begin{figure}[t!] \centering \includegraphics[width=0.67\textwidth]{baseball-qvplot.pdf} \caption{Estimated relative abilities of baseball teams.\label{fig:qvplot}} \end{figure} % The `comparison intervals' as shown in Figure~\ref{fig:qvplot} are based on `quasi standard errors', and can be interpreted as if they refer to \emph{independent} estimates of ability for the journals. This has the advantage that comparison between any pair of journals is readily made (i.e., not only comparisons with the `reference' journal). For details of the theory and method of calculation see \citet{firt:04}. \section{Residuals} \label{sec:residuals} There are two main types of residuals available for a Bradley-Terry model object. First, there are residuals obtained by the standard methods for models of class \code{"glm"}. These all deliver one residual for each contest or type of contest. For example, Pearson residuals for the model \code{lizModel2} can be obtained simply by \vspace*{0.2cm} @ <>= res.pearson <- round(residuals(lizModel2), 3) head(cbind(flatlizards$contests, res.pearson), 4) @ %def \vspace*{-0.2cm} More useful for diagnostics on the linear predictor $\sum\beta_rx_{ir}$ are `player'-level residuals, obtained by using the function \code{residuals} with argument \code{type = "grouped"}. These residuals can then be plotted against other player-specific variables. \vspace*{-0.2cm} @ <>= res <- residuals(lizModel2, type = "grouped") # with(flatlizards$predictors, plot(throat.PC2, res)) # with(flatlizards$predictors, plot(head.width, res)) @ %def \vspace*{-0.2cm} These residuals estimate the error in the linear predictor; they are obtained by suitable aggregation of the so-called `working' residuals from the model fit. The \code{weights} attribute indicates the relative information in these residuals -- weight is roughly inversely proportional to variance -- which may be useful for plotting and/or interpretation; for example, a large residual may be of no real concern if based on very little information. Weighted least-squares regression of these residuals on any variable already in the model is null. For example: \vspace*{-0.2cm} @ <>= lm(res ~ throat.PC1, weights = attr(res, "weights"), data = flatlizards$predictors) lm(res ~ head.length, weights = attr(res, "weights"), data = flatlizards$predictors) @ %def %$ \vspace*{-0.2cm} As an illustration of evident \emph{non-null} residual structure, consider the unrealistically simple model \code{lizModel} that was fitted in Section~\ref{sec:covariates} above. That model lacks the clearly significant predictor variable \code{throat.PC3}, and the plot shown in Figure~\ref{fig:residuals} demonstrates this fact graphically: \begin{Sinput} > lizModel.residuals <- residuals(lizModel, type = "grouped") > plot(flatlizards$predictors$throat.PC3, lizModel.residuals) \end{Sinput} % \begin{figure}[t!] \centering \includegraphics[width=0.69\textwidth]{residuals.pdf} \caption{Lizard residuals for the simple model \code{lizModel}, plotted against \code{throat.PC3}.\label{fig:residuals}} \end{figure} % The residuals in the plot exhibit a strong, positive regression slope in relation to the omitted predictor variable \code{throat.PC3}. \section{Model search} \label{sec:model} In addition to \code{update()} as illustrated in preceding sections, methods for the generic functions \code{add1()}, \code{drop1()} and \code{anova()} are provided. These can be used to investigate the effect of adding or removing a variable, whether that variable is contest-specific, such as an order effect, or player-specific; and to compare the fit of nested models. %These can be used in the standard way for model elaboration or specialization, %and their availability also allows the use of \texttt{\color{black} step()} for %automated exploration of a set of candidate player-specific predictors. \section{Setting up the data} \label{sec:data} \subsection{Contest-specific data} \label{sec:contest} The \code{outcome} argument of \code{BTm} represents a binomial response and can be supplied in any of the formats allowed by the \code{glm} function. That is, either a two-column matrix with the columns giving the number of wins and losses (for \code{player1} vs.\ \code{player2}), a factor where the first level denotes a loss and all other levels denote a win, or a binary variable where 0 denotes a loss and 1 denotes a win. Each row represents either a single contest or a set of contests between the same two players. The \code{player1} and \code{player2} arguments are either factors specifying the two players in each contest, or data frames containing such factors, along with any contest-specific variables that are also player-specific, such as the \code{at.home} variable seen in Section~\ref{sec:order}. If given in data frames, the factors identifying the players should be named as specified by the \code{id} argument and should have identical levels, since they represent a particular sample of the full set of players. Thus for the model \code{baseballModel2}, which was specified by the following call: @ <>= baseballModel2$call @ %def the data are provided in the \code{baseball} data frame, which has the following structure: @ <>= str(baseball, vec.len = 2) @ %def In this case \code{home.team} and \code{away.team} are both data frames, with the factor \code{team} specifying the team and the variable \code{at.home} specifying whether or not the team was at home. So the first comparison @ <>= baseball$home.team[1,] baseball$away.team[1,] @ %def is Milwaukee playing at home against Detroit. The outcome is given by @ <>= baseball[1, c("home.wins", "away.wins")] @ %def Contest-specific variables that are \emph{not} player-specific -- for example, whether it rained or not during a contest -- should only be used in interactions with variables that \emph{are} player-specific, otherwise the effect on ability would be the same for both players and would cancel out. Such variables can conveniently be provided in a single data frame along with the \code{outcome}, \code{player1} and \code{player2} data. An offset in the model can be specified by using the \code{offset} argument to \code{BTm}\null. This facility is provided for completeness: the authors have not yet encountered an application where it is needed. To use only certain rows of the contest data in the analysis, the \code{subset} argument may be used in the call to \code{BTm}. This should either be a logical vector of the same length as the binomial response, or a numeric vector containing the indices of rows to be used. \subsection{Non contest-specific data} \label{sec:non-contest} Some variables do not vary by contest directly, but rather vary by a factor that is contest-specific, such as the player ID or the judge making the paired comparison. For such variables, it is more economical to store the data by the levels of the contest-specific factor and use indexing to obtain the values for each contest. The \code{CEMS} example in Section~\ref{sec:CEMS} provides an illustration of such variables. In this example student-specific variables are indexed by \code{student} and school-specific variables are indexed by \code{..}, i.e., the first or second school in the comparison as appropriate. There are then two extra sets of variables in addition to the usual contest-specific data as described in the last section. A good way to provide these data to \code{BTm} is as a list of data frames, one for each set of variables, e.g., @ <>= str(CEMS, vec.len = 2) @ %def The names of the data frames are only used by \code{BTm} if they match the names specified in the \code{player1} and \code{player2} arguments, in which case it is assumed that these are data frames providing the data for the first and second player respectively. The rows of data frames in the list should either correspond to the contests or the levels of the factor used for indexing. Player-specific offsets should be included in the formula by using the \code{offset} function. \subsection{Converting data from a `wide' format} The \code{BTm} function requires data in a `long' format, with one row per contest, provided either directly as in Section~\ref{sec:contest} or via indexing as in Section~\ref{sec:non-contest}. In studies where the same set of paired comparisons are made by several judges, as in a questionnaire for example, the data may be stored in a `wide' format, with one row per judge. As an example, consider the \code{cemspc} data from the \pkg{prefmod} package \citep{hatz:12}, which provides data from the CEMS study in a wide format. Each row corresponds to one student; the first 15 columns give the outcome of all pairwise comparisons between the 6~schools in the study and the last two columns correspond to two of the student-specific variables: \code{ENG} (indicating the student's knowledge of English) and \code{SEX} (indicating the student's gender). The following steps convert these data into a form suitable for analysis with \code{BTm}. First a new data frame is created from the student-specific variables and these variables are converted to factors: @ <>= library("prefmod") student <- cemspc[c("ENG", "SEX")] student$ENG <- factor(student$ENG, levels = 1:2, labels = c("good", "poor")) student$SEX <- factor(student$SEX, levels = 1:2, labels = c("female", "male")) @ %def This data frame is put into a list, which will eventually hold all the necessary data. Then a \code{student} factor is created for indexing the student data to produce contest-level data. This is put in a new data frame that will hold the contest-specific data. @ <>= cems <- list(student = student) student <- gl(303, 1, 303 * 15) #303 students, 15 comparisons contest <- data.frame(student = student) @ %def Next the outcome data is converted to a binomial response, adjusted for ties. The result is added to the \code{contest} data frame. @ <>= win <- cemspc[, 1:15] == 0 lose <- cemspc[, 1:15] == 2 draw <- cemspc[, 1:15] == 1 contest$win.adj <- c(win + draw/2) contest$lose.adj <- c(lose + draw/2) @ %def Then two factors are created identifying the first and second school in each comparison. The comparisons are in the order 1 vs.\ 2, 1 vs.\ 3, 2 vs.\ 3, 1 vs.\ 4, \ldots, so the factors can be created as follows: @ <>= lab <- c("London", "Paris", "Milano", "St. Gallen", "Barcelona", "Stockholm") contest$school1 <- factor(sequence(1:5), levels = 1:6, labels = lab) contest$school2 <- factor(rep(2:6, 1:5), levels = 1:6, labels = lab) @ %def Note that both factors have exactly the same levels, even though only five of the six players are represented in each case. In other words, the numeric factor levels refer to the same players in each case, so that the player is unambiguously identified. This ensures that player-specific parameters and player-specific covariates are correctly specified. Finally the \code{contest} data frame is added to the main list: @ <>= cems$contest <- contest @ %def This creates a single data object that can be passed to the \code{data} argument of \code{BTm}. Of course, such a list could be created on-the-fly as in \code{data = list(contest, student)}, which may be more convenient in practice. \subsection[Converting data from the format required by the earlier BradleyTerry package]{Converting data from the format required by the earlier \pkg{BradleyTerry} package} The \pkg{BradleyTerry} package described in \citet{firt:05} required contest/comparison results to be in a data frame with columns named \code{winner}, \code{loser} and \code{Freq}. The following example shows how \code{xtabs} and \code{countsToBinomial} can be used to convert such data for use with the \code{BTm} function in \pkg{BradleyTerry2}: \begin{Sinput} > library("BradleyTerry") ## the /old/ BradleyTerry package > ## load data frame with columns "winner", "loser", "Freq" > data("citations", package = "BradleyTerry") > ## convert to 2-way table of counts > citations <- xtabs(Freq ~ winner + loser, citations) > ## convert to a data frame of binomial observations > citations.sf <- countsToBinomial(citations) \end{Sinput} The \code{citations.sf} data frame can then be used with \code{BTm} as shown in Section~\ref{citations}. \section[A list of the functions provided in BradleyTerry2]{A list of the functions provided in \pkg{BradleyTerry2}} \label{sec:functions} The standard \R\ help files provide the definitive reference. Here we simply list the main user-level functions and their arguments, as a convenient overview: @ <>= ## cf. prompt options(width = 55) for (fn in getNamespaceExports("BradleyTerry2")) { name <- as.name(fn) args <- formals(fn) n <- length(args) arg.names <- arg.n <- names(args) arg.n[arg.n == "..."] <- "\\dots" is.missing.arg <- function(arg) typeof(arg) == "symbol" && deparse(arg) == "" Call <- paste(name, "(", sep = "") for (i in seq_len(n)) { Call <- paste(Call, arg.names[i], if (!is.missing.arg(args[[i]])) paste(" = ", paste(deparse(args[[i]]), collapse = "\n"), sep = ""), sep = "") if (i != n) Call <- paste(Call, ", ", sep = "") } Call <- paste(Call, ")", sep = "") cat(deparse(parse(text = Call)[[1]], width.cutoff = 50), fill = TRUE) } options(width = 60) @ %def \section{Some final remarks} \label{sec:finalremarks} \subsection[A note on the treatment of ties]{A note on the treatment of ties} The present version of \BT\ provides no sophisticated facilities for handling tied contests/comparisons; the well-known models of \cite{rao:kupp:67} and \cite{davi:70} are not implemented here. At present the \code{BTm} function requires a binary or binomial response variable, the third (`tied') category of response is not allowed. In several of the data examples (e.g., \code{?CEMS}, \code{?springall}, \code{?sound.fields}), ties are handled by the crude but simple device of adding half of a `win' to the tally for each player involved; in each of the examples where this has been done it is found that the result is very similar, after a simple re-scaling, to the more sophisticated analyses that have appeared in the literature. Note that this device when used with \code{BTm} typically gives rise to warnings produced by the back-end \code{glm} function, about non-integer `binomial' counts; such warnings are of no consequence and can be safely ignored. It is likely that a future version of \BT\ will have a more general method for handling ties. \subsection{A note on `contest-specific' random effects} The current version of \BT\ provides facilities for fitting models with random effects in `player-specific' predictor functions, as illustrated in Section~\ref{sec:covariates}. For more general, `contest-specific' random-effect structures, such as random `judge' effects in psychological studies \citep[e.g.,][]{bock:01}, \BT\ provides (through \code{BTm}) the necessary user interface but as yet no back-end calculation. It is hoped that this important generalization can be made successfully in a future version of \BT. \section*{Acknowledgments} This work was supported by the UK Engineering and Physical Sciences Research Council. \bibliography{BradleyTerry} \end{document} BradleyTerry2/vignettes/BradleyTerry.bib0000644000176200001440000001705011752475166020063 0ustar liggesusers@Manual{r, title = {\proglang{R}: A Language and Environment for Statistical Computing}, author = {{\proglang{R} Development Core Team}}, organization = {\proglang{R} Foundation for Statistical Computing}, address = {Vienna, Austria}, year = {2012}, note = {{ISBN} 3-900051-07-0}, url = {http://www.R-project.org/}, } @Article{bock:01, author = {U B\"ockenholt}, year = {2001}, title = {Hierarchical Modeling of Paired Comparison Data}, journal = {Psychological Methods}, volume = {6}, number = {1}, pages = {49-66}, } @Book{agre:02, year = {2002}, title = {Categorical Data Analysis}, edition = {2nd}, publisher = {John Wiley \& Sons}, author = {A. Agresti}, } @InCollection{brad:84, title = {Paired Comparisons: Some Basic Procedures and Examples}, editor = {P. R. Krishnaiah and P. K. Sen}, booktitle = {Nonparametric Methods}, publisher = {Elsevier}, year = {1984}, volume = {4}, pages = {299 - 326}, series = {Handbook of Statistics}, author = {R. A. Bradley}, } @Article{brad:terr:52, journal = {Biometrika}, year = {1952}, title = {Rank Analysis of Incomplete Block Designs {I}: {T}he Method of Paired Comparisons}, pages = {324--45}, author = {R. A. Bradley and M. E. Terry}, volume = {39}, } @Article{sham:curt:95, journal = {Annals of Human Genetics}, year = {1995}, title = {An Extended Transmission/Disequilibrium Test ({TDT}) for Multi-Allele Marker Loci}, number = {3}, pages = {323--336}, author = {P. C. Sham and D. Curtis}, volume = {59}, } @Article{ihak:gent:96, journal = {Journal of Computational and Graphical Statistics}, year = {1996}, title = {\proglang{R}: A Language for Data Analysis and Graphics}, number = {3}, pages = {299--314}, author = {Ross Ihaka and Robert Gentleman}, volume = {5}, } @article{spring:73, Journal = {Applied Statistics}, Year = {1973}, Title = {Response Surface Fitting Using a Generalization of the {B}radley-{T}erry Paired Comparisons Model}, Pages = {59--68}, Author = {Springall, A}, Volume = {22}} @article{crit:flig:91, Journal = {Psychometrika}, Year = {1991}, Title = {Paired Comparison, Triple Comparison, and Ranking Experiments as Generalized Linear Models, and Their Implementation in {GLIM}}, Pages = {517--533}, Author = {Critchlow, D E and Fligner, M A}, Volume = {56}} @Article{firt:93, journal = {Biometrika}, year = {1993}, title = {Bias Reduction of Maximum Likelihood Estimates}, pages = {27--38}, author = {D Firth}, volume = {80}, } @Article{hein:sche:02, journal = {Statistics in Medicine}, year = {2002}, title = {A Solution to the Problem of Separation in Logistic Regression}, author = {G Heinze and M Schemper}, pages = {2409--2419}, volume = {21}, } @Article{stig:94, journal = {Statistical Science}, year = {1994}, title = {Citation Patterns in the Journals of Statistics and Probability}, pages = {94--108}, author = {S Stigler}, volume = {9}, } @Article{bres:93, journal = {Journal of the American Statistical Association}, year = {1993}, title = {Approximate Inference in Generalized Linear Mixed Models}, pages = {9--25}, author = {N E Breslow and D G Clayton}, volume = {88}, number = {421}, } @article{spri:73, author = {Springall, A}, title = {Response Surface Fitting Using a Generalization of the {B}radley-{T}erry Paired Comparison Model}, year = {1973}, journal = {Applied Statistics}, volume = {22}, pages = {59--68} } @article{ditt:98, author = {Dittrich, R and Hatzinger, R and Katzenbeisser, W}, title = {Modelling the Effect of Subject-specific Covariates in Paired Comparison Studies with an Application to University Rankings}, year = {1998}, journal = {Applied Statistics}, volume = {47}, pages = {511--525}, keywords = {Bradley-Terry model; Log-linear model} } @Article{ditt:01, author = {R Dittrich and R Hatzinger and W Katzenbeisser}, title = {Corrigendum: {M}odelling the Effect of Subject-Specific Covariates in Paired Comparison Studies with an Application to University Rankings}, year = {2001}, journal = {Applied Statistics}, volume = {50}, pages = {247--249}, } @Article{davi:70, author = {R. R. Davidson}, title = {On Extending the {B}radley-{T}erry Model to Accommodate Ties in Paired Comparison Experiments}, year = {1970}, journal = {Journal of the American Statistical Association}, volume = {65}, pages = {317--328}, } @Article{rao:kupp:67, author = {P. V. Rao and L. L. Kupper}, title = {Ties in Paired-Comparison Experiments: {A} Generalization of the {B}radley-{T}erry Model}, year = {1967}, journal = {Journal of the American Statistical Association}, volume = {62}, pages = {194--204}, } @Article{whit:06, author = {Martin J. Whiting and Devi M. Stuart-Fox and David O'Connor and David Firth and Nigel C. Bennett and Simon P. Blomberg}, title = {{Ultraviolet Signals Ultra-Aggression in a Lizard}}, journal = {Animal Behaviour}, year = {{2006}}, volume = {{72}}, pages = {353--363}, } @article{stua:06, Author = {Stuart-Fox, D M and Firth, D and Moussalli, A and Whiting, M J}, Title = {Multiple Signals in Chameleon Contests: Designing and Analysing Animal Contests as a Tournament}, Journal = {Animal Behaviour}, Year = {{2006}}, Volume = {{71}}, Pages = {1263--1271}, DOI = {10.1016/j.anbehav.2005.07.028} } @article{kous:84, author = {Kousgaard, N}, title = {Analysis of a Sound Field Experiment by a Model for Paired Comparisons with Explanatory Variables}, year = {1984}, journal = {Scandinavian Journal of Statistics}, volume = {11}, pages = {51--57}, keywords = {Bradley-Terry model} } @Article{firt:04, author = {D. Firth and R. X. {de Menezes}}, title = {Quasi-Variances}, journal = {Biometrika}, volume = {91}, year = {2004}, pages = {65--80}, } @Article{firt:05, author = {David Firth}, title = {Bradley-Terry Models in \proglang{R}}, journal = {Journal of Statistical Software}, year = {2005}, volume = {12}, number = {1}, pages = {1--12}, url = {http://www.jstatsoft.org/v12/i01/} } @Manual{kosm:07, title = {\pkg{brglm}: Bias Reduction in Binary-Response GLMs}, author = {Ioannis Kosmidis}, year = {2007}, note = {\proglang{R}~package version~0.5-6}, url = {http://www.ucl.ac.uk/~ucakiko/software.html}, } @Manual{bate:11, title = {\pkg{lme4}: Linear Mixed-Effects Models Using \proglang{S}4 Classes}, author = {Douglas Bates and Martin M\"achler and Ben Bolker}, year = {2011}, note = {\proglang{R}~package version~0.999375-42}, url = {http://CRAN.R-project.org/package=lme4}, } @Manual{firt:10, title = {\pkg{qvcalc}: Quasi-Variances for Factor Effects in Statistical Models}, author = {David Firth}, year = {2010}, note = {\proglang{R}~package version~0.8-7}, url = {http://CRAN.R-project.org/package=qvcalc}, } @Article{hatz:12, author = {Reinhold Hatzinger and Regina Dittrich}, title = {\pkg{prefmod}: An \proglang{R} Package for Modeling Preferences Based on Paired Comparisons, Rankings, or Ratings}, journal = {Journal of Statistical Software}, year = {2012}, volume = {48}, number = {10}, pages = {1--31}, url = {http://www.jstatsoft.org/v48/i10/} } @Article{turn:12, author = {Heather Turner and David Firth}, title = {Bradley-Terry Models in \proglang{R}: The \pkg{BradleyTerry2} Package}, journal = {Journal of Statistical Software}, year = {2012}, volume = {48}, number = {9}, pages = {1--21}, url = {http://www.jstatsoft.org/v48/i09/} }BradleyTerry2/MD50000644000176200001440000001041412465776046013275 0ustar liggesuserse0085381cfc56609743d18db87254ef6 *DESCRIPTION eeaac9f31f3cf846268786b6c16fe072 *NAMESPACE 8e7682ba810f1c58d818e3b04b7ed62d *R/BTabilities.R 50e697aee7e16684160619f67f23bac8 *R/BTm.R 7936c08fc0b8ade0aeb482c3eff130b9 *R/BTm.setup.R 8a5f7d35d5d12ea3b32112eef2f8ccc1 *R/Diff.R 870842bb91c803ead2c31493b6a82356 *R/GenDavidson.R e89fb70513507fac9868bd3d2d23f56a *R/add1.BTm.R 750861ca1126512fcb30d82ef9f729e1 *R/anova.BTm.R 6c74c7caa658bf0b1f36fdc485f43764 *R/anova.BTmlist.R 6bcb83a27f4a3612f1ec331748fd562a *R/countsToBinomial.R b63e8c16f777bc138928b3f7c5d9d6f5 *R/drop1.BTm.R a439f4d20931e08c05141460bc06974e *R/formula.BTm.R 6673e607a33c73e33ac65d949d59b397 *R/glmmPQL.R 94371838095adaf749943d0e977a9f35 *R/glmmPQL.control.R 29f1763f62da78d96642a0a206903d86 *R/glmmPQL.fit.R ad1d3edac7e8613101ee16ad0493d223 *R/missToZero.R 55aee33eb147a352679517c0c55f62fb *R/model.frame.BTm.R 9d26581a78f638d8f787d880a9e8eeb9 *R/model.matrix.BTm.R 2acd7ed46021785e0663a0a183a23082 *R/plotProportions.R 9520192bf0e84bc31743acddef2fb5f9 *R/predict.BTglmmPQL.R 074458f2c23b2e27e61e792aa66009ef *R/predict.BTm.R 76d7110f3f951139bee0b46e27fd009a *R/print.BTglmmPQL.R 87ced91d4e94dcf96d968aa55077b14e *R/print.BTm.R ae64571cdc5e2aa009c09221b6307fa5 *R/print.summary.glmmPQL.R 6901bec2c18d1dc887c146b2eb2a573d *R/residuals.BTm.R 977e8a46110142f0528851faf5c570b4 *R/summary.BTglmmPQL.R 5ba7e4772ff6d308cc561e835142d108 *R/vcov.BTglmmPQL.R 738363883dc01b7f5c73d302a3f59f36 *README 4e08c474f1b39946c5035017ef25f6c5 *build/vignette.rds a7051bb182fe4904fef99a77c816fd76 *data/CEMS.rda ee0852f01caba3acc47ed1a8267062e8 *data/baseball.RData 962a85897d2fbab573bfcb02645c416e *data/chameleons.rda 39f86c6caa1e740a369355caf11549b2 *data/citations.rda a8402c784331c5e6a14ded61b6d615e3 *data/flatlizards.rda 8aba0268f583bf5e16c86f094e7747e4 *data/football.RData 7f3255d5758619c2879ba8434ef64642 *data/icehockey.rda 05cf0b85770b4366fdbff7a253efbbeb *data/seeds.rda fd532d820249f69778437e35dc522307 *data/sound.fields.rda ca7b2ec598e187710eca9b36f7f03aaa *data/springall.rda 804ad272cf67ae373aaedc303cdbfd4f *inst/CITATION 0c1ae738c26eb5f4c7140519a79f225b *inst/NEWS f05e6e261d875c9c20b5728aea03c2ef *inst/doc/BradleyTerry.R de5262a35d80829f9a45f32e6ec6cfc7 *inst/doc/BradleyTerry.Rnw 05ae4953405b92319f2e5f985aac5455 *inst/doc/BradleyTerry.pdf 99d87987fa4deb572b97362bc261199d *man/BTabilities.Rd 0d82f7379f73ccc8fab2eb05b37baf85 *man/BTm.Rd 3f994b2216cc98587a5234736ff02525 *man/CEMS.Rd c98042cb66f14a1b66772f61ee608959 *man/GenDavidson.Rd daa456f820916ba014c30c87aedb7d5f *man/add1.BTm.Rd 3eb4e32655003d99fc318fc00afee91f *man/anova.BTm.Rd a464f558511ac4533dd3278c2f07e4c0 *man/baseball.Rd 017d161649a5a2120590ba8bcfc1f0d7 *man/chameleons.Rd 98f5de9b33201e282f287638ea8b2a50 *man/citations.Rd 9c3edd0dde356e3b305dc346a8841edb *man/countsToBinomial.Rd e922bd1e003d822693ac3f82fd7f7d91 *man/flatlizards.Rd 0a46eb2b24f6fc172bc5e5424e12f8ea *man/football.Rd b9b5380c6c4cc0c870028dc4cfda4c60 *man/glmmPQL.Rd 46b9e8268f6d99c39ad102763bfd51df *man/glmmPQL.control.Rd f86a9ccab16e690a4f62132da1476464 *man/icehockey.Rd f700b3ce0e03186dfa9f1f4ddd40c507 *man/plotProportions.Rd 360163084dd36af9bf49ef9dcb3f6cfc *man/predict.BTglmmPQL.Rd c9c668c3afc975173a298c5e3a8d22df *man/predict.BTm.Rd 1971eac94af9a45421d744c580f319ec *man/residuals.BTm.Rd 106eca3165b0a3a5720f2bfad29b9b60 *man/seeds.Rd 62e6e6d5333b39db42fe5fd48a878030 *man/sound.fields.Rd 8b7e3a5aff67feba046cae398d4ec5a4 *man/springall.Rd df4659e9c9e844eebe7fef53a3525e07 *tests/add1.R fb6a939682cb497709b1d2597332183f *tests/add1.Rout.save 4cc0529e96d6c80aea02b3b4aa6237ee *tests/baseball.R 170e41c094e402f3114e34806936c071 *tests/baseball.Rout.save 751c24cf5cc1e2d49f57abed4b8950c3 *tests/countsToBinomial.R ca934c9a8d4e690c9c8867a331a7a455 *tests/countsToBinomial.Rout.save 26578382732d5019bc136fe985413dbb *tests/flatlizards.R 0b2a59b3b5afc839d6f8ce5e547cd5f8 *tests/flatlizards.Rout.save e8fe5bdb325fad20220be8d64a4a004d *tests/nested.R 76282d600b407791847314c4576d5129 *tests/nested.Rout.save 19565cc74149e98f38dde9c15b2feaa2 *tests/predict.R f772dfc5cfc63da1418b2fd6cd6a6c89 *tests/predict.Rout.save de5262a35d80829f9a45f32e6ec6cfc7 *vignettes/BradleyTerry.Rnw df33930c7d7ef359d3a320cc0f44c132 *vignettes/BradleyTerry.bib 7abfe1eb2816210b8d43fcc351468f07 *vignettes/baseball-qvplot.pdf 44843a3e7711c360bc0ad21c743b7674 *vignettes/residuals.pdf BradleyTerry2/README0000644000176200001440000000526211723723170013634 0ustar liggesusers R-Forge SVN README (See "http://download.r-forge.r-project.org/manuals/R-Forge_Manual.pdf" for detailed information on registering a new project.) 1. Introduction ----------------------------------------------------------------------- R is free software distributed under a GNU-style copyleft. R-Forge is a central platform for the development of R packages, R-related software and further projects. Among many other web-based features it provides facilities for collaborative source code management via Subversion (SVN). 2. The directory you're in ----------------------------------------------------------------------- This is the repository of your project. It contains two important pre-defined directories namely 'pkg' and 'www'. These directories must not be deleted otherwise R-Forge's core functionality will not be available (i.e., daily checking and building of your package or the project websites). 'pkg' and 'www' are standardized and therefore are going to be described in this README. The rest of your repository can be used as you like. 3. 'pkg' directory ----------------------------------------------------------------------- To make use of the package building and checking feature the package source code has to be put into the 'pkg' directory of your repository (i.e., 'pkg/DESCRIPTION', 'pkg/R', 'pkg/man', etc.) or, alternatively, a subdirectory of 'pkg'. The latter structure allows for having more than one package in a single project, e.g., if a project consists of the packages foo and bar then the source code will be located in 'pkg/foo' and 'pkg/bar', respectively. R-Forge automatically examines the 'pkg' directory of every repository and builds the package sources as well as the package binaries on a daily basis for Mac OSX and Windows (if applicable). The package builds are provided in the 'R Packages' tab for download or can be installed directly in R from a CRAN-style repository using 'install.packages("foo", repos="http://R-Forge.R-project.org")'. Furthermore, in the 'R Packages' tab developers can examine logs generated by the build and check process on different platforms. 4. 'www' directory ----------------------------------------------------------------------- Developers may present their work on a subdomain of R-Forge, e.g., 'http://foo.R-Forge.R-project.org', or via a link to an external website. This directory contains the project homepage which gets updated hourly on R-Forge, so please take into consideration that it will not be available right after you commit your changes or additions. 5. Help ----------------------------------------------------------------------- If you need help don't hesitate to contact us at R-Forge@R-project.org BradleyTerry2/build/0000755000176200001440000000000012465715316014055 5ustar liggesusersBradleyTerry2/build/vignette.rds0000644000176200001440000000045412465715316016417 0ustar liggesusers}RN0̋B+@'@ zj۰k;QN|9e؈ K^=u$Iٜܼ$3}K;Md'Åa UL`-@Z .o,ZE}l$q#(ᮿ7p D܌5{Ah XZy葴}{-.%A"7\Q5A՝quq ,Z8&e(:._zZz 'TQB۟CZ{7џwnt__ID+~6~-v]߇qiBradleyTerry2/DESCRIPTION0000644000176200001440000000131112465776046014467 0ustar liggesusersPackage: BradleyTerry2 Version: 1.0-6 Date: 2015-02-06 Title: Bradley-Terry Models Author: Heather Turner and David Firth Maintainer: Heather Turner URL: http://bradleyterry2.r-forge.r-project.org Description: Specify and fit the Bradley-Terry model, including structured versions in which the parameters are related to explanatory variables through a linear predictor and versions with contest-specific effects, such as a home advantage. Depends: R (>= 2.10), lme4 (>= 1.0) Imports: brglm, gtools, stats Suggests: prefmod Enhances: gnm License: GPL (>= 2) LazyData: yes NeedsCompilation: no Packaged: 2015-02-08 17:20:14 UTC; heather Repository: CRAN Date/Publication: 2015-02-09 01:15:34 BradleyTerry2/man/0000755000176200001440000000000012465715316013531 5ustar liggesusersBradleyTerry2/man/icehockey.Rd0000644000176200001440000001072712347613620015764 0ustar liggesusers\name{icehockey} \alias{icehockey} \docType{data} \title{ College Hockey Men's Division I 2009-10 results } \description{ Game results from American College Hockey Men's Division I composite schedule 2009-2010. } \usage{icehockey} \format{ A data frame with 1083 observations on the following 6 variables. \describe{ \item{\code{date}}{a numeric vector} \item{\code{visitor}}{a factor with 58 levels \code{Alaska Anchorage} ... \code{Yale}} \item{\code{v_goals}}{a numeric vector} \item{\code{opponent}}{a factor with 58 levels \code{Alaska Anchorage} ... \code{Yale}} \item{\code{o_goals}}{a numeric vector} \item{\code{conference}}{a factor with levels \code{AH}, \code{CC}, \code{CH}, \code{EC}, \code{HE}, \code{NC}, \code{WC}} \item{\code{result}}{a numeric vector: 1 if visitor won, 0.5 for a draw and 0 if visitor lost} \item{\code{home.ice}}{a logical vector: 1 if opponent on home ice, 0 if game on neutral ground} } } \details{ The Division I ice hockey teams are arranged in six conferences: Atlantic Hockey, Central Collegiate Hockey Association, College Hockey America, ECAC Hockey, Hockey East and the Western Collegiate Hockey Association, all part of the National Collegiate Athletic Association. The composite schedule includes within conference games and between conference games. The data set here contains only games from the regular season, the results of which determine the teams that play in the NCAA national tournament. There are six automatic bids that go to the conference tournament champions, the remaining 10 teams are selected based upon ranking under the NCAA's system of pairwise comparisons (\url{http://www.collegehockeynews.com/info/?d=pwcrpi}). Some have argued that Bradley-Terry rankings would be fairer (\url{http://www.collegehockeynews.com/info/?d=krach}). } \source{ \url{http://www.collegehockeystats.net/0910/schedules/men} } \references{ Schlobotnik, J. Build your own rankings. \url{http://slack.net/~whelan/tbrw/2010/rankings.diy.shtml} \url{http://www.collegehockeynews.com} Selections for 2010 NCAA tournament. \url{http://sports.espn.go.com/ncaa/news/story?id=5012918} } \examples{ ### Fit the standard Bradley-Terry model standardBT <- BTm(outcome = result, player1 = visitor, player2 = opponent, id = "team", data = icehockey) ## Bradley-Terry abilities abilities <- exp(BTabilities(standardBT)[,1]) ## Compute round-robin winning probability and KRACH ratings ## (scaled abilities such that KRACH = 100 for a team with ## round-robin winning probability of 0.5) rankings <- function(abilities){ probwin <- abilities/outer(abilities, abilities, "+") diag(probwin) <- 0 nteams <- ncol(probwin) RRWP <- rowSums(probwin)/(nteams - 1) low <- quantile(abilities, 0.45) high <- quantile(abilities, 0.55) middling <- uniroot(function(x) {sum(x/(x+abilities)) - 0.5*nteams}, lower = low, upper = high)$root KRACH <- abilities/middling*100 cbind(KRACH, RRWP) } ranks <- rankings(abilities) ## matches those produced by Joe Schlobotnik's Build Your Own Rankings head(signif(ranks, 4)[order(ranks[,1], decreasing = TRUE),]) ## At one point the NCAA rankings gave more credit for wins on ## neutral/opponent's ground. Home ice effects are easily ## incorporated into the Bradley-Terry model, comparing teams ## on a "level playing field" levelBT <- BTm(result, data.frame(team = visitor, home.ice = 0), data.frame(team = opponent, home.ice = home.ice), ~ team + home.ice, id = "team", data = icehockey) abilities <- exp(BTabilities(levelBT)[,1]) ranks2 <- rankings(abilities) ## Look at movement between the two rankings change <- factor(rank(ranks2[,1]) - rank(ranks[,1])) barplot(xtabs(~change), xlab = "Change in Rank", ylab = "No. Teams") ## Take out regional winners and look at top 10 regional <- c("RIT", "Alabama-Huntsville", "Michigan", "Cornell", "Boston College", "North Dakota") ranks <- ranks[!rownames(ranks) \%in\% regional] ranks2 <- ranks2[!rownames(ranks2) \%in\% regional] ## compare the 10 at-large selections under both rankings ## with those selected under NCAA rankings cbind(names(sort(ranks, decr = TRUE)[1:10]), names(sort(ranks2, decr = TRUE)[1:10]), c("Miami", "Denver", "Wisconsin", "St. Cloud State", "Bemidji State", "Yale", "Northern Michigan", "New Hampshire", "Alsaka", "Vermont")) } \keyword{datasets} BradleyTerry2/man/GenDavidson.Rd0000644000176200001440000002063612347615650016227 0ustar liggesusers\name{GenDavidson} \alias{GenDavidson} \title{ Specify a Generalised Davidson Term in a gnm Model Formula} \description{ GenDavidson is a function of class \code{"nonlin"} to specify a generalised Davidson term in the formula argument to \code{\link[gnm]{gnm}}, providing a model for paired comparison data where ties are a possible outcome. } \usage{ GenDavidson(win, tie, loss, player1, player2, home.adv = NULL, tie.max = ~1, tie.mode = NULL, tie.scale = NULL, at.home1 = NULL, at.home2 = NULL) } \arguments{ \item{win}{ a logical vector: \code{TRUE} if player1 wins, \code{FALSE} otherwise. } \item{tie}{ a logical vector: \code{TRUE} if the outcome is a tie, \code{FALSE} otherwise. } \item{loss}{ a logical vector: \code{TRUE} if player1 loses, \code{FALSE} otherwise. } \item{player1}{ an ID factor specifying the first player in each contest, with the same set of levels as \code{player2}. } \item{player2}{ an ID factor specifying the second player in each contest, with the same set of levels as \code{player2}. } \item{home.adv}{ a formula for the paramter corresponding to the home advantage effect. If \code{NULL}, no home advantage effect is estimated. } \item{tie.max}{ a formula for the parameter corresponding to the maximum tie probability. } \item{tie.scale}{ a formula for the parameter corresponding to the scale of dependence of the tie probability on the probability that \code{player1} wins, given the outcome is not a draw. } \item{tie.mode}{ a formula for the parameter corresponding to the location of maximum tie probability, in terms of the probability that \code{player1} wins, given the outcome is not a draw. } \item{at.home1}{ a logical vector: \code{TRUE} if \code{player1} is at home, \code{FALSE} otherwise. } \item{at.home2}{ a logical vector: \code{TRUE} if \code{player2} is at home, \code{FALSE} otherwise. } } \details{ \code{GenDavidson} specifies a generalisation of the Davidson model (1970) for paired comparisons where a tie is a possible outcome. It is designed for modelling trinomial counts corresponding to the win/draw/loss outcome for each contest, which are assumed Poisson conditional on the total count for each match. Since this total must be one, the expected counts are equivalently the probabilities for each possible outcome, which are modelled on the log scale: \deqn{\log(p(i \textrm{beats} j)_k) = \theta_{ijk} + \log(\mu\alpha_i}{log(p(i beats j)_k) = theta_{ijk} + log(mu * alpha_i)} \deqn{\log(p(draw)_k) = \theta_{ijk} + \delta + c + \sigma(\pi\log(\mu\alpha_i) - (1 - \pi)log(\alpha_j)) + (1 - \sigma)(\log(\mu\alpha_i + \alpha_j))}{ log(p(draw)_k) = theta_{ijk} + log(delta) + c + sigma * (pi * log(mu * alpha_i) + (1 - pi) * log(alpha_j)) + (1 - sigma) * log(mu * alpha_i + alpha_j) } \deqn{\log(p(j \textrm{beats} i)_k) = \theta_{ijk} + log(\alpha_j)}{log(p(j beats i)_k) = theta_{ijk} + log(alpha_j)} Here \eqn{\theta_{ijk}}{theta_{ijk}} is a structural parameter to fix the trinomial totals; \eqn{\mu}{mu} is the home advantage parameter; \eqn{\alpha_i}{alpha_i} and \eqn{\alpha_j}{alpha_j} are the abilities of players \eqn{i} and \eqn{j} respectively; \eqn{c}{c} is a function of the parameters such that \eqn{\textrm{expit}(\delta)}{plogis(delta)} is the maximum probability of a tie, \eqn{\sigma}{sigma} scales the dependence of the probability of a tie on the relative abilities and \eqn{\pi}{pi} allows for asymmetry in this dependence. For parameters that must be positive (\eqn{\alpha_i, \sigma, \mu}{alpha, sigma, mu}), the log is estimated, while for parameters that must be between zero and one (\eqn{\delta, \pi}), the logit is estimated, as illustrated in the example. } \value{ A list with the anticipated components of a "nonlin" function: \item{ predictors }{ the formulae for the different parameters and the ID factors for player 1 and player 2. } \item{ variables }{ the outcome variables and the \dQuote{at home} variables, if specified. } \item{ common }{ an index to specify that common effects are to be estimated for the players. } \item{ term }{ a function to create a deparsed mathematical expression of the term, given labels for the predictors.} \item{ start }{ a function to generate starting values for the parameters.} } \references{ Davidson, R. R. (1970). On extending the Bradley-Terry model to accommodate ties in paired comparison experiments. \emph{Journal of the American Statistical Association}, \bold{65}, 317--328. } \author{ Heather Turner } \seealso{\code{\link{football}}, \code{\link{plotProportions}}} \examples{ ### example requires gnm if (require(gnm)) { ### convert to trinomial counts football.tri <- expandCategorical(football, "result", idvar = "match") head(football.tri) ### add variable to indicate whether team playing at home football.tri$at.home <- !logical(nrow(football.tri)) ### fit shifted & scaled Davidson model ### - subset to first and last season for illustration shifScalDav <- gnm(count ~ GenDavidson(result == 1, result == 0, result == -1, home:season, away:season, home.adv = ~1, tie.max = ~1, tie.scale = ~1, tie.mode = ~1, at.home1 = at.home, at.home2 = !at.home) - 1, eliminate = match, family = poisson, data = football.tri, subset = season \%in\% c("2008-9", "2012-13")) ### look at coefs coef <- coef(shifScalDav) ## home advantage exp(coef["home.adv"]) ## max p(tie) plogis(coef["tie.max"]) ## mode p(tie) plogis(coef["tie.mode"]) ## scale relative to Davidson of dependence of p(tie) on p(win|not a draw) exp(coef["tie.scale"]) ### check model fit alpha <- names(coef[-(1:4)]) plotProportions(result == 1, result == 0, result == -1, home:season, away:season, abilities = coef[alpha], home.adv = coef["home.adv"], tie.max = coef["tie.max"], tie.scale = coef["tie.scale"], tie.mode = coef["tie.mode"], at.home1 = at.home, at.home2 = !at.home, data = football.tri, subset = count == 1) } ### analyse all five seasons ### - takes a little while to run, particularly likelihood ratio tests \dontrun{ ### fit Davidson model Dav <- gnm(count ~ GenDavidson(result == 1, result == 0, result == -1, home:season, away:season, home.adv = ~1, tie.max = ~1, at.home1 = at.home, at.home2 = !at.home) - 1, eliminate = match, family = poisson, data = football.tri) ### fit scaled Davidson model scalDav <- gnm(count ~ GenDavidson(result == 1, result == 0, result == -1, home:season, away:season, home.adv = ~1, tie.max = ~1, tie.scale = ~1, at.home1 = at.home, at.home2 = !at.home) - 1, eliminate = match, family = poisson, data = football.tri) ### fit shifted & scaled Davidson model shifScalDav <- gnm(count ~ GenDavidson(result == 1, result == 0, result == -1, home:season, away:season, home.adv = ~1, tie.max = ~1, tie.scale = ~1, tie.mode = ~1, at.home1 = at.home, at.home2 = !at.home) - 1, eliminate = match, family = poisson, data = football.tri) ### compare models anova(Dav, scalDav, shifScalDav, test = "Chisq") ### diagnostic plots main <- c("Davidson", "Scaled Davidson", "Shifted & Scaled Davidson") mod <- list(Dav, scalDav, shifScalDav) names(mod) <- main ## use football.tri data so that at.home can be found, ## but restrict to actual match results par(mfrow = c(2,2)) for (i in 1:3) { coef <- parameters(mod[[i]]) plotProportions(result == 1, result == 0, result == -1, home:season, away:season, abilities = coef[alpha], home.adv = coef["home.adv"], tie.max = coef["tie.max"], tie.scale = coef["tie.scale"], tie.mode = coef["tie.mode"], at.home1 = at.home, at.home2 = !at.home, main = main[i], data = football.tri, subset = count == 1) } } } \keyword{ models } \keyword{ nonlinear } BradleyTerry2/man/BTm.Rd0000644000176200001440000002320112464170614014473 0ustar liggesusers\name{BTm} \alias{BTm} \title{ Bradley-Terry Model and Extensions } \description{ Fits Bradley-Terry models for pair comparison data, including models with structured scores, order effect and missing covariate data. Fits by either maximum likelihood or maximum penalized likelihood (with Jeffreys-prior penalty) when abilities are modelled exactly, or by penalized quasi-likelihood when abilities are modelled by covariates. } \usage{ BTm(outcome, player1, player2, formula = NULL, id = "..", separate.ability = NULL, refcat = NULL, family = binomial, data = NULL, weights = NULL, subset = NULL, na.action = NULL, start = NULL, etastart = NULL, mustart = NULL, offset = NULL, br = FALSE, model = TRUE, x = FALSE, contrasts = NULL, ...) } \arguments{ \item{outcome}{ the binomial response: either a numeric vector, a factor in which the first level denotes failure and all others success, or a two-column matrix with the columns giving the numbers of successes and failures. } \item{player1}{ either an ID factor specifying the first player in each contest, or a data.frame containing such a factor and possibly other contest-level variables that are specific to the first player. If given in a data.frame, the ID factor must have the name given in the \code{id} argument. If a factor is specified it will be used to create such a data.frame. } \item{player2}{ an object corresponding to that given in \code{player1} for the second player in each contest, with identical structure -- in particular factors must have identical levels. } \item{formula}{ a formula with no left-hand-side, specifying the model for player ability. See details for more information. } \item{id}{ the name of the ID factor. } \item{separate.ability}{(if \code{formula} does not include the ID factor as a separate term) a character vector giving the names of players whose abilities are to be modelled individually rather than using the specification given by \code{formula}. } \item{refcat}{(if \code{formula} includes the ID factor as a separate term) a character specifying which player to use as a reference, with the first level of the ID factor as the default. Overrides any other contrast specification for the ID factor.} \item{family}{ a description of the error distribution and link function to be used in the model. Only the binomial family is implemented, with either\code{"logit"}, \code{"probit"} , or \code{"cauchit"} link. (See \code{\link{family}} for details of family functions.)} \item{data}{ an optional object providing data required by the model. This may be a single data frame of contest-level data or a list of data frames. Names of data frames are ignored unless they refer to data frames specified by \code{player1} and \code{player2}.The rows of data frames that do not contain contest-level data must correspond to the levels of a factor used for indexing. Objects are searched for first in the \code{data} object if provided, then in the environment of \code{formula}. If \code{data} is a list, the data frames are searched in the order given.} \item{weights}{ an optional numeric vector of \sQuote{prior weights}.} \item{subset}{ an optional logical or numeric vector specifying a subset of observations to be used in the fitting process. } \item{na.action}{ a function which indicates what should happen when any contest-level variables contain \code{NA}s. The default is the \code{na.action} setting of \code{options}. See details for the handling of missing values in other variables. } \item{start}{ a vector of starting values for the fixed effects.} \item{etastart}{ a vector of starting values for the linear predictor. } \item{mustart}{ a vector of starting values for the vector of means.} \item{offset}{ an optional offset term in the model. A vector of length equal to the number of contests.} \item{br}{ logical. If \code{TRUE} fitting will be by penalized maximum likelihood as in Firth (1992, 1993), using \code{\link[brglm]{brglm}}, rather than maximum likelihood using \code{\link{glm}}, when abilities are modelled exactly or when the abilities are modelled by covariates and the variance of the random effects is estimated as zero. } \item{model}{logical: whether or not to return the model frame.} \item{x}{logical: whether or not to return the design matrix for the fixed effects.} \item{contrasts}{an optional list specifying contrasts for the factors in \code{formula}. See the \code{contrasts.arg} of \code{\link{model.matrix}}.} \item{\dots}{other arguments for fitting function (currently either \code{\link{glm}}, \code{\link[brglm]{brglm}}, or \code{\link{glmmPQL}}) } } \details{ In each comparison to be modelled there is a 'first player' and a 'second player' and it is assumed that one player wins while the other loses (no allowance is made for tied comparisons). The \code{\link{countsToBinomial}} function is provided to convert a contingency table of wins into a data frame of wins and losses for each pair of players. The \code{formula} argument specifies the model for player ability and applies to both the first player and the second player in each contest. If \code{NULL} a separate ability is estimated for each player, equivalent to setting \code{formula = reformulate(id)}. Contest-level variables can be specified in the formula in the usual manner, see \code{\link{formula}}. Player covariates should be included as variables indexed by \code{id}, see examples. Thus player covariates must be ordered according to the levels of the ID factor. If \code{formula} includes player covariates and there are players with missing values over these covariates, then a separate ability will be estimated for those players. When player abilities are modelled by covariates, then random player effects should be added to the model. These should be specified in the formula using the vertical bar notation of \code{\link[lme4]{lmer}}, see examples. When specified, it is assumed that random player effects arise from a \eqn{N(0, \sigma^2)}{N(0, sigma^2)} distribution and model parameters, including \eqn{\sigma}{sigma}, are estimated using PQL (Breslow and Clayton, 1993) as implemented in the \code{\link{glmmPQL}} function. } \value{ An object of class \code{c("BTm", "x")}, where \code{"x"} is the class of object returned by the model fitting function (e.g. \code{glm}). Components are as for objects of class \code{"x"}, with additionally \item{id}{the \code{id} argument.} \item{separate.ability}{the \code{separate.ability} argument.} \item{refcat}{the \code{refcat} argument.} \item{player1}{a data frame for the first player containing the ID factor and any player-specific contest-level variables.} \item{player2}{a data frame corresponding to that for \code{player1}.} \item{assign}{a numeric vector indicating which coefficients correspond to which terms in the model.} \item{term.labels}{labels for the model terms.} \item{random}{for models with random effects, the design matrix for the random effects. } } \seealso{ \code{\link{countsToBinomial}}, \code{\link{glmmPQL}}, \code{\link{BTabilities}}, \code{\link{residuals.BTm}}, \code{\link{add1.BTm}}, \code{\link{anova.BTm}} } \references{ Agresti, A. (2002) \emph{Categorical Data Analysis} (2nd ed). New York: Wiley. Firth, D. (1992) Bias reduction, the Jeffreys prior and GLIM. In \emph{Advances in GLIM and Statistical Modelling}, Eds. Fahrmeir, L., Francis, B. J., Gilchrist, R. and Tutz, G., pp91--100. New York: Springer. Firth, D. (1993) Bias reduction of maximum likelihood estimates. \emph{Biometrika} \bold{80}, 27--38. Firth, D. (2005) Bradley-Terry models in R. \emph{Journal of Statistical Software}, \bold{12}(1), 1--12. Stigler, S. (1994) Citation patterns in the journals of statistics and probability. \emph{Statistical Science} \bold{9}, 94--108. Turner, H. and Firth, D. (2012) Bradley-Terry models in R: The BradleyTerry2 package. \emph{Journal of Statistical Software}, \bold{48}(9), 1--21. } \author{ Heather Turner, David Firth } \examples{ ######################################################## ## Statistics journal citation data from Stigler (1994) ## -- see also Agresti (2002, p448) ######################################################## ## Convert frequencies to success/failure data citations.sf <- countsToBinomial(citations) names(citations.sf)[1:2] <- c("journal1", "journal2") ## First fit the "standard" Bradley-Terry model citeModel <- BTm(cbind(win1, win2), journal1, journal2, data = citations.sf) ## Now the same thing with a different "reference" journal update(citeModel, refcat = "JASA") ################################################################## ## Now an example with an order effect -- see Agresti (2002) p438 ################################################################## ## Simple Bradley-Terry model, ignoring home advantage: baseballModel1 <- BTm(cbind(home.wins, away.wins), home.team, away.team, data = baseball, id = "team") ## Now incorporate the "home advantage" effect baseball$home.team <- data.frame(team = baseball$home.team, at.home = 1) baseball$away.team <- data.frame(team = baseball$away.team, at.home = 0) baseballModel2 <- update(baseballModel1, formula = ~ team + at.home) ## Compare the fit of these two models: anova(baseballModel1, baseballModel2) ## ## For a more elaborate example with both player-level and contest-level ## predictor variables, see help(chameleons). ## } \keyword{ models } BradleyTerry2/man/countsToBinomial.Rd0000644000176200001440000000217412347612674017317 0ustar liggesusers\name{countsToBinomial} \alias{countsToBinomial} \title{ Convert Contingency Table of Wins to Binomial Counts } \description{ Convert a contingency table of wins to a four-column data frame containing the number of wins and losses for each pair of players. } \usage{ countsToBinomial(xtab) } \arguments{ \item{xtab}{ a contingency table of wins cross-classified by \dQuote{winner} and \dQuote{loser} } } \value{ A data frame with four columns \item{player1 }{ the first player in the contest. } \item{player2 }{ the second player in the contest. } \item{win1 }{ the number of times \code{player1} won. } \item{win2 }{ the number of times \code{player2} won. } } \author{ Heather Turner } \seealso{ \code{\link{BTm}} } \examples{ ######################################################## ## Statistics journal citation data from Stigler (1994) ## -- see also Agresti (2002, p448) ######################################################## citations ## Convert frequencies to success/failure data citations.sf <- countsToBinomial(citations) names(citations.sf)[1:2] <- c("journal1", "journal2") citations.sf } \keyword{ models } BradleyTerry2/man/add1.BTm.Rd0000644000176200001440000000553012347612530015306 0ustar liggesusers\name{add1.BTm} \alias{add1.BTm} \alias{drop1.BTm} \title{ Add or Drop Single Terms to/from a Bradley Terry Model } \description{ Add or drop single terms within the limit specified by the \code{scope} argument. For models with no random effects, compute an analysis of deviance table, otherwise compute the Wald statistic of the parameters that have been added to or dropped from the model. } \usage{ \method{add1}{BTm}(object, scope, scale = 0, test = c("none", "Chisq", "F"), x = NULL, ...) \method{drop1}{BTm}(object, scope, scale = 0, test = c("none", "Chisq", "F"), ...) } \arguments{ \item{object}{ a fitted object of class inheriting from \code{"BTm"}. } \item{scope}{ a formula specifying the model including all terms to be considered for adding or dropping. } \item{scale}{ an estimate of the dispersion. Not implemented for models with random effects. } \item{test}{ should a p-value be returned? The F test is only appropriate for models with no random effects for which the dispersion has been estimated. The Chisq test is a likelihood ratio test for models with no random effects, otherwise a Wald test. } \item{x}{ a model matrix containing columns for all terms in the scope. Useful if \code{add1} is to be called repeatedly. \bold{Warning:} no checks are done on its validity. } \item{\dots}{ further arguments passed to \code{\link{add1.glm}}. } } \details{ The hierarchy is respected when considering terms to be added or dropped: all main effects contained in a second-order interaction must remain, and so on. In a scope formula \samp{.} means \sQuote{what is already there}. For \code{drop1}, a missing \code{scope} is taken to mean that all terms in the model may be considered for dropping. If \code{scope} includes player covariates and there are players with missing values over these covariates, then a separate ability will be estimated for these players in \emph{all} fitted models. Similarly if there are missing values in any contest-level variables in \code{scope}, the corresponding contests will be omitted from all models. If \code{formula} includes random effects, the same random effects structure will apply to all models. } \value{ An object of class \code{"anova"} summarizing the differences in fit between the models. } \author{ Heather Turner } \seealso{ \code{\link{BTm}}, \code{\link{anova.BTm}} } \examples{ attach(flatlizards) result <- rep(1, nrow(contests)) BTmodel1 <- BTm(result, winner, loser, ~ throat.PC1[..] + throat.PC3[..] + (1|..), data = list(contests, predictors), tol = 1e-4, sigma = 2, trace = TRUE) drop1(BTmodel1) add1(BTmodel1, ~ . + head.length[..] + SVL[..], test = "Chisq") BTmodel2 <- update(BTmodel1, formula = ~ . + head.length[..]) drop1(BTmodel2, test = "Chisq") } \keyword{ models } BradleyTerry2/man/springall.Rd0000644000176200001440000000601412347613601016005 0ustar liggesusers\name{springall} \alias{springall} \docType{data} \title{ Springall (1973) Data on Subjective Evaluation of Flavour Strength } \description{ Data from Section 7 of the paper by Springall (1973) on Bradley-Terry response surface modelling. An experiment to assess the effects of gel and flavour concentrations on the subjective assessment of flavour strength by pair comparisons. } \usage{springall} \format{ A list containing two data frames, \code{springall$contests} and \code{springall$predictors}. The \code{springall$contests} data frame has 36 observations (one for each possible pairwise comparison of the 9 treatments) on the following 7 variables: \describe{ \item{\code{row}}{a factor with levels \code{1:9}, the row number in Springall's dataset} \item{\code{col}}{a factor with levels \code{1:9}, the column number in Springall's dataset} \item{\code{win}}{integer, the number of wins for column treatment over row treatment} \item{\code{loss}}{integer, the number of wins for row treatment over column treatment} \item{\code{tie}}{integer, the number of ties between row and column treatments} \item{\code{win.adj}}{numeric, equal to \code{win + tie/2}} \item{\code{loss.adj}}{numeric, equal to \code{loss + tie/2}} } The \code{predictors} data frame has 9 observations (one for each treatment) on the following 5 variables: \describe{ \item{\code{flav}}{numeric, the flavour concentration} \item{\code{gel}}{numeric, the gel concentration} \item{\code{flav.2}}{numeric, equal to \code{flav^2}} \item{\code{gel.2}}{numeric, equal to \code{gel^2}} \item{\code{flav.gel}}{numeric, equal to \code{flav * gel}} } } \details{ The variables \code{win.adj} and \code{loss.adj} are provided in order to allow a simple way of handling ties (in which a tie counts as half a win and half a loss), which is slightly different numerically from the Rao and Kupper (1967) model that Springall (1973) uses. } \source{ Springall, A (1973) Response surface fitting using a generalization of the Bradley-Terry paired comparison method. \emph{Applied Statistics} \bold{22}, 59--68. } \references{ Rao, P. V. and Kupper, L. L. (1967) Ties in paired-comparison experiments: a generalization of the Bradley-Terry model. \emph{Journal of the American Statistical Association}, \bold{63}, 194--204. } \author{David Firth} \examples{ ## ## Fit the same response-surface model as in section 7 of ## Springall (1973). ## ## Differences from Springall's fit are minor, arising from the ## different treatment of ties. ## ## Springall's model in the paper does not include the random effect. ## In this instance, however, that makes no difference: the random-effect ## variance is estimated as zero. ## summary(springall.model <- BTm(cbind(win.adj, loss.adj), col, row, ~ flav[..] + gel[..] + flav.2[..] + gel.2[..] + flav.gel[..] + (1 | ..), data = springall)) } \keyword{datasets} BradleyTerry2/man/anova.BTm.Rd0000644000176200001440000000551412347612543015607 0ustar liggesusers\name{anova.BTm} \alias{anova.BTm} \title{ Compare Nested Bradley Terry Models } \description{ Compare nested models inheriting from class \code{"BTm"}. For models with no random effects, compute analysis of deviance table, otherwise compute Wald tests of additional terms. } \usage{ \method{anova}{BTm}(object, ..., dispersion = NULL, test = NULL) } \arguments{ \item{object, \dots}{ a fitted object of class inheriting from \code{"BTm"}, or a list of such objects. } \item{dispersion}{ a value for the dispersion. Not implemented for models with random effects. } \item{test}{ optional character string (partially) matching one of \code{"Chisq"}, \code{"F"} or \code{"Cp"} to specify that p-values should be returned. The Chisq test is a likelihood ratio test for models with no random effects, otherwise a Wald test. Options \code{"F"} and \code{"Cp"} are only applicable to models with no random effects, see \code{\link{stat.anova}}. } } \details{ For models with no random effects, an analysis of deviance table is computed using \code{\link{anova.glm}}. Otherwise, Wald tests are computed as detailed here. If a single object is specified, terms are added sequentially and a Wald statistic is computed for the extra parameters. If the full model includes player covariates and there are players with missing values over these covariates, then the \code{NULL} model will include a separate ability for these players. If there are missing values in any contest-level variables in the full model, the corresponding contests will be omitted throughout. The random effects structure of the full model is assumed for all sub-models. For a list of objects, consecutive pairs of models are compared by computing a Wald statistic for the extra parameters in the larger of the two models. The Wald statistic is always based on the variance-covariance matrix of the larger of the two models being compared. } \value{ An object of class \code{"anova"} inheriting from class \code{"data.frame"}. } \section{Warning}{ The comparison between two or more models will only be valid if they are fitted to the same dataset. This may be a problem if there are missing values and \R's default of \code{na.action = na.omit} is used. An error will be returned in this case. The same problem will occur when separate abilities have been estimated for different subsets of players in the models being compared. However no warning is given in this case. } \author{ Heather Turner } \seealso{ \code{\link{BTm}}, \code{\link{add1.BTm}} } \examples{ attach(flatlizards) result <- rep(1, nrow(contests)) BTmodel <- BTm(result, winner, loser, ~ throat.PC1[..] + throat.PC3[..] + head.length[..] + (1|..), data = list(contests, predictors), trace = TRUE) anova(BTmodel) } \keyword{ models }BradleyTerry2/man/CEMS.Rd0000644000176200001440000001625612465706552014563 0ustar liggesusers\name{CEMS} \alias{CEMS} \docType{data} \title{ Dittrich, Hatzinger and Katzenbeisser (1998, 2001) Data on Management School Preference in Europe } \description{ \emph{Community of European management schools} (CEMS) data as used in the paper by Dittrich et al. (1998, 2001), re-formatted for use with \code{\link{BTm}} } \usage{CEMS} \format{ A list containing three data frames, \code{CEMS$preferences}, \code{CEMS$students} and \code{CEMS$schools}. The \code{CEMS$preferences} data frame has \code{303 * 15 = 4505} observations (15 possible comparisons, for each of 303 students) on the following 8 variables: \describe{ \item{\code{student}}{a factor with levels \code{1:303}} \item{\code{school1}}{a factor with levels \code{c("Barcelona", "London", "Milano", "Paris", "St.Gallen", "Stockholm")}; the first management school in a comparison} \item{\code{school2}}{a factor with the same levels as \code{school1}; the second management school in a comparison} \item{\code{win1}}{integer (value 0 or 1) indicating whether \code{school1} was preferred to \code{school2}} \item{\code{win2}}{integer (value 0 or 1) indicating whether \code{school2} was preferred to \code{school1}} \item{\code{tied}}{integer (value 0 or 1) indicating whether no preference was expressed} \item{\code{win1.adj}}{numeric, equal to \code{win1 + tied/2}} \item{\code{win2.adj}}{numeric, equal to \code{win2 + tied/2}} } The \code{CEMS$students} data frame has 303 observations (one for each student) on the following 8 variables: \describe{ \item{\code{STUD}}{a factor with levels \code{c("other", "commerce")}, the student's main discipline of study} \item{\code{ENG}}{a factor with levels \code{c("good, poor")}, indicating the student's knowledge of English} \item{\code{FRA}}{a factor with levels \code{c("good, poor")}, indicating the student's knowledge of French} \item{\code{SPA}}{a factor with levels \code{c("good, poor")}, indicating the student's knowledge of Spanish} \item{\code{ITA}}{a factor with levels \code{c("good, poor")}, indicating the student's knowledge of Italian} \item{\code{WOR}}{a factor with levels \code{c("no", "yes")}, whether the student was in full-time employment while studying} \item{\code{DEG}}{a factor with levels \code{c("no", "yes")}, whether the student intended to take an international degree} \item{\code{SEX}}{a factor with levels \code{c("female", "male")} } } The \code{CEMS$schools} data frame has 6 observations (one for each management school) on the following 7 variables: \describe{ \item{\code{Barcelona}}{numeric (value 0 or 1)} \item{\code{London}}{numeric (value 0 or 1)} \item{\code{Milano}}{numeric (value 0 or 1)} \item{\code{Paris}}{numeric (value 0 or 1)} \item{\code{St.Gallen}}{numeric (value 0 or 1)} \item{\code{Stockholm}}{numeric (value 0 or 1)} \item{\code{LAT}}{numeric (value 0 or 1) indicating a 'Latin' city} } } \details{ The variables \code{win1.adj} and \code{win2.adj} are provided in order to allow a simple way of handling ties (in which a tie counts as half a win and half a loss), which is slightly different numerically from the Davidson (1970) method that is used by Dittrich et al. (1998): see the examples. } \source{ Royal Statistical Society datasets website, at \url{http://onlinelibrary.wiley.com/journal/10.1111/(ISSN)1467-9876/homepage/47_4.htm}. } \references{ Davidson, R. R. (1970) Extending the Bradley-Terry model to accommodate ties in paired comparison experiments. \emph{Journal of the American Statistical Association} \bold{65}, 317--328. Dittrich, R., Hatzinger, R. and Katzenbeisser, W. (1998) Modelling the effect of subject-specific covariates in paired comparison studies with an application to university rankings. \emph{Applied Statistics} \bold{47}, 511--525. Dittrich, R., Hatzinger, R. and Katzenbeisser, W. (2001) Corrigendum: Modelling the effect of subject-specific covariates in paired comparison studies with an application to university rankings. \emph{Applied Statistics} \bold{50}, 247--249. Turner, H. and Firth, D. (2012) Bradley-Terry models in R: The BradleyTerry2 package. \emph{Journal of Statistical Software}, \bold{48}(9), 1--21. } \author{David Firth} \examples{ ## ## Fit the standard Bradley-Terry model, using the simple 'add 0.5' ## method to handle ties: ## table3.model <- BTm(outcome = cbind(win1.adj, win2.adj), player1 = school1, player2 = school2, formula = ~.. , refcat = "Stockholm", data = CEMS) ## The results in Table 3 of Dittrich et al (2001) are reproduced ## approximately by a simple re-scaling of the estimates: table3 <- summary(table3.model)$coef[, 1:2]/1.75 print(table3) ## ## Now fit the 'final model' from Table 6 of Dittrich et al.: ## table6.model <- BTm(outcome = cbind(win1.adj, win2.adj), player1 = school1, player2 = school2, formula = ~ .. + WOR[student] * Paris[..] + WOR[student] * Milano[..] + WOR[student] * Barcelona[..] + DEG[student] * St.Gallen[..] + STUD[student] * Paris[..] + STUD[student] * St.Gallen[..] + ENG[student] * St.Gallen[..] + FRA[student] * London[..] + FRA[student] * Paris[..] + SPA[student] * Barcelona[..] + ITA[student] * London[..] + ITA[student] * Milano[..] + SEX[student] * Milano[..], refcat = "Stockholm", data = CEMS) ## ## Again re-scale to reproduce approximately Table 6 of Dittrich et ## al. (2001): ## table6 <- summary(table6.model)$coef[, 1:2]/1.75 print(table6) ## \dontrun{ ## Now the slightly simplified model of Table 8 of Dittrich et al. (2001): ## table8.model <- BTm(outcome = cbind(win1.adj, win2.adj), player1 = school1, player2 = school2, formula = ~ .. + WOR[student] * LAT[..] + DEG[student] * St.Gallen[..] + STUD[student] * Paris[..] + STUD[student] * St.Gallen[..] + ENG[student] * St.Gallen[..] + FRA[student] * London[..] + FRA[student] * Paris[..] + SPA[student] * Barcelona[..] + ITA[student] * London[..] + ITA[student] * Milano[..] + SEX[student] * Milano[..], refcat = "Stockholm", data = CEMS) table8 <- summary(table8.model)$coef[, 1:2]/1.75 ## ## Notice some larger than expected discrepancies here (the coefficients ## named "..Barcelona", "..Milano" and "..Paris") from the results in ## Dittrich et al. (2001). Apparently a mistake was made in Table 8 of ## the published Corrigendum note (R. Dittrich personal communication, ## February 2010). ## print(table8) } } \keyword{datasets} BradleyTerry2/man/citations.Rd0000644000176200001440000000321012347613544016010 0ustar liggesusers\name{citations} \alias{citations} \docType{data} \title{ Statistics Journal Citation Data from Stigler (1994) } \description{ Extracted from a larger table in Stigler (1994). Inter-journal citation counts for four journals, \dQuote{Biometrika}, \dQuote{Comm Statist.}, \dQuote{JASA} and \dQuote{JRSS-B}, as used on p448 of Agresti (2002). } \usage{citations} \format{ A 4 by 4 contingency table of citations, cross-classifed by the factors \code{cited} and \code{citing} each with levels \code{Biometrika}, \code{Comm Statist}, \code{JASA}, and \code{JRSS-B}. } \details{ In the context of paired comparisons, the \sQuote{winner} is the cited journal and the \sQuote{loser} is the one doing the citing. } \source{ Agresti, A. (2002) \emph{Categorical Data Analysis} (2nd ed). New York: Wiley. } \references{ Firth, D. (2005) Bradley-Terry models in R. \emph{Journal of Statistical Software} \bold{12}(1), 1--12. Turner, H. and Firth, D. (2012) Bradley-Terry models in R: The BradleyTerry2 package. \emph{Journal of Statistical Software}, \bold{48}(9), 1--21. Stigler, S. (1994) Citation patterns in the journals of statistics and probability. \emph{Statistical Science} \bold{9}, 94--108. } \seealso{\code{\link{BTm}}} \examples{ ## Data as a square table, as in Agresti p448 citations ## ## Convert frequencies to success/failure data: ## citations.sf <- countsToBinomial(citations) names(citations.sf)[1:2] <- c("journal1", "journal2") ## Standard Bradley-Terry model fitted to these data citeModel <- BTm(cbind(win1, win2), journal1, journal2, data = citations.sf) } \keyword{datasets} BradleyTerry2/man/predict.BTglmmPQL.Rd0000644000176200001440000000714112347613022017201 0ustar liggesusers\name{predict.BTglmmPQL} \alias{predict.BTglmmPQL} \title{ Predict Method for BTglmmPQL Objects } \description{ Obtain predictions and optionally standard errors of those predictions from a \code{"BTglmmPQL"} object. } \usage{ \method{predict}{BTglmmPQL}(object, newdata = NULL, newrandom = NULL, level = 1, type = c("link", "response", "terms"), se.fit = FALSE, terms = NULL, na.action = na.pass, ...) } \arguments{ \item{object}{ a fitted object of class \code{"BTglmmPQL"} } \item{newdata}{ (optional) a data frame in which to look for variables with which to predict. If omitted, the fitted linear predictors are used. } \item{newrandom}{ if \code{newdata} is provided, a corresponding design matrix for the random effects, will columns corresponding to the random effects estimated in the original model. } \item{level}{ an integer vector giving the level(s) at which predictions are required. Level zero corresponds to population-level predictions (fixed effects only), whilst level one corresponds to the individual-level predictions (full model) which are NA for contests involving individuals not in the original data. } \item{type}{ the type of prediction required. The default is on the scale of the linear predictors; the alternative \code{"response"} is on the scale of the response variable. Thus for a default binomial model the default predictions are of log-odds (probabilities on logit scale) and \code{type = "response"} gives the predicted probabilities. The \code{"terms"} option returns a matrix giving the fitted values of each term in the model formula on the linear predictor scale (fixed effects only). } \item{se.fit}{ logical switch indicating if standard errors are required. } \item{terms}{ with \code{type ="terms"} by default all terms are returned. A character vector specifies which terms are to be returned. } \item{na.action}{ function determining what should be done with missing values in \code{newdata}. The default is to predict \code{NA}. } \item{\dots}{ further arguments passed to or from other methods. } } \details{ If \code{newdata} is omitted the predictions are based on the data used for the fit. In that case how cases with missing values in the original fit are treated is determined by the \code{na.action} argument of that fit. If \code{na.action = na.omit} omitted cases will not appear in the residuals, whereas if \code{na.action = na.exclude} they will appear (in predictions and standard errors), with residual value \code{NA}. See also \code{napredict}. Standard errors for the predictions are approximated assuming the variance of the random effects is known, see Booth and Hobert (1998). } \value{ If \code{se.fit = FALSE}, a vector or matrix of predictions. If \code{se = TRUE}, a list with components \item{fit }{Predictions} \item{se.fit }{Estimated standard errors} } \references{ Booth, J. G. and Hobert, J. P. (1998). Standard errors of prediction in Generalized Linear Mixed Models. \emph{Journal of the American Statistical Association} \bold{93}(441), 262 -- 272. } \author{ Heather Turner } \seealso{ \code{\link{predict.glm}}, \code{\link{predict.BTm}} } \examples{ attach(seeds) seedsModel <- glmmPQL(cbind(r, n - r) ~ seed + extract, random = diag(length(r)), family = binomial) pred <- predict(seedsModel, level = 0) predTerms <- predict(seedsModel, type = "terms") all.equal(pred, rowSums(predTerms) + attr(predTerms, "constant")) } \keyword{ models } BradleyTerry2/man/plotProportions.Rd0000644000176200001440000002065612347613302017255 0ustar liggesusers\name{plotProportions} \alias{plotProportions} \title{ Plot Proportions of Tied Matches and Non-tied Matches Won } \description{ Plot proportions of tied matches and non-tied matches won by the first player, within matches binned by the relative player ability, as expressed by the probability that the first player wins, given the match is not a tie. Add fitted lines for each set of matches, as given by the generalized Davidson model. } \usage{ plotProportions(win, tie = NULL, loss, player1, player2, abilities = NULL, home.adv = NULL, tie.max = NULL, tie.scale = NULL, tie.mode = NULL, at.home1 = NULL, at.home2 = NULL, data = NULL, subset = NULL, bin.size = 20, xlab = "P(player1 wins | not a tie)", ylab = "Proportion", legend = NULL, col = 1:2, ...) } \arguments{ \item{win}{ a logical vector: \code{TRUE} if player1 wins, \code{FALSE} otherwise. } \item{tie}{ a logical vector: \code{TRUE} if the outcome is a tie, \code{FALSE} otherwise (\code{NULL} if there are no ties). } \item{loss}{ a logical vector: \code{TRUE} if player1 loses, \code{FALSE} otherwise. } \item{player1}{ an ID factor specifying the first player in each contest, with the same set of levels as \code{player2}. } \item{player2}{ an ID factor specifying the second player in each contest, with the same set of levels as \code{player2}. } \item{abilities}{ the fitted abilities from a generalized Davidson model (or a Bradley-Terry model). } \item{home.adv}{ if applicable, the fitted home advantage parameter from a generalized Davidson model (or a Bradley-Terry model). } \item{tie.max}{ the fitted parameter from a generalized Davidson model corresponding to the maximum tie probability. } \item{tie.scale}{ if applicable, the fitted parameter from a generalized Davidson model corresponding to the scale of dependence of the tie probability on the probability that \code{player1} wins, given the outcome is not a draw. } \item{tie.mode}{ if applicable, the fitted parameter from a generalized Davidson model corresponding to the location of maximum tie probability, in terms of the probability that \code{player1} wins, given the outcome is not a draw. } \item{at.home1}{ a logical vector: \code{TRUE} if \code{player1} is at home, \code{FALSE} otherwise. } \item{at.home2}{ a logical vector: \code{TRUE} if \code{player2} is at home, \code{FALSE} otherwise. } \item{data}{ an optional data frame providing variables required by the model, with one observation per match. } \item{subset}{ an optional logical or numeric vector specifying a subset of observations to include in the plot. } \item{bin.size}{ the approximate number of matches in each bin. } \item{xlab}{ the label to use for the x-axis. } \item{ylab}{ the label to use for the y-axis. } \item{legend}{ text to use for the legend. } \item{col}{ a vector specifying colours to use for the proportion of non-tied matches won and the proportion of tied matches. } \item{\dots}{ further arguments passed to plot. } } \details{ If \code{home.adv} is specified, the results are re-ordered if necessary so that the home player comes first; any matches played on neutral ground are omitted. First the probability that the first player wins given that the match is not a tie is computed: \deqn{expit(home.adv + abilities[player1] - abilities[player2])} where \code{home.adv} and \code{abilities} are parameters from a generalized Davidson model that have been estimated on the log scale. The matches are then binned according to this probability, grouping together matches with similar relative ability between the first player and the second player. Within each bin, the proportion of tied matches is computed and these proportions are plotted against the mid-point of the bin. Then the bins are re-computed omitting the tied games and the proportion of non-tied matches won by the first player is found and plotted against the new mid-point. Finally curves are added for the probability of a tie and the conditional probability of win given the match is not a tie, under a generalized Davidson model with parameters as specified by \code{tie.max}, \code{tie.scale} and \code{tie.mode}. The function can also be used to plot the proportions of wins along with the fitted probability of a win under the Bradley-Terry model. } \note{ This function is designed for single match outcomes, therefore data aggregated over player pairs will need to be expanded. } \value{ A list of data frames: \item{win}{ a data frame comprising \code{prop.win}, the proportion of non-tied matches won by the first player in each bin and \code{bin.win}, the mid-point of each bin. } \item{tie}{ (when ties are present) a data frame comprising \code{prop.tie}, the proportion of tied matches in each bin and \code{bin.tie}, the mid-point of each bin. } } \author{ Heather Turner } \seealso{ \code{\link{GenDavidson}}, \code{\link{BTm}} } \examples{ #### A Bradley-Terry example using icehockey data ## Fit the standard Bradley-Terry model, ignoring home advantage standardBT <- BTm(outcome = result, player1 = visitor, player2 = opponent, id = "team", data = icehockey) ## comparing teams on a "level playing field" levelBT <- BTm(result, data.frame(team = visitor, home.ice = 0), data.frame(team = opponent, home.ice = home.ice), ~ team + home.ice, id = "team", data = icehockey) ## compare fit to observed proportion won ## exclude tied matches as not explicitly modelled here par(mfrow = c(1, 2)) plotProportions(win = result == 1, loss = result == 0, player1 = visitor, player2 = opponent, abilities = BTabilities(standardBT)[,1], data = icehockey, subset = result != 0.5, main = "Without home advantage") plotProportions(win = result == 1, loss = result == 0, player1 = visitor, player2 = opponent, home.adv = coef(levelBT)["home.ice"], at.home1 = 0, at.home2 = home.ice, abilities = BTabilities(levelBT)[,1], data = icehockey, subset = result != 0.5, main = "With home advantage") #### A generalized Davidson example using football data if (require(gnm)) { ## subset to first and last season for illustration football <- subset(football, season \%in\% c("2008-9", "2012-13")) ## convert to trinomial counts football.tri <- expandCategorical(football, "result", idvar = "match") ## add variable to indicate whether team playing at home football.tri$at.home <- !logical(nrow(football.tri)) ## fit Davidson model Dav <- gnm(count ~ GenDavidson(result == 1, result == 0, result == -1, home:season, away:season, home.adv = ~1, tie.max = ~1, at.home1 = at.home, at.home2 = !at.home) - 1, eliminate = match, family = poisson, data = football.tri) ## fit shifted & scaled Davidson model shifScalDav <- gnm(count ~ GenDavidson(result == 1, result == 0, result == -1, home:season, away:season, home.adv = ~1, tie.max = ~1, tie.scale = ~1, tie.mode = ~1, at.home1 = at.home, at.home2 = !at.home) - 1, eliminate = match, family = poisson, data = football.tri) ## diagnostic plots main <- c("Davidson", "Shifted & Scaled Davidson") mod <- list(Dav, shifScalDav) names(mod) <- main alpha <- names(coef(Dav)[-(1:2)]) ## use football.tri data so that at.home can be found, ## but restrict to actual match results par(mfrow = c(1,2)) for (i in 1:2) { coef <- parameters(mod[[i]]) plotProportions(result == 1, result == 0, result == -1, home:season, away:season, abilities = coef[alpha], home.adv = coef["home.adv"], tie.max = coef["tie.max"], tie.scale = coef["tie.scale"], tie.mode = coef["tie.mode"], at.home1 = at.home, at.home2 = !at.home, main = main[i], data = football.tri, subset = count == 1) } } } \keyword{ models } \keyword{ nonlinear } BradleyTerry2/man/seeds.Rd0000644000176200001440000000211112347613520015107 0ustar liggesusers\name{seeds} \alias{seeds} \docType{data} \title{ Seed Germination Data from Crowder (1978) } \description{ Data from Crowder(1978) giving the proportion of seeds germinated for 21 plates that were arranged according to a 2x2 factorial layout by seed variety and type of root extract. } \usage{seeds} \format{ A data frame with 21 observations on the following 4 variables. \describe{ \item{\code{r}}{the number of germinated seeds.} \item{\code{n}}{the total number of seeds.} \item{\code{seed}}{the seed variety.} \item{\code{extract}}{the type of root extract.} } } \source{ Crowder, M. (1978) Beta-Binomial ANOVA for proportions. \emph{Applied Statistics}, \bold{27}, 34--37. } \references{ Breslow, N. E. and Clayton, D. G. (1993) Approximate inference in Generalized Linear Mixed Models. \emph{Journal of the American Statistical Association}, \bold{88}(421), 9--25. } \seealso{\code{\link{glmmPQL}}} \examples{ attach(seeds) summary(glmmPQL(cbind(r, n - r) ~ seed + extract, random = diag(length(r)), family = binomial)) } \keyword{datasets} BradleyTerry2/man/baseball.Rd0000644000176200001440000000360312347613664015571 0ustar liggesusers\name{baseball} \alias{baseball} \docType{data} \title{ Baseball Data from Agresti (2002) } \description{ Baseball results for games in the 1987 season between 7 teams in the Eastern Division of the American League. } \usage{baseball} \format{ A data frame with 42 observations on the following 4 variables. \describe{ \item{\code{home.team}}{a factor with levels \code{Baltimore}, \code{Boston}, \code{Cleveland}, \code{Detroit}, \code{Milwaukee}, \code{New York}, \code{Toronto}.} \item{\code{away.team}}{a factor with levels \code{Baltimore}, \code{Boston}, \code{Cleveland}, \code{Detroit}, \code{Milwaukee}, \code{New York}, \code{Toronto}.} \item{\code{home.wins}}{a numeric vector.} \item{\code{away.wins}}{a numeric vector.} } } \source{ Page 438 of Agresti, A. (2002) \emph{Categorical Data Analysis} (2nd Edn.). New York: Wiley. } \references{ Firth, D. (2005) Bradley-Terry models in R. \emph{Journal of Statistical Software}, \bold{12}(1), 1--12. Turner, H. and Firth, D. (2012) Bradley-Terry models in R: The BradleyTerry2 package. \emph{Journal of Statistical Software}, \bold{48}(9), 1--21. } \note{This dataset is in a simpler format than the one described in Firth (2005).} \seealso{\code{\link{BTm}}} \examples{ ## This reproduces the analysis in Sec 10.6 of Agresti (2002). ## Simple Bradley-Terry model, ignoring home advantage: baseballModel1 <- BTm(cbind(home.wins, away.wins), home.team, away.team, data = baseball, id = "team") ## Now incorporate the "home advantage" effect baseball$home.team <- data.frame(team = baseball$home.team, at.home = 1) baseball$away.team <- data.frame(team = baseball$away.team, at.home = 0) baseballModel2 <- update(baseballModel1, formula = ~ team + at.home) ## Compare the fit of these two models: anova(baseballModel1, baseballModel2) } \keyword{datasets} BradleyTerry2/man/flatlizards.Rd0000644000176200001440000001534712465220564016345 0ustar liggesusers\name{flatlizards} \alias{flatlizards} \docType{data} \title{ Augrabies Male Flat Lizards: Contest Results and Predictor Variables } \description{ Data collected at Augrabies Falls National Park (South Africa) in September-October 2002, on the contest performance and background attributes of 77 male flat lizards (\emph{Platysaurus broadleyi}). The results of exactly 100 contests were recorded, along with various measurements made on each lizard. Full details of the study are in Whiting et al. (2006). } \usage{flatlizards} \format{ This dataset is a list containing two data frames: \code{flatlizards$contests} and \code{flatlizards$predictors}. The \code{flatlizards$contests} data frame has 100 observations on the following 2 variables: \describe{ \item{\code{winner}}{a factor with 77 levels \code{lizard003} ... \code{lizard189}.} \item{\code{loser}}{a factor with the same 77 levels \code{lizard003} ... \code{lizard189}.} } The \code{flatlizards$predictors} data frame has 77 observations (one for each of the 77 lizards) on the following 18 variables: \describe{ \item{\code{id}}{factor with 77 levels (3 5 6 ... 189), the lizard identifiers.} \item{\code{throat.PC1}}{numeric, the first principal component of the throat spectrum.} \item{\code{throat.PC2}}{numeric, the second principal component of the throat spectrum.} \item{\code{throat.PC3}}{numeric, the third principal component of the throat spectrum.} \item{\code{frontleg.PC1}}{numeric, the first principal component of the front-leg spectrum.} \item{\code{frontleg.PC2}}{numeric, the second principal component of the front-leg spectrum.} \item{\code{frontleg.PC3}}{numeric, the third principal component of the front-leg spectrum.} \item{\code{badge.PC1}}{numeric, the first principal component of the ventral colour patch spectrum.} \item{\code{badge.PC2}}{numeric, the second principal component of the ventral colour patch spectrum.} \item{\code{badge.PC3}}{numeric, the third principal component of the ventral colour patch spectrum.} \item{\code{badge.size}}{numeric, a measure of the area of the ventral colour patch.} \item{\code{testosterone}}{numeric, a measure of blood testosterone concentration.} \item{\code{SVL}}{numeric, the snout-vent length of the lizard.} \item{\code{head.length}}{numeric, head length.} \item{\code{head.width}}{numeric, head width.} \item{\code{head.height}}{numeric, head height.} \item{\code{condition}}{numeric, a measure of body condition.} \item{\code{repro.tactic}}{a factor indicating reproductive tactic; levels are \code{resident} and \code{floater}.} } } \details{ There were no duplicate contests (no pair of lizards was seen fighting more than once), and there were no tied contests (the result of each contest was clear). The variables \code{head.length}, \code{head.width}, \code{head.height} and \code{condition} were all computed as residuals (of directly measured head length, head width, head height and body mass index, respectively) from simple least-squares regressions on \code{SVL}. Values of some predictors are missing (\code{NA}) for some lizards, \sQuote{at random}, because of instrument problems unconnected with the value of the measurement being made. } \source{ The data were collected by Dr Martin Whiting, \url{http://whitinglab.com/?page_id=3380}, and they appear here with his kind permission. } \references{ Turner, H. and Firth, D. (2012) Bradley-Terry models in R: The BradleyTerry2 package. \emph{Journal of Statistical Software}, \bold{48}(9), 1--21. Whiting, M. J., Stuart-Fox, D. M., O'Connor, D., Firth, D., Bennett, N. C. and Blomberg, S. P. (2006). Ultraviolet signals ultra-aggression in a lizard. \emph{Animal Behaviour} \bold{72}, 353--363. } \seealso{\code{\link{BTm}}} \examples{ attach(flatlizards) ## ## Fit the standard Bradley-Terry model, using the bias-reduced ## maximum likelihood method: ## result <- rep(1, nrow(contests)) BTmodel <- BTm(result, winner, loser, br = TRUE, data = contests) summary(BTmodel) ## ## That's fairly useless, though, because of the rather small ## amount of data on each lizard. And really the scientific ## interest is not in the abilities of these particular 77 ## lizards, but in the relationship between ability and the ## measured predictor variables. ## ## So next fit (by maximum likelihood) a "structured" B-T model in ## which abilities are determined by a linear predictor. ## ## This reproduces results reported in Table 1 of Whiting et al. (2006): ## Whiting.model <- BTm(result, winner, loser, ~ throat.PC1[..] + throat.PC3[..] + head.length[..] + SVL[..], data = list(contests, predictors)) summary(Whiting.model) ## ## Equivalently, fit the same model using glmmPQL: ## Whiting.model <- BTm(result, winner, loser, ~ throat.PC1[..] + throat.PC3[..] + head.length[..] + SVL[..] + (1|..), sigma = 0, sigma.fixed = TRUE, data = list(contests, predictors)) summary(Whiting.model) ## ## But that analysis assumes that the linear predictor formula for ## abilities is _perfect_, i.e., that there is no error in the linear ## predictor. This will always be unrealistic. ## ## So now fit the same predictor but with a normally distributed error ## term --- a generalized linear mixed model --- by using the BTm ## function instead of glm. ## Whiting.model2 <- BTm(result, winner, loser, ~ throat.PC1[..] + throat.PC3[..] + head.length[..] + SVL[..] + (1|..), data = list(contests, predictors), trace = TRUE) summary(Whiting.model2) ## ## The estimated coefficients (of throat.PC1, throat.PC3, ## head.length and SVL are not changed substantially by ## the recognition of an error term in the model; but the estimated ## standard errors are larger, as expected. The main conclusions from ## Whiting et al. (2006) are unaffected. ## ## With the normally distributed random error included, it is perhaps ## at least as natural to use probit rather than logit as the link ## function: ## Whiting.model3 <- BTm(result, winner, loser, ~ throat.PC1[..] + throat.PC3[..] + head.length[..] + SVL[..] + (1|..), family = binomial(link = "probit"), data = list(contests, predictors), trace = TRUE) summary(Whiting.model3) BTabilities(Whiting.model3) ## Note the "separate" attribute here, identifying two lizards with ## missing values of at least one predictor variable ## ## Modulo the usual scale change between logit and probit, the results ## are (as expected) very similar to Whiting.model2. } \keyword{datasets} BradleyTerry2/man/glmmPQL.Rd0000644000176200001440000001650412347612773015341 0ustar liggesusers\name{glmmPQL} \alias{glmmPQL} \title{ PQL Estimation of Generalized Linear Mixed Models } \description{ Fits GLMMs with simple random effects structure via Breslow and Clayton's PQL algorithm. } \usage{ glmmPQL(fixed, random = NULL, family = binomial, data = NULL, subset = NULL, weights = NULL, offset = NULL, na.action = NULL, start = NULL, etastart = NULL, mustart = NULL, control = glmmPQL.control(...), sigma = 0.1, sigma.fixed = FALSE, model = TRUE, x = FALSE, contrasts = NULL, ...) } \arguments{ \item{fixed}{ a formula for the fixed effects. } \item{random}{ a design matrix for the random effects, with number of rows equal to the length of variables in \code{formula}. } \item{family}{ a description of the error distribution and link function to be used in the model. This can be a character string naming a family function, a family function or the result of a call to a family function. (See \code{\link{family}} for details of family functions.) } \item{data}{ an optional data frame, list or environment (or object coercible by \code{\link{as.data.frame}} to a data frame) containing the variables in the model. If not found in \code{data}, the variables are taken from \code{environment(formula)}, typically the environment from which \code{glmmPQL} called. } \item{subset}{ an optional logical or numeric vector specifying a subset of observations to be used in the fitting process. } \item{weights}{ an optional vector of \sQuote{prior weights} to be used in the fitting process. } \item{offset}{ an optional numeric vector to be added to the linear predictor during fitting. One or more \code{offset} terms can be included in the formula instead or as well, and if more than one is specified their sum is used. See \code{\link{model.offset}}. } \item{na.action}{ a function which indicates what should happen when the data contain \code{NA}s. The default is set by the \code{na.action} setting of \code{\link{options}}, and is \code{\link{na.fail}} if that is unset. } \item{start}{ starting values for the parameters in the linear predictor. } \item{etastart}{ starting values for the linear predictor. } \item{mustart}{ starting values for the vector of means. } \item{control}{ a list of parameters for controlling the fitting process. See the \code{\link{glmmPQL.control}} for details. } \item{sigma}{ a starting value for the standard deviation of the random effects. } \item{sigma.fixed}{ logical: whether or not the standard deviation of the random effects should be fixed at its starting value. } \item{model}{ logical: whether or not the model frame should be returned. } \item{x}{ logical: whether or not the design matrix for the fixed effects should be returned. } \item{contrasts}{ an optional list. See the \code{contrasts.arg} argument of \code{\link{model.matrix}}. } \item{\dots}{ arguments to be passed to \code{\link{glmmPQL.control}}. } } \details{ The GLMM is assumed to be of the form \ifelse{html}{\out{g(μ) = + Ze}}{ \deqn{g(\boldsymbol{\mu}) = \boldsymbol{X\beta} + \boldsymbol{Ze}}{ g(mu) = X * beta + Z * e}} where \eqn{g} is the link function, \ifelse{html}{\out{μ}}{\eqn{\boldsymbol{\mu}}{mu}} is the vector of means and \ifelse{html}{\out{X, Z}}{\eqn{\boldsymbol{X}, \boldsymbol{Z}}{X,Z}} are design matrices for the fixed effects \ifelse{html}{\out{β}}{\eqn{\boldsymbol{\beta}}{beta}} and random effects \ifelse{html}{\out{e}}{\eqn{\boldsymbol{e}}{e}} respectively. Furthermore the random effects are assumed to be i.i.d. \ifelse{html}{\out{N(0, σ2)}}{\eqn{N(0, \sigma^2)}{N(0, sigma^2)}}. } \value{ An object of class \code{"BTglmmPQL"} which inherits from \code{"glm"} and \code{"lm"}: \item{coefficients}{ a named vector of coefficients, with a \code{"random"} attribute giving the estimated random effects.} \item{residuals}{ the working residuals from the final iteration of the IWLS loop.} \item{random}{the design matrix for the random effects.} \item{fitted.values}{ the fitted mean values, obtained by transforming the linear predictors by the inverse of the link function.} \item{rank}{the numeric rank of the fitted linear model.} \item{family}{the \code{family} object used.} \item{linear.predictors}{the linear fit on link scale.} \item{deviance}{up to a constant, minus twice the maximized log-likelihood.} \item{aic}{a version of Akaike's \emph{An Information Criterion}, minus twice the maximized log-likelihood plus twice the number of parameters, computed by the \code{aic} component of the family.} \item{null.deviance}{the deviance for the null model, comparable with \code{deviance}.} \item{iter}{the numer of iterations of the PQL algorithm.} \item{weights}{the working weights, that is the weights in the final iteration of the IWLS loop.} \item{prior.weights}{the weights initially supplied, a vector of \code{1}'s if none were.} \item{df.residual}{the residual degrees of freedom.} \item{df.null}{the residual degrees of freedom for the null model.} \item{y}{if requested (the default) the \code{y} vector used. (It is a vector even for a binomial model.)} \item{x}{if requested, the model matrix.} \item{model}{if requested (the default), the model frame.} \item{converged}{logical. Was the PQL algorithm judged to have converged?} \item{call}{the matched call.} \item{formula}{the formula supplied.} \item{terms}{the \code{terms} object used.} \item{data}{the \code{data} argument used.} \item{offset}{the offset vector used.} \item{control}{the value of the \code{control} argument used.} \item{contrasts}{(where relevant) the contrasts used.} \item{xlevels}{(where relevant) a record of the levels of the factors used in fitting.} \item{na.action}{(where relevant) information returned by \code{model.frame} on the special handling of \code{NA}s.} \item{sigma}{the estimated standard deviation of the random effects} \item{sigma.fixed}{logical: whether or not \code{sigma} was fixed} \item{varFix}{the variance-covariance matrix of the fixed effects} \item{varSigma}{the variance of \code{sigma}} } \references{ Breslow, N. E. and Clayton, D. G. (1993) Approximate inference in Generalized Linear Mixed Models. \emph{Journal of the American Statistical Association} \bold{88}(421), 9--25. Harville, D. A. (1977) Maximum likelihood approaches to variance component estimation and to related problems. \emph{Journal of the American Statistical Association} \bold{72}(358), 320--338. } \author{ Heather Turner } \seealso{ \code{\link{predict.BTglmmPQL}},\code{\link{glmmPQL.control}},\code{\link{BTm}} } \examples{ ############################################### ## Crowder seeds example from Breslow & Clayton ############################################### attach(seeds) summary(glmmPQL(cbind(r, n - r) ~ seed + extract, random = diag(length(r)), family = binomial, data = seeds)) summary(glmmPQL(cbind(r, n - r) ~ seed*extract, random = diag(length(r)), family = binomial, data = seeds)) } \keyword{ models } BradleyTerry2/man/chameleons.Rd0000644000176200001440000000735012347613553016142 0ustar liggesusers\name{chameleons} \alias{chameleons} \docType{data} \title{ Male Cape Dwarf Chameleons: Measured Traits and Contest Outcomes } \description{ Data as used in the study by Stuart-Fox et al. (2006). Physical measurements made on 35 male Cape dwarf chameleons, and the results of 106 inter-male contests. } \usage{chameleons} \format{ A list containing three data frames: \code{chameleons$winner}, \code{chameleons$loser} and \code{chameleons$predictors}. The \code{chameleons$winner} and \code{chameleons$loser} data frames each have 106 observations (one per contest) on the following 4 variables: \describe{ \item{\code{ID}}{a factor with 35 levels \code{C01}, \code{C02}, ... , \code{C43}, the identity of the winning (or losing) male in each contest} \item{\code{prev.wins.1}}{integer (values 0 or 1), did the winner/loser of this contest win in an immediately previous contest?} \item{\code{prev.wins.2}}{integer (values 0, 1 or 2), how many of his (maximum) previous 2 contests did each male win?} \item{\code{prev.wins.all}}{integer, how many previous contests has each male won?} } The \code{chameleons$predictors} data frame has 35 observations, one for each male involved in the contests, on the following 7 variables: \describe{ \item{\code{ch.res}}{numeric, residuals of casque height regression on \code{SVL}, i.e. relative height of the bony part on the top of the chameleons' heads} \item{\code{jl.res}}{numeric, residuals of jaw length regression on \code{SVL}} \item{\code{tl.res}}{numeric, residuals of tail length regression on \code{SVL}} \item{\code{mass.res}}{numeric, residuals of body mass regression on \code{SVL} (body condition)} \item{\code{SVL}}{numeric, snout-vent length (body size)} \item{\code{prop.main}}{numeric, proportion (arcsin transformed) of area of the flank occupied by the main pink patch on the flank} \item{\code{prop.patch}}{numeric, proportion (arcsin transformed) of area of the flank occupied by the entire flank patch} } } \details{ The published paper mentions 107 contests, but only 106 contests are included here. Contest number 16 was deleted from the data used to fit the models, because it involved a male whose predictor-variables were incomplete (and it was the only contest involving that lizard, so it is uninformative). } \source{ The data were obtained by Dr Devi Stuart-Fox, \url{http://www.zoology.unimelb.edu.au/research/groups/animal/labs/stuart-fox/index.php}, and they are reproduced here with her kind permission. These are the same data that were used in Stuart-Fox, D. M., Firth, D., Moussalli, A. and Whiting, M. J. (2006) Multiple signals in chameleon contests: designing and analysing animal contests as a tournament. \emph{Animal Behaviour} \bold{71}, 1263--1271. } \author{David Firth} \examples{ ## ## Reproduce Table 3 from page 1268 of the above paper: ## summary(chameleon.model <- BTm(player1 = winner, player2 = loser, formula = ~ prev.wins.2 + ch.res[ID] + prop.main[ID] + (1|ID), id = "ID", data = chameleons)) ## ## Note that, although a per-chameleon random effect is specified as in the ## above [the term "+ (1|ID)"], the estimated variance for that random ## effect turns out to be zero in this case. The "prior experience" ## effect ["+ prev.wins.2"] in this analysis has explained most of the ## variation, leaving little for the ID-specific predictors to do. ## Despite that, two of the ID-specific predictors do emerge as ## significant. ## ## Test whether any of the other ID-specific predictors has an effect: ## add1(chameleon.model, ~ . + jl.res[ID] + tl.res[ID] + mass.res[ID] + SVL[ID] + prop.patch[ID]) } \keyword{datasets} BradleyTerry2/man/residuals.BTm.Rd0000644000176200001440000000503512347613344016474 0ustar liggesusers\name{residuals.BTm} \alias{residuals.BTm} \title{ Residuals from a Bradley-Terry Model } \description{ Computes residuals from a model object of class \code{"BTm"}. In additional to the usual options for objects inheriting from class \code{"glm"}, a \code{"grouped"} option is implemented to compute player-specific residuals suitable for diagnostic checking of a predictor involving player-level covariates. } \usage{ \method{residuals}{BTm}(object, type = c("deviance", "pearson", "working", "response", "partial", "grouped"), by = object$id, ...) } \arguments{ \item{object}{a model object for which \code{inherits(model, "BTm")} is \code{TRUE}.} \item{type}{the type of residuals which should be returned. The alternatives are: \code{"deviance"} (default), \code{"pearson"}, \code{"working"}, \code{"response"}, and \code{"partial"}.} \item{by}{the grouping factor to use when \code{type = "grouped"}.} \item{...}{arguments to pass on other methods.} } \details{ For \code{type} other than \code{"grouped"} see \code{\link{residuals.glm}}. For \code{type = "grouped"} the residuals returned are weighted means of working residuals, with weights equal to the binomial denominators in the fitted model. These are suitable for diagnostic model checking, for example plotting against candidate predictors. } \value{ A numeric vector of length equal to the number of players, with a \code{"weights"} attribute. } \author{ David Firth and Heather Turner } \references{ Firth, D. (2005) Bradley-Terry models in R. \emph{Journal of Statistical Software} \bold{12}(1), 1--12. Turner, H. and Firth, D. (2012) Bradley-Terry models in R: The BradleyTerry2 package. \emph{Journal of Statistical Software}, \bold{48}(9), 1--21. } \seealso{ \code{\link{BTm}}, \code{\link{BTabilities}} } \examples{ ## ## See ?springall ## springall.model <- BTm(cbind(win.adj, loss.adj), col, row, ~ flav[..] + gel[..] + flav.2[..] + gel.2[..] + flav.gel[..] + (1 | ..), data = springall) res <- residuals(springall.model, type = "grouped") with(springall$predictors, plot(flav, res)) with(springall$predictors, plot(gel, res)) ## Weighted least-squares regression of these residuals on any variable ## already included in the model yields slope coefficient zero: lm(res ~ flav, weights = attr(res, "weights"), data = springall$predictors) lm(res ~ gel, weights = attr(res, "weights"), data = springall$predictors) } \keyword{ models } BradleyTerry2/man/sound.fields.Rd0000644000176200001440000000743012347613610016412 0ustar liggesusers\name{sound.fields} \alias{sound.fields} \docType{data} \title{ Kousgaard (1984) Data on Pair Comparisons of Sound Fields } \description{ The results of a series of factorial subjective room acoustic experiments carried out at the Technical University of Denmark by A C Gade. } \usage{sound.fields} \format{ A list containing two data frames, \code{sound.fields$comparisons}, and \code{sound.fields$design}. The \code{sound.fields$comparisons} data frame has 84 observations on the following 8 variables: \describe{ \item{\code{field1}}{a factor with levels \code{c("000", "001", "010", "011", "100", "101", "110", "111")}, the first sound field in a comparison} \item{\code{field2}}{a factor with the same levels as \code{field1}; the second sound field in a comparison} \item{\code{win1}}{integer, the number of times that \code{field1} was preferred to \code{field2}} \item{\code{tie}}{integer, the number of times that no preference was expressed when comparing \code{field1} and \code{field2}} \item{\code{win2}}{integer, the number of times that \code{field2} was preferred to \code{field1}} \item{\code{win1.adj}}{numeric, equal to \code{win1 + tie/2}} \item{\code{win2.adj}}{numeric, equal to \code{win2 + tie/2}} \item{\code{instrument}}{a factor with 3 levels, \code{c("cello", "flute", "violin")}} } The \code{sound.fields$design} data frame has 8 observations (one for each of the sound fields compared in the experiment) on the following 3 variables: \describe{ \item{\code{a}}{a factor with levels \code{c("0", "1")}, the \emph{direct sound} factor (0 for \emph{obstructed sight line}, 1 for \emph{free sight line}); contrasts are sum contrasts} \item{\code{b}}{a factor with levels \code{c("0", "1")}, the \emph{reflection} factor (0 for \emph{-26dB}, 1 for \emph{-20dB}); contrasts are sum contrasts} \item{\code{c}}{a factor with levels \code{c("0", "1")}, the \emph{reverberation} factor (0 for \emph{-24dB}, 1 for \emph{-20dB}); contrasts are sum contrasts} } } \details{ The variables \code{win1.adj} and \code{win2.adj} are provided in order to allow a simple way of handling ties (in which a tie counts as half a win and half a loss), which is slightly different numerically from the Davidson (1970) method that is used by Kousgaard (1984): see the examples. } \source{ Kousgaard, N. (1984) Analysis of a Sound Field Experiment by a Model for Paired Comparisons with Explanatory Variables. \emph{Scandinavian Journal of Statistics} \bold{11}, 51--57. } \references{ Davidson, R. R. (1970) Extending the Bradley-Terry model to accommodate ties in paired comparison experiments. \emph{Journal of the American Statistical Association} \bold{65}, 317--328. } \author{David Firth} \examples{ ## ## Fit the Bradley-Terry model to data for flutes, using the simple 'add 0.5' ## method to handle ties: ## flutes.model <- BTm(cbind(win1.adj, win2.adj), field1, field2, ~ field, id = "field", subset = (instrument == "flute"), data = sound.fields) ## ## This agrees (after re-scaling) quite closely with the estimates given ## in Table 3 of Kousgaard (1984): ## table3.flutes <- c(-0.581, -1.039, 0.347, 0.205, 0.276, 0.347, 0.311, 0.135) plot(c(0, coef(flutes.model)), table3.flutes) abline(lm(table3.flutes ~ c(0, coef(flutes.model)))) ## ## Now re-parameterise that model in terms of the factorial effects, as ## in Table 5 of Kousgaard (1984): ## flutes.model.reparam <- update(flutes.model, formula = ~ a[field] * b[field] * c[field] ) table5.flutes <- c(.267, .250, -.088, -.294, .062, .009, -0.070) plot(coef(flutes.model.reparam), table5.flutes) abline(lm(table5.flutes ~ coef(flutes.model.reparam))) } \keyword{datasets} BradleyTerry2/man/BTabilities.Rd0000644000176200001440000000534212347612644016216 0ustar liggesusers\name{BTabilities} \alias{BTabilities} \alias{print.BTabilities} \alias{coef.BTabilities} \alias{vcov.BTabilities} \title{ Estimated Abilities from a Bradley-Terry Model } \description{ Computes the (baseline) ability of each player from a model object of class \code{"BTm"}. } \usage{ BTabilities(model) } \arguments{ \item{model}{a model object for which \code{inherits(model, "BTm")} is \code{TRUE}} } \value{ A two-column numeric matrix (of class \code{c("BTabilities", "matrix")}, with columns named \code{"ability"} and \code{"se"}; has one row for each player; has attributes named \code{"vcov"}, \code{"modelcall"}, \code{"factorname"} and (sometimes --- see below) \code{"separate"}. The first three attributes are not printed by the method \code{print.BTabilities}. The player abilities are either directly estimated by the model, in which case the appropriate parameter estimates are returned, otherwise the abilities are computed from the terms of the fitted model that involve player covariates only (those indexed by \code{model$id} in the model formula). Thus parameters in any other terms are assumed to be zero. If the abilities are structured according to a linear predictor, and if there are player covariates with missing values, the abilities for the corresponding players are estimated as separate parameters. In this event the resultant matrix has an attribute, named \code{"separate"}, which identifies those players whose ability was estimated separately. For an example, see \code{\link{flatlizards}}. } \author{ David Firth and Heather Turner } \references{ Firth, D. (2005) Bradley-Terry models in R. \emph{Journal of Statistical Software}, \bold{12}(1), 1--12. Turner, H. and Firth, D. (2012) Bradley-Terry models in R: The BradleyTerry2 package. \emph{Journal of Statistical Software}, \bold{48}(9), 1--21. } \seealso{ \code{\link{BTm}}, \code{\link{residuals.BTm}} } \examples{ ### citations example ## Convert frequencies to success/failure data citations.sf <- countsToBinomial(citations) names(citations.sf)[1:2] <- c("journal1", "journal2") ## Fit the "standard" Bradley-Terry model citeModel <- BTm(cbind(win1, win2), journal1, journal2, data = citations.sf) BTabilities(citeModel) ### baseball example baseball$home.team <- data.frame(team = baseball$home.team, at.home = 1) baseball$away.team <- data.frame(team = baseball$away.team, at.home = 0) baseballModel2 <- BTm(cbind(home.wins, away.wins), home.team, away.team, formula = ~ team + at.home, id = "team", data = baseball) ## Estimated abilities for each team, relative to Baltimore, when ## playing away from home: BTabilities(baseballModel2) } \keyword{ models } BradleyTerry2/man/glmmPQL.control.Rd0000644000176200001440000000434712347612747017023 0ustar liggesusers\name{glmmPQL.control} \alias{glmmPQL.control} \title{ Control Aspects of the glmmPQL Algorithm } \description{ Set control variables for the glmmPQL algorithm. } \usage{ glmmPQL.control(maxiter = 50, IWLSiter = 10, tol = 1e-06, trace = FALSE) } \arguments{ \item{maxiter}{ the maximum number of outer iterations. } \item{IWLSiter}{ the maximum number of iterated weighted least squares iterations used to estimate the fixed effects, given the standard deviation of the random effects. } \item{tol}{ the tolerance used to determine convergence in the IWLS iterations and over all (see details). } \item{trace}{ logical: whether or not to print the score for the random effects variance at the end of each iteration. } } \details{ This function provides an interface to control the PQL algorithm used by \code{\link{BTm}} for fitting Bradley Terry models with random effects. The algorithm iterates between a series of iterated weighted least squares iterations to update the fixed effects and a single Fisher scoring iteration to update the standard deviation of the random effects. Convergence of both the inner and outer iterations are judged by comparing the squared components of the relevant score vector with corresponding elements of the diagonal of the Fisher information matrix. If, for all components of the relevant score vector, the ratio is less than \code{tolerance^2}, or the corresponding diagonal element of the Fisher information matrix is less than 1e-20, iterations cease. } \value{ A list with the arguments as components. } \references{ Breslow, N. E. and Clayton, D. G. (1993), Approximate inference in Generalized Linear Mixed Models. \emph{Journal of the American Statistical Association} \bold{88}(421), 9--25. } \author{ Heather Turner } \seealso{\code{\link{glmmPQL}}, \code{\link{BTm}} } \examples{ ## Variation on example(flatlizards) attach(flatlizards) result <- rep(1, nrow(contests)) ## BTm passes arguments on to glmmPQL.control() args(BTm) BTmodel <- BTm(result, winner, loser, ~ throat.PC1[..] + throat.PC3[..] + head.length[..] + SVL[..] + (1|..), data = list(contests, predictors), tol = 1e-3, trace = TRUE) summary(BTmodel) } \keyword{ models } BradleyTerry2/man/football.Rd0000644000176200001440000000440512465406634015625 0ustar liggesusers\name{football} \alias{football} \docType{data} \title{ English Premier League Football Results 2008/9 to 2012/13 } \description{ The win/lose/draw results for five seasons of the English Premier League football results, from 2008/9 to 2012/13 } \usage{football} \format{ A data frame with 1881 observations on the following 4 variables. \describe{ \item{\code{season}}{a factor with levels \code{2008-9}, \code{2009-10}, \code{2010-11}, \code{2011-12}, \code{2012-13}} \item{\code{home}}{a factor specifying the home team, with 29 levels \code{Ars} (Arsenal), ... , \code{Wol} (Wolverhampton)} \item{\code{away}}{a factor specifying the away team, with the same levels as \code{home}.} \item{\code{result}}{a numeric vector giving the result for the home team: 1 for a win, 0 for a draw, -1 for a loss.} } } \details{ In each season, there are 20 teams, each of which plays one home game and one away game against all the other teams in the league. The results in 380 games per season. } \source{ These data were downloaded from http://soccernet.espn.go.com in 2013. The site has since moved and the new site does not appear to have an equivalent source. } \references{ Davidson, R. R. (1970). On extending the Bradley-Terry model to accommodate ties in paired comparison experiments. \emph{Journal of the American Statistical Association}, \bold{65}, 317--328. } \seealso{\code{\link{GenDavidson}}} \examples{ ### example requires gnm if (require(gnm)) { ### convert to trinomial counts football.tri <- expandCategorical(football, "result", idvar = "match") head(football.tri) ### add variable to indicate whether team playing at home football.tri$at.home <- !logical(nrow(football.tri)) ### fit Davidson model for ties ### - subset to first and last season for illustration Davidson <- gnm(count ~ GenDavidson(result == 1, result == 0, result == -1, home:season, away:season, home.adv = ~1, tie.max = ~1, at.home1 = at.home, at.home2 = !at.home) - 1, eliminate = match, family = poisson, data = football.tri, subset = season \%in\% c("2008-9", "2012-13")) ### see ?GenDavidson for further analysis } } \keyword{datasets} BradleyTerry2/man/predict.BTm.Rd0000644000176200001440000001121012347613320016115 0ustar liggesusers\name{predict.BTm} \alias{predict.BTm} \title{ Predict Method for Bradley-Terry Models } \description{ Obtain predictions and optionally standard errors of those predictions from a fitted Bradley-Terry model. } \usage{ \method{predict}{BTm}(object, newdata = NULL, level = 1, type = c("link", "response", "terms"), se.fit = FALSE, dispersion = NULL, terms = NULL, na.action = na.pass, ...) } \arguments{ \item{object}{a fitted object of class \code{"BTm"}} \item{newdata}{(optional) a data frame in which to look for variables with which to predict. If omitted, the fitted linear predictors are used.} \item{level}{for models with random effects: an integer vector giving the level(s) at which predictions are required. Level zero corresponds to population-level predictions (fixed effects only), whilst level one corresponds to the player-level predictions (full model) which are NA for contests involving players not in the original data.} \item{type}{the type of prediction required. The default is on the scale of the linear predictors; the alternative \code{"response"} is on the scale of the response variable. Thus for a default Bradley-Terry model the default predictions are of log-odds (probabilities on logit scale) and \code{type = "response"} gives the predicted probabilities. The \code{"terms"} option returns a matrix giving the fitted values of each term in the model formula on the linear predictor scale (fixed effects only).} \item{se.fit}{logical switch indicating if standard errors are required.} \item{dispersion}{a value for the dispersion, not used for models with random effects. If omitted, that returned by \code{summary} applied to the object is used, where applicable.} \item{terms}{with \code{type ="terms"} by default all terms are returned. A character vector specifies which terms are to be returned.} \item{na.action}{function determining what should be done with missing values in \code{newdata}. The default is to predict \code{NA}.} \item{\dots}{further arguments passed to or from other methods.} } \details{ If \code{newdata} is omitted the predictions are based on the data used for the fit. In that case how cases with missing values in the original fit are treated is determined by the \code{na.action} argument of that fit. If \code{na.action = na.omit} omitted cases will not appear in the residuals, whereas if \code{na.action = na.exclude} they will appear (in predictions and standard errors), with residual value \code{NA}. See also \code{napredict}. } \value{ If \code{se.fit = FALSE}, a vector or matrix of predictions. If \code{se = TRUE}, a list with components \item{fit }{Predictions} \item{se.fit }{Estimated standard errors} } \author{ Heather Turner } \seealso{ \code{\link{predict.glm}}, \code{\link{predict.glmmPQL}} } \examples{ ## The final model in example(flatlizards) attach(flatlizards) Whiting.model3 <- BTm(1, winner, loser, ~ throat.PC1[..] + throat.PC3[..] + head.length[..] + SVL[..] + (1|..), family = binomial(link = "probit"), data = list(contests, predictors), trace = TRUE) ## `new' data for contests between four of the original lizards ## factor levels must correspond to original levels, but unused levels ## can be dropped - levels must match rows of predictors newdata <- list(contests = data.frame( winner = factor(c("lizard048", "lizard060"), levels = c("lizard006", "lizard011", "lizard048", "lizard060")), loser = factor(c("lizard006", "lizard011"), levels = c("lizard006", "lizard011", "lizard048", "lizard060")) ), predictors = predictors[c(3, 6, 27, 33), ]) predict(Whiting.model3, level = 1, newdata = newdata) ## same as predict(Whiting.model3, level = 1)[1:2] ## introducing a new lizard newpred <- rbind(predictors[c(3, 6, 27), c("throat.PC1","throat.PC3", "SVL", "head.length")], c(-5, 1.5, 1, 0.1)) rownames(newpred)[4] <- "lizard059" newdata <- list(contests = data.frame( winner = factor(c("lizard048", "lizard059"), levels = c("lizard006", "lizard011", "lizard048", "lizard059")), loser = factor(c("lizard006", "lizard011"), levels = c("lizard006", "lizard011", "lizard048", "lizard059")) ), predictors = newpred) ## can only predict at population level for contest with new lizard predict(Whiting.model3, level = 0:1, se.fit = TRUE, newdata = newdata) } \keyword{ models }