Package generalhoslem

Size: px
Start display at page:

Download "Package generalhoslem"

Transcription

1 Package generalhoslem December 2, 2017 Type Package Title Goodness of Fit Tests for Logistic Regression Models Version Date Author Matthew Jay [aut, cre] Maintainer Matthew Jay Description Functions to assess the goodness of fit of binary, multinomial and ordinal logistic models. Included are the Hosmer-Lemeshow tests (binary, multinomial and ordinal) and the Lipsitz and Pulkstenis-Robinson tests (ordinal). Depends reshape, MASS, R (>= 3.3.1) License GPL-2 Suggests nnet, mlogit, ordinal NeedsCompilation no Repository CRAN Date/Publication :14:19 UTC R topics documented: generalhoslem-package lipsitz.test logitgof pulkrob Index 10 1

2 2 generalhoslem-package generalhoslem-package Goodness of Fit Tests for Logistic Regression Models Description Details Functions to assess the goodness of fit of binary, multinomial and ordinal logistic models. Included are the Hosmer-Lemeshow tests (binary, multinomial and ordinal) and the Lipsitz and Pulkstenis- Robinson tests (ordinal). Package: generalhoslem Type: Package Title: Goodness of Fit Tests for Logistic Regression Models Version: Date: person("matthew", "Jay", role = c("aut", "cre"), = "matthew.jay.15@ucl.ac.uk") Author: Matthew Jay [aut, cre] Maintainer: Matthew Jay <matthew.jay.15@ucl.ac.uk> Description: Functions to assess the goodness of fit of binary, multinomial and ordinal logistic models. Included are the Hos Depends: reshape, MASS, R (>= 3.3.1) License: GPL-2 Suggests: nnet, mlogit, ordinal Index of help topics: generalhoslem-package lipsitz.test logitgof pulkrob.chisq Goodness of Fit Tests for Logistic Regression Models Lipsitz goodness of fit test for ordinal logistic models. Hosmer-Lemeshow Tests for Logistic Regression Models Pulkstenis-Robinson goodness of fit tests for ordinal response models. Author(s) Matthew Jay [aut, cre] Maintainer: Matthew Jay <matthew.jay.15@ucl.ac.uk> References Fagerland MW, Hosmer DW, Bofin AM. Multinomial goodness-of-fit tests for logistic regression models. Statistics in Medicine 2008;27(21): Fagerland MW, Hosmer DW. A goodness-of-fit test for the proportional odds regression model. Statistics in Medicine 2013;32:

3 lipsitz.test 3 Fagerland MW, Hosmer DW. Tests for goodness of fit in ordinal logistic regression models. Journal of Statistical Computation and Simulation DOI: / Hosmer DW, Lemeshow S, Sturdivant RX. Applied Logistic Regression, 3rd Edition New York, USA: John Wiley and Sons. Lipsitz SR, Fitzmaurice GM, Molenberghs G. Goodness-of-Fit Tests for Ordinal Response Regression Models. Journal of the Royal Statistical Society 1996;45(2): Pulkstenis E, Robinson TJ. Goodness-of-fit tests for ordinal response regression models. Statistics in Medicine 2004;23: lipsitz.test Lipsitz goodness of fit test for ordinal logistic models. Description Usage Performs the Lipsitz goodness of fit test for ordinal logistic regression models. lipsitz.test(model, g = 10) Arguments Details model an ordinal logistic regression model. Must be an object of class polr or clm. g number of quantiles of risk, defaults to 10. The Lipsitz test is a goodness of fit test for ordinal response logistic regression models. It involves firstly binning the observed data into percentiles in the same manner as for the multinomial Hosmer- Lemeshow test. Strictly speaking, the Lipsitz test first requires an ordinal score be assigned to each subject. This score is the sum of the predicted probabilities for each outcome level within each subject multiplied by equally spaced integer weights. This, however, has been shown to be idenitical to the more straightforward binning method (Fagerland and Hosmer, 2013). The user can specify the number of groups by assigning an integer value to g, which is 10 by default. Given this partitioning of the data, dummy variables, I, are derived such that, for each group, I = 1 if the subject is in region g and I = 0 if not. The model is then re-fit with these dummy variables. If the model has good fit, then the coefficients for all these dummy variables simultaneously = 0. Lipsitz et al (1996) suggest that likelihood ratio, Wald or score tests can be used; lipsitz.test just uses the likelihood ratio test with g-1 degrees of freedom. Note that the outcome variable MUST be converted to a factor before running the model. Using as.factor() within the model function will cause an error because of the way in which lipsitz.test uses the update() function to re-fit the model. It is recommended (Fagerland and Hosmer, 2016) that the Lipsitz test be run alongside the ordinal Hosmer-Lemeshow test (logitgof) and the Pulkstenis-Robinson tests (pulkrob.chisq and pulkrob.deviance).

4 4 lipsitz.test Value A list of class htest containing: statistic parameter p.value method data.name newmoddata the value of the likelihood ratio statistic. degrees of freedom used. the p-value. a character string indicating the name of the test. a character string indicating the model formula used. a data frame containing the data used in fitting the updated model (the original data plus the dummy variables). predictedprobs a data frame of predicted probabilities from the original model. Author(s) Matthew Alexander Jay References Fagerland MW, Hosmer DW. A goodness-of-fit test for the proportional odds regression model. Statistics in Medicine 2013;32: Fagerland MW, Hosmer DW. Tests for goodness of fit in ordinal logistic regression models. Journal of Statistical Computation and Simulation DOI: / Lipsitz SR, Fitzmaurice GM, Molenberghs G. Goodness-of-Fit Tests for Ordinal Response Regression Models. Journal of the Royal Statistical Society 1996;45(2): See Also logitgof, pulkrob.chisq. Examples data(mtcars) mtcars$gear <- as.factor(mtcars$gear) # Outcome must be converted to factor # before fitting model otherwise # lipsitz.test() will fail. mod1 <- polr(gear ~ mpg + cyl, data = mtcars) lipsitz.test(mod1) library(ordinal) mod2 <- clm(gear ~ mpg, data = mtcars) lipsitz.test(mod2)

