mclogit: Multinomial Logit Models, with or without Random Effects or Overdispersion Technical documentation

Technical documentation¶

  • The relation between baseline logit and conditional logit models
  • The IWLS algorithm used to fit conditional logit models
  • Approximate Inference for Multinomial Logit Models with Random Effects

Logo

  • Home / News
  • Research interests
  • Publications
    • Books
      • Data Management in R: A Guide for Social Scientists
        • Introduction
          • Variables and Objects
          • Saving and loading objects
          • Running scripts
        • Building Blocks of Data
          • Basic Data Types
            • Numeric vectors
            • Logical vectors
            • Character vectors
            • Factors
          • Basic Data Manipulation
            • Extracting and replacing elements of a vector
            • Reordering and sorting elements of a vector
            • Regular sequences
            • Sampling from vectors
          • Complex Data Types
            • Lists
            • Attributes
        • Data Frames and their Management
          • The Structure of Data Frames
            • The structure of data frames
              • Data frame construction
              • In what follows we treat the data frame ‘UK’ as a list:
              • In the next few lines show the selection of rows and columns of a data frame
          • Accessing and Changing Variables in Data Frames
            • Accessing and changing variables
              • with() versus attach()
              • Changing variables within a data frame
          • Manipulating Data Frames
            • Creating subsets of data frames
            • Merging data frames: An example with data from the British Election Study
            • Merging data frames: An example with artificial data
            • Appending data frames
            • Reshaping data frames: An example with artificial data
            • Reshaping data frames: An example with data from the British Election Study
            • Sorting data frames
          • Aggregating Data Frames
            • Aggregating data frames
          • Groupwise computations within Data Frames
            • Groupwise computations within data frames
          • Importing Data into Data Frames
            • Importing data into data frames
              • Importing data from text files
              • Importing data from other statistics packages
        • Data Tables and the “Tidyverse”
          • Data Tables
            • Creating data tables
            • Subsetting data tables
            • Summarizing data tables
            • Modifying data tables
          • The Tidyverse
            • Importing data with the haven package
            • Subsetting data with dplyr
            • Summarizing data with dplyr
            • Modifying data with the dplyr package
          • A Comparison between the Approaches
            • Preparing example data for the benchmark study
            • Benchmark study: Computing group summaries
            • Benchmark study: Modifying data within groups
            • Summary of the benchmark study
          • Tidying Data Using the tidyr Package
            • Reshaping data to long format with tidyr
            • Reshaping data to wide format with tidyr
            • Filling and completing with tidyr
        • Social Science Surveys
          • Importing survey data
            • Importing data from the British Election Study in SPSS format
            • Importing ASCII format data from the American National Election Study
          • Recoding and other transformations
            • Recoding data from the British Election Study
            • Combining variables using case distinctions
        • Data from Complex Samples
          • Survey Design Objects
            • Constructing a survey design object from a data frame
            • Constructing a survey design object from data of the 2016 American Election Study.
          • Survey Replication Weights
            • Using the replicate weights provided with CHIS data
            • Creating replicate weights for a survey design object (with ANES 2016 data).
          • Poststratification, Raking, and Calibration
            • Poststratification of 2016 American National Election Study data
            • Raking 2016 American National Election Study data
            • Calibrating 2016 ANES data by linear regression.
            • Comparing poststratification, raking, and calibration with ANES data
        • Dates, Times, and Time Series
          • Dates and Times
            • Date objects and date formatting
            • Date arithmetic
            • POSIXct time objects
            • Time arithmetic
            • POSIXlt time objects
            • Creation of date and time data for given years, months, and days
            • Time differences
          • Time Series
            • Regular time series
              • Approval of US presidents
              • OECD unemployment data
              • Artificial time series data
              • Time arithmetic
            • Irregular time series and the zoo package
              • Creating a “zoo” object from the “presidents” time series
              • Creating a “zoo” object from OECD unemployment data
              • Subsetting “zoo” objects
              • Handling missing values
              • Rolling statistics
              • Time arithmetics with “zoo” objects
              • Merging (multivariate) time series
              • Importing data into “zoo” objects
        • Spatial and Geographical data
          • The Structure of Spatial Data
            • The structure of objects of classes defined in the sp package
            • The structure of objects of classes defined in the sf package
            • Converting “sp” objects to “sf” objects
          • Spatial Relations and Operations
            • Spatial relations
            • Properties of spatial objects
            • Unions and intersections (of artificial geometric objects)
            • Subsetting spatial feature objects
            • Aggregating spatial feature objects
          • Cartographic Projections
            • Geographical projections of a mainland USA map
          • Geographical Data Files
            • Importing shapefiles
            • Importing geographical data from OpenStreetMap
        • Text as Data
          • Character Strings
            • Basic operations on character strings
              • length() versus nchar()
              • Character vector subsets versus substrings
              • Finding patterns within character strings and character vectors
              • Replacing patterns within character strings and character vectors
            • Counting words in the UK party manifesto on occasion of the 2017 election
          • Text Corpora with the tm Package
            • A simple example for the usage of the tm package
            • An example for the use of tm on data from the Manifesto Project
          • Improvements Provided by the quanteda Package
            • A basic example for the usage of the quanteda package
            • Obtaining tokens in text documents using quanteda
            • Preparing Manifesto Project data using quanteda
    • Articles in peer reviewed journals
      • Multilevel Analysis with Few Clusters: Improving Likelihood-based Methods
      • Method Factors in Democracy Indicators
      • Social Cleavages and Electoral Behaviour in Long-Term Perspective
      • A Dynamic State-Space Model of Coded Political Texts
      • Bounded Volatility in the Dutch Electoral Battlefield
      • Stability or Decline? Class, Religion and the Vote in Germany
      • Social Divisions, Party Positions, and Electoral Behaviour
      • Ignoramus, Ignorabimus? On Uncertainty in Ecological Inference
      • The Decline of Social Cleavages in Western Europe Revisited
      • Politicisation, Economic Development, and Political Interest in Europe
    • Book contributions
      • All Gone? Change and Persistence in the Impact of Social Cleavages on Voting Behavior in Germany since 1949
      • Der Einfluss des politischen Kontextes auf die Ausformung einer Parteiidentifikation
        • Replicationsmaterial
          • Vorbereitung
            • Benötigte Pakete
            • Daten der GLES
          • Analysen für Westdeutschland
            • Teildatensatz für Westdeutschland
            • Konstruktion des Basismodells
            • Graphische Darstellung relevanter Effekte im Basismodell
              • Zusammenhang mit Alter
              • Einfluss des Elternhauses
              • Einfluss des Bundeslandes
            • Erkundung des Effektes der Regierungsbeteiligung auf Bundesebene
              • Effekt der Regierungsbeteiligung bei unterschiedlichem Alter
            • Erkundung des Effektes der Regierungsbeteiligung auf Landesebene
              • Effekt der Regierungsbeteiligung bei unterschiedlichem Alter
              • Effekt der Regierungsbeteiligung mit unterschiedlichem Lag
    • Research Reports
  • Working papers
    • Transformation of Religious Cleavages in Western Europe
    • On Models for Categorical Dependent Variables
    • The RiLe Index of Party Ideology - A Reductio
    • Education and Voting in Germany in Long-Term Perspective
    • Valence or Position? Unified Conception of Party Competition
    • Political Context and the Formation of Party Identification in the United States
    • A New Approach to the Analysis of Tactical Voting
    • Strategic Voting and Ticket-Splitting in Germany
    • Party Families and Conceptions of Party Ideology
    • The Political Demobilisation of the Working Class in Germany
    • Campaign Dynamics and Strategic Voting in UK Parliamentary Elections
    • On the Distinctiveness of Party Families
    • Measuring Politcal Knowledge: The Problem of Cross-National Equivalence
  • Data
    • Data on Parties’ Positions in Multiple Dimensions across Time and Space
  • Teaching
    • Topics
      • Political Sociology and Political Behaviour
      • Comparative Politics
      • Social Science Research Methods
    • Institutions
      • Zeppelin-Universität Friedrichshafen
      • Universität Konstanz
      • University Essex, Department of Government
      • Universität Mannheim
      • Essex Summer School in Data Analysis and Collection
      • GESIS - Mathematical Tools for Social Scientists
  • Software
    • memisc: Management of Survey Data and Presentation of Analysis Results
      • "memisc" on CRAN
      • "memisc" on GitHub
      • Documentation
        • User guides
          • Handling Questionnaire Items
            • Motivation
            • Standard attributes of survey items
              • Value labels
              • Missing values
              • Other attributes of survey items
              • Codebooks of survey items
            • Data sets: Containers of survey items
              • The structure of “data.set” objects
              • Manipulating data in data sets
              • Codebooks of data sets
              • Translating data sets into data frames
            • More tools for data preparation
              • Recoding
              • Case distinctions
          • Importing Data from SPSS and Stata
            • Motivation
            • The role of “importer” objects
            • Importing data from SPSS files
              • Importing from a SPSS “system” file
              • Import from a SPSS “portable” file
              • Import from a fixed-width file accompanied by SPSS syntax
            • Importing data from a Stata file
          • Creating tables of model estimates
            • The “mtable” function
            • Choosing what information is presented in the table and how
              • Estimates, standard errors, confidence intervals etc.
              • Summary statistics
            • Exporting mtable results
              • LaTeX Format
              • Text file format (tab-delimited and “CSV”)
              • HTML (for web-pages, knitr reports and word processors)
            • Adapting mtable to new model classes and other tricks - the API of mtable
              • A demonstration: “mtable” and sandwich estimators of variance
          • Generating Tables of Descriptive Statistics
            • Motivation
            • Creating Tables of Descriptive Statistics
            • Formatting Tables of Descriptive Statistics
          • Combining Tables
          • Example: The American Election Study 1948
            • Introduction
            • Reading In a “Portable” SPSS Data File
              • Reading In a Subset of the Data
            • Analysis
              • Some Descriptive Analyses
              • Logit Modelling of Candidate Choice
        • Manual pages
          • Memisc
            • Description
            • Data preparation and management
              • Survey Items
              • More Convenient Import of External Data
              • Recoding
              • Code Books
            • Data Analysis
              • Tables and Data Frames of Descriptive Statistics
              • Per-Subset Analysis
            • Presentation of Results of Statistical Analysis
              • Publication-Ready Tables of Coefficients
              • LaTeX Representation of R Objects
            • Programming
              • Looping over Variables
              • Changing Names of Objects and Labels of Factors
              • Dimension-Preserving Versions of lapply and sapply
              • Combining Vectors and Arrays by Names
              • Reordering of Matrices and Arrays
          • By
            • Description
            • Usage
            • Arguments
            • Value
            • Examples
          • Descriptives
            • Description
            • Usage
            • Arguments
            • Value
            • Examples
          • foreach
            • Description
            • Usage
            • Arguments
            • Examples
          • Groups
            • Description
            • Usage
            • Arguments
            • Details
            • Examples
          • Iconv
            • Description
            • Usage
            • Arguments
            • Value
            • See also
            • Examples
          • List
            • Description
            • Usage
            • Arguments
            • Examples
          • Reshape
            • Description
            • Usage
            • Arguments
            • Examples
          • Sapply
            • Description
            • Usage
            • Arguments
            • Value
            • Examples
          • Substitute
            • Description
            • Usage
            • Arguments
            • Value
            • Details
            • Examples
          • Table
            • Description
            • Usage
            • Arguments
            • Value
            • Examples
          • Write
            • Description
            • Usage
            • Arguments
          • annotations
            • Description
            • Usage
            • Arguments
            • Value
            • Examples
          • applyTemplate
            • Description
            • Usage
            • Arguments
            • Value
            • Details
            • Examples
          • as.array
            • Description
            • Usage
            • Arguments
            • Value
            • Examples
          • as.symbols
            • Description
            • Usage
            • Arguments
            • Value
            • Examples
          • cases
            • Description
            • Usage
            • Arguments
            • Value
            • Details
            • Examples
          • codebook
            • Description
            • Usage
            • Arguments
            • Value
            • Examples
          • codeplan
            • Description
            • Usage
            • Arguments
            • Value
            • Examples
          • collect
            • Description
            • Usage
            • Arguments
            • Value
            • Examples
          • contr
            • Description
            • Usage
            • Arguments
            • Value
            • Examples
          • data.set
            • Description
            • Usage
            • Arguments
            • Value
            • Details
            • Examples
          • data.set manipulation
            • Description
            • Usage
            • Arguments
            • Examples
          • deduplicate_labels
            • Description
            • Usage
            • Arguments
            • Value
            • Examples
          • dimrename
            • Description
            • Usage
            • Arguments
            • Value
            • Details
            • Examples
          • duplicated_labels
            • Description
            • Usage
            • Arguments
            • Value
            • Examples
          • format_html
            • Description
            • Usage
            • Arguments
            • Value
          • format_html.codebook
            • Description
            • Usage
            • Arguments
            • See also
          • format_html.ftable
            • Description
            • Usage
            • Arguments
            • See also
          • ftable-matrix
            • Description
            • Usage
            • Arguments
            • Value
            • Examples
          • genTable
            • Description
            • Usage
            • Arguments
            • Value
            • Details
            • See also
            • Examples
          • getSummary
            • Description
            • Usage
            • Arguments
            • Value
            • Details
          • html
            • Description
            • Usage
            • Arguments
            • Details
            • Examples
          • importers
            • Description
            • Usage
            • Arguments
            • Value
            • Details
            • See also
            • Examples
          • items
            • Description
            • Usage
            • Arguments
            • See also
            • Examples
          • items-to-vectors
            • Description
            • Usage
            • Arguments
            • Value
            • See also
            • Examples
          • labels
            • Description
            • Usage
            • Arguments
            • Examples
          • measurement
            • Description
            • Usage
            • Arguments
            • Value
            • See also
            • Examples
          • memisc-deprecated
            • Description
            • Usage
            • Arguments
          • mtable
            • Description
            • Usage
            • Arguments
            • Value
            • Details
            • Examples
          • mtable_format_delim
            • Description
            • Usage
            • Arguments
            • Value
          • mtable_format_html
            • Description
            • Usage
            • Arguments
            • Value
            • Examples
          • mtable_format_latex
            • Description
            • Usage
            • Arguments
            • Value
          • mtable_format_print
            • Description
            • Usage
            • Arguments
            • Value
          • negative match
            • Description
            • Usage
            • Arguments
            • Value
            • Examples
          • percent
            • Description
            • Usage
            • Arguments
            • Value
            • Examples
          • percentages
            • Description
            • Usage
            • Arguments
            • Value
            • Examples
          • query
            • Description
            • Usage
            • Arguments
            • Value
            • Examples
          • recode
            • Description
            • Usage
            • Arguments
            • Value
            • Details
            • See also
            • Examples
          • relabel
            • Description
            • Usage
            • Arguments
            • Value
            • Details
            • Examples
          • rename
            • Description
            • Usage
            • Arguments
            • Value
            • Details
            • Examples
          • reorder.array
            • Description
            • Usage
            • Arguments
            • Value
            • Details
            • See also
            • Examples
          • retain
            • Description
            • Usage
            • Arguments
            • Examples
          • sample-methods
            • Description
            • Usage
            • Arguments
            • Value
            • Examples
          • sort-methods
            • Description
            • Usage
            • Arguments
            • Value
            • Examples
          • Mean
            • Description
            • Usage
            • Arguments
          • styles
            • Description
            • Usage
            • Arguments
            • Details
          • syntactic-shugar
            • Description
            • Usage
            • Arguments
            • Examples
          • tibbles
            • Description
            • Usage
            • Arguments
            • Value
          • to.data.frame
            • Description
            • Usage
            • Arguments
            • Value
            • Examples
          • toLatex
            • Description
            • Usage
            • Arguments
            • Examples
          • Utility classes
            • Description
            • Examples
          • value.filter
            • Description
            • Usage
            • Arguments
            • Value
            • Examples
          • view
            • Description
            • Usage
            • Arguments
            • Examples
          • view_html
            • Description
            • Usage
            • Arguments
            • Examples
          • wild.codes
            • Description
            • Usage
            • Arguments
            • Value
          • withSE
            • Description
            • Usage
            • Arguments
            • Value
            • Details
            • Examples
        • Index
      • Recent news
      • Examples
    • mclogit: Multinomial Logit Models, with or without Random Effects or Overdispersion
      • mclogit on CRAN
      • Baseline-category logit models
      • Conditional logit models
      • Random effects in baseline logit models and conditional logit models
      • Documentation of the Package
        • Manual pages
          • Transport
            • Description
            • Usage
          • dispersion
            • Description
            • Usage
            • Arguments
            • Examples
          • electors
            • Description
            • Usage
            • Examples
          • getSummary-methods
            • Description
            • Usage
            • Arguments
            • Examples
          • mblogit
            • Description
            • Usage
            • Arguments
            • Value
            • Details
            • See also
            • Examples
          • mclogit
            • Description
            • Usage
            • Arguments
            • Value
            • Notes
            • See also
            • Examples
          • mclogit.fit
            • Description
            • Usage
            • Arguments
            • Value
          • mclogit.control
            • Description
            • Usage
            • Arguments
            • Value
          • predict
            • Description
            • Usage
            • Arguments
            • Value
            • Examples
          • simulate.mclogit
            • Description
            • Usage
            • Arguments
            • Value
            • Examples
        • Index
        • Technical documentation
          • The relation between baseline logit and conditional logit models
          • The IWLS algorithm used to fit conditional logit models
          • Approximate Inference for Multinomial Logit Models with Random Effects
            • The problem
            • The Laplace approximation and PQL
              • Laplace approximation
              • Penalized quasi-likelihood (PQL)
            • The Solomon-Cox approximation and MQL
              • The Solomon-Cox approximation
              • Marginal quasi-likelhood (MQL)
            • References
      • References
    • munfold: Metric Multidimensional Unfolding in R
      • Documentation
        • Manual pages
          • unfold
            • Description
            • Usage
            • Arguments
            • Value
            • Details
            • Examples
          • procrustes
            • Description
            • Usage
            • Arguments
            • Value
        • Index
    • mpred: Generic Predictive Margins
      • Documentation
        • Manual pages
          • cinorm
            • Description
            • Usage
            • Arguments
          • predmarg
            • Description
            • Usage
            • Arguments
            • Value
            • Details
            • Examples
        • Index
    • manifestos: Spatial Modelling of Party Manifestos (and other political texts)
      • Documentation
        • Manual pages
          • latpos
            • Description
            • Usage
            • Arguments
            • Value
            • Examples
          • latpos_restrictions
            • Description
            • Usage
            • Arguments
            • Value
          • latpos_tunefit
            • Description
            • Usage
            • Arguments
          • sampler
            • Description
            • Usage
            • Arguments
            • Value
        • Index
      • Downloads
    • iimm: Improved Inference for Multilevel Models with Few Clusters
      • Documentation
        • Manual pages
          • lmer_t
            • Description
            • Usage
            • Arguments
            • Value
        • Index
    • EMfit: An Infrastructure for Latent Variable Model Fitting using EM Algorithms
      • Documentation
        • Manual pages
          • EMfit
            • Description
            • Usage
            • Arguments
            • Value
          • Mstep.default
            • Description
            • Usage
            • Arguments
            • Value
        • Index
  • About
    • Contact
    • About this website
previous Index
next The relation between baseline logit and conditional logit models
© Copyright 2022, Martin Elff. Last updated on 28 Aug 2023. Created using Sphinx 5.3.0. Insipid Theme. Show Source.