Codebase list effects / 553b7ef
Import Upstream version 2.0.1 Dirk Eddelbuettel 5 years ago
3 changed file(s) with 10 addition(s) and 6 deletion(s). Raw diff Collapse all Expand all
00 Package: effects
1 Version: 2.0-0
2 Date: 2008/10/20
1 Version: 2.0-1
2 Date: 2008/12/03
33 Title: Effect Displays for Linear, Generalized Linear, Multinomial-Logit, and Proportional-Odds Logit Models
44 Author: John Fox <jfox@mcmaster.ca> and Jangman Hong. We are grateful to Robert Andersen, David Firth, and
55 Michael Friendly, for various suggestions.
1212 generalized linear, multinomial-logit, and proportional-odds logit models.
1313 License: GPL (>= 2)
1414 URL: http://www.r-project.org, http://socserv.socsci.mcmaster.ca/jfox/
15 Revision: 19
16 Packaged: Thu Nov 27 05:08:06 2008; theussl
15 Revision: 20
16 Packaged: Sun Dec 7 05:09:14 2008; theussl
00 # effect generic and methods; allEffects
11 # John Fox and Jangman Hong
2 # last modified 19 October 2008 by J. Fox
2 # last modified 3 December 2008 by J. Fox
33
44 effect <- function(term, mod, ...){
55 UseMethod("effect", mod)
296296 discrepancy <- 100*sqrt(mean((fit1 - fit2)^2)/mean(fit1^2))
297297 if (discrepancy > 0.1) warning(paste("There is a discrepancy of", round(discrepancy, 3),
298298 "percent \n in the 'safe' predictions used to generate effect", term))
299 X0 <- X0[,-1]
299 X0 <- X0[,-1, drop=FALSE]
300300 b <- coef(mod)
301301 p <- length(b) # corresponds to p - 1 in the text
302302 alpha <- - mod$zeta # intercepts are negatives of thresholds
6868 o support added for multinomial and proportional-odds logit models, as fit by multinom() (in nnet package) and polr() (in MASS) package, following results in Fox and Andersen (2006).
6969
7070 o added the argument given.values to effect() methods for finer-grain control of displays.
71
72 Version 2.0-1
73
74 o Fixed bug in effect.polr() that prevented computation for a model with a single term (reported by Paul Prew).