5 logitgof 5 logitgof Hosmer-Lemeshow Tests for Logistic Regression Models Description Performs the Hosmer-Lemeshow goodness of fit tests for binary, multinomial and ordinal logistic regression models. Usage logitgof(obs, exp, g = 10, ord = FALSE) Arguments obs exp g ord a vector of observed values. See details. expected values fitted by the model. See details. number of quantiles of risk, 10 by default. logical indicating whether to run the ordinal version, FALSE by default. Details The Hosmer-Lemeshow tests The Hosmer-Lemeshow tests are goodness of fit tests for binary, multinomial and ordinal logistic regression models. logitgof is capable of performing all three. Essentially, they compare observed with expected frequencies of the outcome and compute a test statistic which is distributed according to the chi-squared distribution. The degrees of freedom depend upon the number of quantiles used and the number of outcome categories. A non-significant p value indicates that there is no evidence that the observed and expected frequencies differ (i.e., evidence of good fit). Binary version If obs is a vector of 1s and 0s or a factor vector with 2 levels, then the binary version of the test is run. exp must be the fitted values obtained from the model, which can be accessed using the fitted() function. Multinomial version If obs is a factor with three or more levels and ord = FALSE, the multinomial version of the test is run. If using the mlogit package to run a model, ensure outcome = FALSE in the fitted() function. See examples. Ordinal version If obs is a factor with three or more levels and ord = TRUE, the ordinal version of the test is run. See examples for how to extract fitted values from models constructed using MASS::polr or oridinal::clm. Note that Fagerland and Hosmer (2016) recommend running the Hosmer-Lemeshow test for ordinal models alongisde the Lipsitz test (lipsitz.test) and Pulkstenis-Robinson tests (pulkrob.chisq and pulkrob.deviance), as each detects different types of lack of fit.

6 6 logitgof Value A list of class htest containing: statistic parameter p.value method data.name observed expected stddiffs the value of the relevant test statistic. the number of degrees of freedom used. the p-value. a character string indicating whether the binary or multinomial version of the test was performed. a character string containing the names of the data passed to obs and exp. a table of observed frequencies with g rows. Either an xtabs generated table (used in the binary version) or a cast generated data frame (multinomial version). a table of expected frequencies with g rows. Either an xtabs generated table or a cast generated data frame. a table of the standardised differences. See Hosmer, Lemeshow and Sturdivant (2013), p 162. Author(s) Matthew Alexander Jay, with code adapted from ResourceSelection::hoslem.test by Peter Solymos. References See Also Fagerland MW, Hosmer DW, Bofin AM. Multinomial goodness-of-fit tests for logistic regression models. Statistics in Medicine 2008;27(21): Fagerland MW, Hosmer DW. A goodness-of-fit test for the proportional odds regression model. Statistics in Medicine 2013;32: Fagerland MW, Hosmer DW. Tests for goodness of fit in ordinal logistic regression models. Journal of Statistical Computation and Simulation DOI: / Hosmer DW, Lemeshow S, Sturdivant RX. Applied Logistic Regression, 3rd Edition New York, USA: John Wiley and Sons. lipsitz.test, pulkrob.chisq. Examples ### The mtcars dataset is a terrible example to use due to its small ### size - some of the models will return warnings as a result. ## Binary model # 1/0 coding data(mtcars) mod1 <- glm(vs ~ cyl + mpg, data = mtcars, family = binomial) logitgof(mtcars$vs, fitted(mod1))

7 pulkrob 7 # factor name coding mtcars$engine <- factor(ifelse(mtcars$vs==0, "V", "S"), levels = c("v", "S")) mod2 <- glm(engine ~ cyl + mpg, data = mtcars, family = binomial) logitgof(mtcars$engine, fitted(mod2)) ## Multinomial model # with nnet library(nnet) mod3 <- multinom(gear ~ mpg + cyl, data = mtcars) logitgof(mtcars$gear, fitted(mod3)) # with mlogit library(mlogit) data("fishing", package = "mlogit") Fish <- mlogit.data(fishing, varying = c(2:9), shape = "wide", choice = "mode") mod4 <- mlogit(mode ~ 0 income, data = Fish) logitgof(fishing$mode, fitted(mod4, outcome = FALSE)) ## Ordinal model # polr in package MASS mod5 <- polr(as.factor(gear) ~ mpg + cyl, data = mtcars) logitgof(mtcars$gear, fitted(mod5), g = 5, ord = TRUE) # clm in package ordinal library(ordinal) mtcars$gear <- as.factor(mtcars$gear) mod6 <- clm(gear ~ mpg + cyl, data = mtcars) predprob <- data.frame(mpg = mtcars$mpg, cyl = mtcars$cyl) fv <- predict(mod6, newdata = predprob, type = "prob")$fit logitgof(mtcars$gear, fv, g = 5, ord = TRUE) pulkrob Pulkstenis-Robinson goodness of fit tests for ordinal response models. Description Performs the Pulkstenis-Robinson goodness of fit chi-squared and deviance tests for ordinal logistic regression models. Usage pulkrob.chisq(model, catvars) pulkrob.deviance(model, catvars) Arguments model catvars an ordinal response model. Must be an object of class polr or clm. a character vector containing the names of the categorical covariates.

