Import Upstream version 2.0.1
Dirk Eddelbuettel
5 years ago
0 | 0 |
Package: effects
|
1 | |
Version: 2.0-0
|
2 | |
Date: 2008/10/20
|
|
1 |
Version: 2.0-1
|
|
2 |
Date: 2008/12/03
|
3 | 3 |
Title: Effect Displays for Linear, Generalized Linear, Multinomial-Logit, and Proportional-Odds Logit Models
|
4 | 4 |
Author: John Fox <jfox@mcmaster.ca> and Jangman Hong. We are grateful to Robert Andersen, David Firth, and
|
5 | 5 |
Michael Friendly, for various suggestions.
|
|
12 | 12 |
generalized linear, multinomial-logit, and proportional-odds logit models.
|
13 | 13 |
License: GPL (>= 2)
|
14 | 14 |
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
|
0 | 0 |
# effect generic and methods; allEffects
|
1 | 1 |
# John Fox and Jangman Hong
|
2 | |
# last modified 19 October 2008 by J. Fox
|
|
2 |
# last modified 3 December 2008 by J. Fox
|
3 | 3 |
|
4 | 4 |
effect <- function(term, mod, ...){
|
5 | 5 |
UseMethod("effect", mod)
|
|
296 | 296 |
discrepancy <- 100*sqrt(mean((fit1 - fit2)^2)/mean(fit1^2))
|
297 | 297 |
if (discrepancy > 0.1) warning(paste("There is a discrepancy of", round(discrepancy, 3),
|
298 | 298 |
"percent \n in the 'safe' predictions used to generate effect", term))
|
299 | |
X0 <- X0[,-1]
|
|
299 |
X0 <- X0[,-1, drop=FALSE]
|
300 | 300 |
b <- coef(mod)
|
301 | 301 |
p <- length(b) # corresponds to p - 1 in the text
|
302 | 302 |
alpha <- - mod$zeta # intercepts are negatives of thresholds
|
68 | 68 |
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).
|
69 | 69 |
|
70 | 70 |
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).
|