8 8 pulkrob Details Value The Pulkstenis-Robinson tests are goodness of fit tests for ordinal logistic regression models. They are capable of accommodating models with continuous as well as categorical predictors. The data are partitioned according to observed covariate patterns using the categorical covariates only. Any unobserved covariate patterns are discarded. Only categorical predictors are used to avoid partitioning among an unacceptably high number of covariate patterns. Each subject is assigned an ordinal response score by summing the predicted probabilities of each subject for each outcome level multiplied by equally spaced integer weights. The covariate patterns are then split into two at the median score within each. Based on this partitioning, observed and expected frequencies are calculated and the test statistic computed. This statistic is distributed by the chi-squared distribution with (2I 1)(J 1) k 1 degress of freedom, where I is the number of covariate patterns, J is the number of of response categories and k is the number of categorical variables in the model. It is recommended (Fagerland and Hosmer, 2016) that the Pulkstenis-Robinson tests be run alongside the Hosmer-Lemeshow test (logitgof) and the Lipsitz test (lipsitz.test). A list of class htest containing: statistic parameter p.value method data.name observed expected stddiffs the chi-squared or deviance statistic. degrees of freedom used. the p-value. a character string indicating the name of the test. a character string indicating the model formula used. a cast generated data frame of observed frequencies. a cast generated data frame of expected frequencies. a table of the standardised differences. See Hosmer, Lemeshow and Sturdivant (2013), p 162. Author(s) Matthew Alexander Jay, with code from epir::epi.cp() by Mark Stevenson. References See Also Fagerland MW, Hosmer DW. Tests for goodness of fit in ordinal logistic regression models. Journal of Statistical Computation and Simulation DOI: / Hosmer DW, Lemeshow S, Sturdivant RX. Applied Logistic Regression, 3rd Edition New York, USA: John Wiley and Sons. Pulkstenis E, Robinson TJ. Goodness-of-fit tests for ordinal response regression models. Statistics in Medicine 2004;23: logitgof, lipsitz.test.

9 pulkrob 9 Examples data(mtcars) # using polr mod1 <- polr(as.factor(gear) ~ mpg + cyl + vs, data = mtcars) pulkrob.chisq(mod1, c("vs")) pulkrob.deviance(mod1, c("vs")) # using clm - ensure outcome variable is a factor before fitting the model library(ordinal) mtcars$gear <- as.factor(mtcars$gear) mod2 <- clm(gear ~ mpg + cyl + vs, data = mtcars) pulkrob.chisq(mod2, c("vs")) pulkrob.deviance(mod2, c("vs"))

10 Index Topic package generalhoslem-package, 2 Topic regression lipsitz.test, 3 logitgof, 5 pulkrob, 7 generalhoslem (generalhoslem-package), 2 generalhoslem-package, 2 lipsitz.test, 3, 6, 8 logitgof, 4, 5, 8 pulkrob, 7 pulkrob.chisq, 4, 6 10

Goodness-of-Fit Tests for the Ordinal Response Models with Misspecified Links

Goodness-of-Fit Tests for the Ordinal Response Models with Misspecified Links Communications of the Korean Statistical Society 2009, Vol 16, No 4, 697 705 Goodness-of-Fit Tests for the Ordinal Response Models with Misspecified Links Kwang Mo Jeong a, Hyun Yung Lee 1, a a Department

More information

Package gtheory. October 30, 2016

Package gtheory. October 30, 2016 Package gtheory October 30, 2016 Version 0.1.2 Date 2016-10-22 Title Apply Generalizability Theory with R Depends lme4 Estimates variance components, generalizability coefficients, universe scores, and

More information

Package invgamma. May 7, 2017

Package invgamma. May 7, 2017 Package invgamma May 7, 2017 Type Package Title The Inverse Gamma Distribution Version 1.1 URL https://github.com/dkahle/invgamma BugReports https://github.com/dkahle/invgamma/issues Description Light

More information

Package SimCorMultRes

Package SimCorMultRes Type Package Package SimCorMultRes Title Simulates Correlated Multinomial Responses July 10, 2018 Description Simulates correlated multinomial responses conditional on a marginal model specification. Version

More information

Package depth.plot. December 20, 2015

Package depth.plot. December 20, 2015 Package depth.plot December 20, 2015 Type Package Title Multivariate Analogy of Quantiles Version 0.1 Date 2015-12-19 Maintainer Could be used to obtain spatial depths, spatial ranks and outliers of multivariate

More information

Package SpatialNP. June 5, 2018

Package SpatialNP. June 5, 2018 Type Package Package SpatialNP June 5, 2018 Title Multivariate Nonparametric Methods Based on Spatial Signs and Ranks Version 1.1-3 Date 2018-06-05 Author Seija Sirkia, Jari Miettinen, Klaus Nordhausen,

More information

Package gwqs. R topics documented: May 7, Type Package. Title Generalized Weighted Quantile Sum Regression. Version 1.1.0

Package gwqs. R topics documented: May 7, Type Package. Title Generalized Weighted Quantile Sum Regression. Version 1.1.0 Package gwqs May 7, 2018 Type Package Title Generalized Weighted Quantile Sum Regression Version 1.1.0 Author Stefano Renzetti, Paul Curtin, Allan C Just, Ghalib Bello, Chris Gennings Maintainer Stefano

More information

Package severity. February 20, 2015

Package severity. February 20, 2015 Type Package Title Mayo's Post-data Severity Evaluation Version 2.0 Date 2013-03-27 Author Nicole Mee-Hyaang Jinn Package severity February 20, 2015 Maintainer Nicole Mee-Hyaang Jinn

More information

Package BayesNI. February 19, 2015

Package BayesNI. February 19, 2015 Package BayesNI February 19, 2015 Type Package Title BayesNI: Bayesian Testing Procedure for Noninferiority with Binary Endpoints Version 0.1 Date 2011-11-11 Author Sujit K Ghosh, Muhtarjan Osman Maintainer

More information

Package dhsic. R topics documented: July 27, 2017

Package dhsic. R topics documented: July 27, 2017 Package dhsic July 27, 2017 Type Package Title Independence Testing via Hilbert Schmidt Independence Criterion Version 2.0 Date 2017-07-24 Author Niklas Pfister and Jonas Peters Maintainer Niklas Pfister

More information

Package effectfusion

Package effectfusion Package November 29, 2016 Title Bayesian Effect Fusion for Categorical Predictors Version 1.0 Date 2016-11-21 Author Daniela Pauger [aut, cre], Helga Wagner [aut], Gertraud Malsiner-Walli [aut] Maintainer

More information

Package HIMA. November 8, 2017

Package HIMA. November 8, 2017 Type Package Title High-Dimensional Mediation Analysis Version 1.0.5 Date 2017-11-05 Package HIMA November 8, 2017 Description Allows to estimate and test high-dimensional mediation effects based on sure

More information

Logistic Regression. Continued Psy 524 Ainsworth

Logistic Regression. Continued Psy 524 Ainsworth Logistic Regression Continued Psy 524 Ainsworth Equations Regression Equation Y e = 1 + A+ B X + B X + B X 1 1 2 2 3 3 i A+ B X + B X + B X e 1 1 2 2 3 3 Equations The linear part of the logistic regression

More information

Package Delaporte. August 13, 2017

Package Delaporte. August 13, 2017 Type Package Package Delaporte August 13, 2017 Title Statistical Functions for the Delaporte Distribution Version 6.1.0 Date 2017-08-13 Description Provides probability mass, distribution, quantile, random-variate

More information

Package sscor. January 28, 2016

Package sscor. January 28, 2016 Type Package Package sscor January 28, 2016 Title Robust Correlation Estimation and Testing Based on Spatial Signs Version 0.2 Date 2016-01-19 Depends pcapp, robustbase, mvtnorm Provides the spatial sign

More information

Package robustrao. August 14, 2017

Package robustrao. August 14, 2017 Type Package Package robustrao August 14, 2017 Title An Extended Rao-Stirling Diversity Index to Handle Missing Data Version 1.0-3 Date 2016-01-31 Author María del Carmen Calatrava Moreno [aut, cre], Thomas

More information

Logistic Regression Models for Multinomial and Ordinal Outcomes

Logistic Regression Models for Multinomial and Ordinal Outcomes CHAPTER 8 Logistic Regression Models for Multinomial and Ordinal Outcomes 8.1 THE MULTINOMIAL LOGISTIC REGRESSION MODEL 8.1.1 Introduction to the Model and Estimation of Model Parameters In the previous

More information

Package skellam. R topics documented: December 15, Version Date

Package skellam. R topics documented: December 15, Version Date Version 0.2.0 Date 2016-12-13 Package skellam December 15, 2016 Title Densities and Sampling for the Skellam Distribution Author Jerry W. Lewis, Patrick E. Brown , Michail Tsagris

More information

Package idmtpreg. February 27, 2018

Package idmtpreg. February 27, 2018 Type Package Package idmtpreg February 27, 2018 Title Regression Model for Progressive Illness Death Data Version 1.1 Date 2018-02-23 Author Leyla Azarang and Manuel Oviedo de la Fuente Maintainer Leyla

More information

Package ltsbase. R topics documented: February 20, 2015

Package ltsbase. R topics documented: February 20, 2015 Package ltsbase February 20, 2015 Type Package Title Ridge and Liu Estimates based on LTS (Least Trimmed Squares) Method Version 1.0.1 Date 2013-08-02 Author Betul Kan Kilinc [aut, cre], Ozlem Alpu [aut,

More information

Package leiv. R topics documented: February 20, Version Type Package

Package leiv. R topics documented: February 20, Version Type Package Version 2.0-7 Type Package Package leiv February 20, 2015 Title Bivariate Linear Errors-In-Variables Estimation Date 2015-01-11 Maintainer David Leonard Depends R (>= 2.9.0)

More information

Package BNN. February 2, 2018

Package BNN. February 2, 2018 Type Package Package BNN February 2, 2018 Title Bayesian Neural Network for High-Dimensional Nonlinear Variable Selection Version 1.0.2 Date 2018-02-02 Depends R (>= 3.0.2) Imports mvtnorm Perform Bayesian

More information

Package covtest. R topics documented:

Package covtest. R topics documented: Package covtest February 19, 2015 Title Computes covariance test for adaptive linear modelling Version 1.02 Depends lars,glmnet,glmpath (>= 0.97),MASS Author Richard Lockhart, Jon Taylor, Ryan Tibshirani,

More information

Package weightquant. R topics documented: December 30, Type Package

Package weightquant. R topics documented: December 30, Type Package Type Package Package weightquant December 30, 2018 Title Weights for Incomplete Longitudinal Data and Quantile Regression Version 1.0 Date 2018-12-18 Author Viviane Philipps Maintainer Viviane Philipps

More information

Package FinCovRegularization

Package FinCovRegularization Type Package Package FinCovRegularization April 25, 2016 Title Covariance Matrix Estimation and Regularization for Finance Version 1.1.0 Estimation and regularization for covariance matrix of asset returns.

More information

Package SimSCRPiecewise

Package SimSCRPiecewise Package SimSCRPiecewise July 27, 2016 Type Package Title 'Simulates Univariate and Semi-Competing Risks Data Given Covariates and Piecewise Exponential Baseline Hazards' Version 0.1.1 Author Andrew G Chapple

More information

Package metansue. July 11, 2018

Package metansue. July 11, 2018 Type Package Package metansue July 11, 2018 Title Meta-Analysis of Studies with Non Statistically-Significant Unreported Effects Version 2.2 Date 2018-07-11 Author Joaquim Radua Maintainer Joaquim Radua

More information

Package goftest. R topics documented: April 3, Type Package

Package goftest. R topics documented: April 3, Type Package Type Package Package goftest April 3, 2017 Title Classical Goodness-of-Fit Tests for Univariate Distributions Version 1.1-1 Date 2017-04-03 Depends R (>= 3.3) Imports stats Cramer-Von Mises and Anderson-Darling

More information

Package basad. November 20, 2017

Package basad. November 20, 2017 Package basad November 20, 2017 Type Package Title Bayesian Variable Selection with Shrinking and Diffusing Priors Version 0.2.0 Date 2017-11-15 Author Qingyan Xiang , Naveen Narisetty

More information

Package MicroMacroMultilevel

Package MicroMacroMultilevel Type Package Package MicroMacroMultilevel July 1, 2017 Description Most multilevel methodologies can only model macro-micro multilevel situations in an unbiased way, wherein group-level predictors (e.g.,

More information

Package NlinTS. September 10, 2018

Package NlinTS. September 10, 2018 Type Package Title Non Linear Time Series Analysis Version 1.3.5 Date 2018-09-05 Package NlinTS September 10, 2018 Maintainer Youssef Hmamouche Models for time series forecasting

More information

Package reinforcedpred

Package reinforcedpred Type Package Package reinforcedpred October 31, 2018 Title Reinforced Risk Prediction with Budget Constraint Version 0.1.1 Author Yinghao Pan [aut, cre], Yingqi Zhao [aut], Eric Laber [aut] Maintainer

More information

Package locfdr. July 15, Index 5

Package locfdr. July 15, Index 5 Version 1.1-8 Title Computes Local False Discovery Rates Package locfdr July 15, 2015 Maintainer Balasubramanian Narasimhan License GPL-2 Imports stats, splines, graphics Computation

More information

Package icmm. October 12, 2017

Package icmm. October 12, 2017 Type Package Package icmm October 12, 2017 Title Empirical Bayes Variable Selection via ICM/M Algorithm Version 1.1 Author Vitara Pungpapong [aut, cre], Min Zhang [aut], Dabao Zhang [aut] Maintainer Vitara

More information

Package polypoly. R topics documented: May 27, 2017

Package polypoly. R topics documented: May 27, 2017 Package polypoly May 27, 2017 Title Helper Functions for Orthogonal Polynomials Version 0.0.2 Tools for reshaping, plotting, and manipulating matrices of orthogonal polynomials. Depends R (>= 3.3.3) License

More information

Stat 642, Lecture notes for 04/12/05 96

Stat 642, Lecture notes for 04/12/05 96 Stat 642, Lecture notes for 04/12/05 96 Hosmer-Lemeshow Statistic The Hosmer-Lemeshow Statistic is another measure of lack of fit. Hosmer and Lemeshow recommend partitioning the observations into 10 equal

More information

Logistic Regression in R. by Kerry Machemer 12/04/2015

Logistic Regression in R. by Kerry Machemer 12/04/2015 Logistic Regression in R by Kerry Machemer 12/04/2015 Linear Regression {y i, x i1,, x ip } Linear Regression y i = dependent variable & x i = independent variable(s) y i = α + β 1 x i1 + + β p x ip +

More information

Package sbgcop. May 29, 2018

Package sbgcop. May 29, 2018 Package sbgcop May 29, 2018 Title Semiparametric Bayesian Gaussian Copula Estimation and Imputation Version 0.980 Date 2018-05-25 Author Maintainer Estimation and inference for parameters

More information

Package anoint. July 19, 2015

Package anoint. July 19, 2015 Type Package Title Analysis of Interactions Version 1.4 Date 2015-07-10 Package anoint July 19, 2015 Author Ravi Varadhan and Stephanie Kovalchik Maintainer Stephanie Kovalchik

More information

LOGISTIC REGRESSION Joseph M. Hilbe

LOGISTIC REGRESSION Joseph M. Hilbe LOGISTIC REGRESSION Joseph M. Hilbe Arizona State University Logistic regression is the most common method used to model binary response data. When the response is binary, it typically takes the form of

More information

Package MultisiteMediation

Package MultisiteMediation Version 0.0.1 Date 2017-02-25 Package MultisiteMediation February 26, 2017 Title Causal Mediation Analysis in Multisite Trials Author Xu Qin, Guanglei Hong Maintainer Xu Qin Depends

More information

Package RI2by2. October 21, 2016

Package RI2by2. October 21, 2016 Package RI2by2 October 21, 2016 Type Package Title Randomization Inference for Treatment Effects on a Binary Outcome Version 1.3 Author Joseph Rigdon, Wen Wei Loh, Michael G. Hudgens Maintainer Wen Wei

More information

Multinomial Logistic Regression Models

Multinomial Logistic Regression Models Stat 544, Lecture 19 1 Multinomial Logistic Regression Models Polytomous responses. Logistic regression can be extended to handle responses that are polytomous, i.e. taking r>2 categories. (Note: The word

More information

Package MiRKATS. May 30, 2016

Package MiRKATS. May 30, 2016 Type Package Package MiRKATS May 30, 2016 Title Microbiome Regression-based Kernal Association Test for Survival (MiRKAT-S) Version 1.0 Date 2016-04-22 Author Anna Plantinga , Michael

More information

Package metafuse. October 17, 2016

Package metafuse. October 17, 2016 Package metafuse October 17, 2016 Type Package Title Fused Lasso Approach in Regression Coefficient Clustering Version 2.0-1 Date 2016-10-16 Author Lu Tang, Ling Zhou, Peter X.K. Song Maintainer Lu Tang

More information

7. Assumes that there is little or no multicollinearity (however, SPSS will not assess this in the [binary] Logistic Regression procedure).

7. Assumes that there is little or no multicollinearity (however, SPSS will not assess this in the [binary] Logistic Regression procedure). 1 Neuendorf Logistic Regression The Model: Y Assumptions: 1. Metric (interval/ratio) data for 2+ IVs, and dichotomous (binomial; 2-value), categorical/nominal data for a single DV... bear in mind that

More information

Package horseshoe. November 8, 2016

Package horseshoe. November 8, 2016 Title Implementation of the Horseshoe Prior Version 0.1.0 Package horseshoe November 8, 2016 Description Contains functions for applying the horseshoe prior to highdimensional linear regression, yielding

More information

Package ShrinkCovMat

Package ShrinkCovMat Type Package Package ShrinkCovMat Title Shrinkage Covariance Matrix Estimators Version 1.2.0 Author July 11, 2017 Maintainer Provides nonparametric Steinian shrinkage estimators

More information

Package threg. August 10, 2015

Package threg. August 10, 2015 Package threg August 10, 2015 Title Threshold Regression Version 1.0.3 Date 2015-08-10 Author Tao Xiao Maintainer Tao Xiao Depends R (>= 2.10), survival, Formula Fit a threshold regression

More information

Package LIStest. February 19, 2015

Package LIStest. February 19, 2015 Type Package Package LIStest February 19, 2015 Title Tests of independence based on the Longest Increasing Subsequence Version 2.1 Date 2014-03-12 Author J. E. Garcia and V. A. Gonzalez-Lopez Maintainer

More information

Basic Medical Statistics Course

Basic Medical Statistics Course Basic Medical Statistics Course S7 Logistic Regression November 2015 Wilma Heemsbergen w.heemsbergen@nki.nl Logistic Regression The concept of a relationship between the distribution of a dependent variable

More information

Package clogitboost. R topics documented: December 21, 2015

Package clogitboost. R topics documented: December 21, 2015 Package December 21, 2015 Type Package Title Boosting Conditional Logit Model Version 1.1 Date 2015-12-09 Author Haolun Shi and Guosheng Yin Maintainer A set of functions to fit a boosting conditional

More information

Package gma. September 19, 2017

Package gma. September 19, 2017 Type Package Title Granger Mediation Analysis Version 1.0 Date 2018-08-23 Package gma September 19, 2017 Author Yi Zhao , Xi Luo Maintainer Yi Zhao

More information

Package SEMModComp. R topics documented: February 19, Type Package Title Model Comparisons for SEM Version 1.0 Date Author Roy Levy

Package SEMModComp. R topics documented: February 19, Type Package Title Model Comparisons for SEM Version 1.0 Date Author Roy Levy Type Package Title Model Comparisons for SEM Version 1.0 Date 2009-02-23 Author Roy Levy Package SEMModComp Maintainer Roy Levy February 19, 2015 Conduct tests of difference in fit for

More information

Package sklarsomega. May 24, 2018

Package sklarsomega. May 24, 2018 Type Package Package sklarsomega May 24, 2018 Title Measuring Agreement Using Sklar's Omega Coefficient Version 1.0 Date 2018-05-22 Author John Hughes Maintainer John Hughes

More information

Package breakaway. R topics documented: March 30, 2016

Package breakaway. R topics documented: March 30, 2016 Title Species Richness Estimation and Modeling Version 3.0 Date 2016-03-29 Author and John Bunge Maintainer Package breakaway March 30, 2016 Species richness estimation is an important

More information

Package SK. May 16, 2018

Package SK. May 16, 2018 Type Package Package SK May 16, 2018 Title Segment-Based Ordinary Kriging and Segment-Based Regression Kriging for Spatial Prediction Date 2018-05-10 Version 1.1 Maintainer Yongze Song

More information

Package drgee. November 8, 2016

Package drgee. November 8, 2016 Type Package Package drgee November 8, 2016 Title Doubly Robust Generalized Estimating Equations Version 1.1.6 Date 2016-11-07 Author Johan Zetterqvist , Arvid Sjölander

More information

Package mpmcorrelogram

Package mpmcorrelogram Type Package Package mpmcorrelogram Title Multivariate Partial Mantel Correlogram Version 0.1-4 Depends vegan Date 2017-11-17 Author Marcelino de la Cruz November 17, 2017 Maintainer Marcelino de la Cruz

More information

Package dhga. September 6, 2016

Package dhga. September 6, 2016 Type Package Title Differential Hub Gene Analysis Version 0.1 Date 2016-08-31 Package dhga September 6, 2016 Author Samarendra Das and Baidya Nath Mandal

More information

Package IsingFit. September 7, 2016

Package IsingFit. September 7, 2016 Type Package Package IsingFit September 7, 2016 Title Fitting Ising Models Using the ELasso Method Version 0.3.1 Date 2016-9-6 Depends R (>= 3.0.0) Imports qgraph, Matrix, glmnet Suggests IsingSampler

More information

Package dispmod. March 17, 2018

Package dispmod. March 17, 2018 Version 1.2 Date 2018-03-17 Title Modelling Dispersion in GLM Package dispmod March 17, 2018 Functions for estimating Gaussian dispersion regression models (Aitkin, 1987 ), overdispersed

More information

Package ExtremeBounds

Package ExtremeBounds Type Package Title Extreme Bounds Analysis (EBA) Version 0.1.6 Date 2018-01-03 Package ExtremeBounds January 3, 2018 Author Marek Hlavac Maintainer Marek Hlavac

More information

Package milineage. October 20, 2017

Package milineage. October 20, 2017 Type Package Package milineage October 20, 2017 Title Association Tests for Microbial Lineages on a Taxonomic Tree Version 2.0 Date 2017-10-18 Author Zheng-Zheng Tang Maintainer Zheng-Zheng Tang

More information

Package covsep. May 6, 2018

Package covsep. May 6, 2018 Package covsep May 6, 2018 Title Tests for Determining if the Covariance Structure of 2-Dimensional Data is Separable Version 1.1.0 Author Shahin Tavakoli [aut, cre], Davide Pigoli [ctb], John Aston [ctb]

More information

Package Blendstat. February 21, 2018

Package Blendstat. February 21, 2018 Package Blendstat February 21, 2018 Type Package Title Joint Analysis of Experiments with Mixtures and Random Effects Version 1.0.0 Date 2018-02-20 Author Marcelo Angelo Cirillo Paulo

More information

Logistic Regression: Regression with a Binary Dependent Variable

Logistic Regression: Regression with a Binary Dependent Variable Logistic Regression: Regression with a Binary Dependent Variable LEARNING OBJECTIVES Upon completing this chapter, you should be able to do the following: State the circumstances under which logistic regression

More information

The SpatialNP Package

The SpatialNP Package The SpatialNP Package September 4, 2007 Type Package Title Multivariate nonparametric methods based on spatial signs and ranks Version 0.9 Date 2007-08-30 Author Seija Sirkia, Jaakko Nevalainen, Klaus

More information

Package CompQuadForm

Package CompQuadForm Type Package Package CompQuadForm April 12, 2017 Title Distribution Function of Quadratic Forms in Normal Variables Version 1.4.3 Date 2017-04-10 Author P. Lafaye de Micheaux Maintainer P. Lafaye de Micheaux

More information

Package flexcwm. R topics documented: July 2, Type Package. Title Flexible Cluster-Weighted Modeling. Version 1.1.

Package flexcwm. R topics documented: July 2, Type Package. Title Flexible Cluster-Weighted Modeling. Version 1.1. Package flexcwm July 2, 2014 Type Package Title Flexible Cluster-Weighted Modeling Version 1.1 Date 2013-11-03 Author Mazza A., Punzo A., Ingrassia S. Maintainer Angelo Mazza Description

More information

Generalized Linear Models

Generalized Linear Models York SPIDA John Fox Notes Generalized Linear Models Copyright 2010 by John Fox Generalized Linear Models 1 1. Topics I The structure of generalized linear models I Poisson and other generalized linear

More information

Package hot.deck. January 4, 2016

Package hot.deck. January 4, 2016 Type Package Title Multiple Hot-Deck Imputation Version 1.1 Date 2015-11-19 Package hot.deck January 4, 2016 Author Skyler Cranmer, Jeff Gill, Natalie Jackson, Andreas Murr, Dave Armstrong Maintainer Dave

More information

Notes for week 4 (part 2)

Notes for week 4 (part 2) Notes for week 4 (part 2) Ben Bolker October 3, 2013 Licensed under the Creative Commons attribution-noncommercial license (http: //creativecommons.org/licenses/by-nc/3.0/). Please share & remix noncommercially,

More information

Package MACAU2. R topics documented: April 8, Type Package. Title MACAU 2.0: Efficient Mixed Model Analysis of Count Data. Version 1.

Package MACAU2. R topics documented: April 8, Type Package. Title MACAU 2.0: Efficient Mixed Model Analysis of Count Data. Version 1. Package MACAU2 April 8, 2017 Type Package Title MACAU 2.0: Efficient Mixed Model Analysis of Count Data Version 1.10 Date 2017-03-31 Author Shiquan Sun, Jiaqiang Zhu, Xiang Zhou Maintainer Shiquan Sun

More information

Package RootsExtremaInflections

Package RootsExtremaInflections Type Package Package RootsExtremaInflections May 10, 2017 Title Finds Roots, Extrema and Inflection Points of a Curve Version 1.1 Date 2017-05-10 Author Demetris T. Christopoulos Maintainer Demetris T.

More information

Package GD. January 12, 2018

Package GD. January 12, 2018 Tpe Package Title Geographical Detectors Date 2017-12-22 Version 1.1 Package GD Januar 12, 2018 Maintainer Yongze Song Geographical detectors for measuring spatial stratified

More information

Package survidinri. February 20, 2015

Package survidinri. February 20, 2015 Package survidinri February 20, 2015 Type Package Title IDI and NRI for comparing competing risk prediction models with censored survival data Version 1.1-1 Date 2013-4-8 Author Hajime Uno, Tianxi Cai

More information

Package RTransferEntropy

Package RTransferEntropy Type Package Package RTransferEntropy March 12, 2019 Title Measuring Information Flow Between Time Series with Shannon and Renyi Transfer Entropy Version 0.2.8 Measuring information flow between time series

More information

Package CovSel. September 25, 2013

Package CovSel. September 25, 2013 Type Package Title Model-Free Covariate Selection Version 1.0 Date 2013-06-24 Author Jenny Häggström, Emma Persson, Package CovSel September 25, 2013 Maintainer Jenny Häggström

More information

Categorical data analysis Chapter 5

Categorical data analysis Chapter 5 Categorical data analysis Chapter 5 Interpreting parameters in logistic regression The sign of β determines whether π(x) is increasing or decreasing as x increases. The rate of climb or descent increases

More information

A novel method for testing goodness of fit of a proportional odds model : an application to an AIDS study

A novel method for testing goodness of fit of a proportional odds model : an application to an AIDS study Goodness J.Natn.Sci.Foundation of fit testing in Sri Ordinal Lanka 2008 response 36 (2):25-35 reession models 25 RESEARCH ARTICLE A novel method for testing goodness of fit of a proportional odds model

More information

Multivariable Fractional Polynomials

Multivariable Fractional Polynomials Multivariable Fractional Polynomials Axel Benner September 7, 2015 Contents 1 Introduction 1 2 Inventory of functions 1 3 Usage in R 2 3.1 Model selection........................................ 3 4 Example

More information

Package factorqr. R topics documented: February 19, 2015

Package factorqr. R topics documented: February 19, 2015 Package factorqr February 19, 2015 Version 0.1-4 Date 2010-09-28 Title Bayesian quantile regression factor models Author Lane Burgette , Maintainer Lane Burgette

More information

Package sodavis. May 13, 2018

Package sodavis. May 13, 2018 Type Package Package sodavis May 13, 2018 Title SODA: Main and Interaction Effects Selection for Logistic Regression, Quadratic Discriminant and General Index Models Version 1.2 Depends R (>= 3.0.0), nnet,

More information

Multivariable Fractional Polynomials

Multivariable Fractional Polynomials Multivariable Fractional Polynomials Axel Benner May 17, 2007 Contents 1 Introduction 1 2 Inventory of functions 1 3 Usage in R 2 3.1 Model selection........................................ 3 4 Example

More information

Package comparec. R topics documented: February 19, Type Package

Package comparec. R topics documented: February 19, Type Package Package comparec February 19, 2015 Type Package Title Compare Two Correlated C Indices with Right-censored Survival Outcome Version 1.3.1 Date 2014-12-18 Author Le Kang, Weijie Chen Maintainer Le Kang

More information

Package r2glmm. August 5, 2017

Package r2glmm. August 5, 2017 Type Package Package r2glmm August 5, 2017 Title Computes R Squared for Mixed (Multilevel) Models Date 2017-08-04 Version 0.1.2 The model R squared and semi-partial R squared for the linear and generalized

More information

Statistical Modelling with Stata: Binary Outcomes

Statistical Modelling with Stata: Binary Outcomes Statistical Modelling with Stata: Binary Outcomes Mark Lunt Arthritis Research UK Epidemiology Unit University of Manchester 21/11/2017 Cross-tabulation Exposed Unexposed Total Cases a b a + b Controls

More information

Package flexcwm. R topics documented: July 11, Type Package. Title Flexible Cluster-Weighted Modeling. Version 1.0.

Package flexcwm. R topics documented: July 11, Type Package. Title Flexible Cluster-Weighted Modeling. Version 1.0. Package flexcwm July 11, 2013 Type Package Title Flexible Cluster-Weighted Modeling Version 1.0 Date 2013-02-17 Author Incarbone G., Mazza A., Punzo A., Ingrassia S. Maintainer Angelo Mazza

More information

The material for categorical data follows Agresti closely.

The material for categorical data follows Agresti closely. Exam 2 is Wednesday March 8 4 sheets of notes The material for categorical data follows Agresti closely A categorical variable is one for which the measurement scale consists of a set of categories Categorical

More information

Package Tcomp. June 6, 2018

Package Tcomp. June 6, 2018 Package Tcomp June 6, 2018 Title Data from the 2010 Tourism Forecasting Competition Version 1.0.1 The 1311 time series from the tourism forecasting competition conducted in 2010 and described in Athanasopoulos

More information

Package FDRreg. August 29, 2016

Package FDRreg. August 29, 2016 Package FDRreg August 29, 2016 Type Package Title False discovery rate regression Version 0.1 Date 2014-02-24 Author James G. Scott, with contributions from Rob Kass and Jesse Windle Maintainer James G.

More information

Package EL. February 19, 2015

Package EL. February 19, 2015 Version 1.0 Date 2011-11-01 Title Two-sample Empirical Likelihood License GPL (>= 2) Package EL February 19, 2015 Description Empirical likelihood (EL) inference for two-sample problems. The following

More information

Package NonpModelCheck

Package NonpModelCheck Type Package Package NonpModelCheck April 27, 2017 Title Model Checking and Variable Selection in Nonparametric Regression Version 3.0 Date 2017-04-27 Author Adriano Zanin Zambom Maintainer Adriano Zanin

More information

Package AID. R topics documented: November 10, Type Package Title Box-Cox Power Transformation Version 2.3 Date Depends R (>= 2.15.

Package AID. R topics documented: November 10, Type Package Title Box-Cox Power Transformation Version 2.3 Date Depends R (>= 2.15. Type Package Title Box-Cox Power Transformation Version 2.3 Date 2017-11-10 Depends R (>= 2.15.0) Package AID November 10, 2017 Imports MASS, tseries, nortest, ggplot2, graphics, psych, stats Author Osman

More information

Analysis of Categorical Data. Nick Jackson University of Southern California Department of Psychology 10/11/2013

Analysis of Categorical Data. Nick Jackson University of Southern California Department of Psychology 10/11/2013 Analysis of Categorical Data Nick Jackson University of Southern California Department of Psychology 10/11/2013 1 Overview Data Types Contingency Tables Logit Models Binomial Ordinal Nominal 2 Things not

More information

Package jmcm. November 25, 2017

Package jmcm. November 25, 2017 Type Package Package jmcm November 25, 2017 Title Joint Mean-Covariance Models using 'Armadillo' and S4 Version 0.1.8.0 Maintainer Jianxin Pan Fit joint mean-covariance models

More information

Package face. January 19, 2018

Package face. January 19, 2018 Package face January 19, 2018 Title Fast Covariance Estimation for Sparse Functional Data Version 0.1-4 Author Luo Xiao [aut,cre], Cai Li [aut], William Checkley [aut], Ciprian Crainiceanu [aut] Maintainer

More information

Package rbvs. R topics documented: August 29, Type Package Title Ranking-Based Variable Selection Version 1.0.

Package rbvs. R topics documented: August 29, Type Package Title Ranking-Based Variable Selection Version 1.0. Type Package Title Ranking-Based Variable Selection Version 1.0.2 Date 2015-12-08 Package rbvs August 29, 2016 Author Rafal Baranowski, Patrick Breheny, Isaac Turner Maintainer Rafal Baranowski

More information

Package beam. May 3, 2018

Package beam. May 3, 2018 Type Package Package beam May 3, 2018 Title Fast Bayesian Inference in Large Gaussian Graphical Models Version 1.0.2 Date 2018-05-03 Author Gwenael G.R. Leday [cre, aut], Ilaria Speranza [aut], Harry Gray

More information