Commit 00f3c658 authored by Christopher Lawrence's avatar Christopher Lawrence Committed by Andreas Tille

Import Debian changes 1.04.4-1

r-cran-pscl (1.04.4-1) unstable; urgency=low

  * New upstream release.
  * Rebuild for R 3.0.
parents a720b229 ddb22f6f
This diff is collapsed.
Package: pscl
Version: 1.03.10
Date: 2011-03-27
Version: 1.04.4
Date: 2012-06-12
Title: Political Science Computational Laboratory, Stanford University
Author: Simon Jackman, with contributions from Alex Tahk, Achim
Zeileis, Christina Maimone and Jim Fearon
......@@ -19,6 +19,6 @@ LazyLoad: true
LazyData: true
License: GPL-2
URL: http://pscl.stanford.edu/
Packaged: 2011-03-28 23:03:05 UTC; jackman
Packaged: 2012-06-13 00:55:00 UTC; jackman
Repository: CRAN
Date/Publication: 2011-03-31 15:18:56
Date/Publication: 2012-06-13 05:44:47
6e55e6571f5729f76216ca3212ad5686 *COPYRIGHTS
4d51503944c3c022c1c4125d45f2e5d0 *DESCRIPTION
f6d779a47ad2a560d95384f8f21f6ed9 *NAMESPACE
0d31362755cad3e709c6ffe6cddda5b5 *NEWS
e4141b58125086fe7a925a18a27fbf13 *R/betaHPD.r
fa1ccedd12e25d0f4b57c837eee688c5 *R/dropRollCall.r
9136707d4c7f8400c1581139132014eb *R/dropUnanimous.r
2d2ad2f4dd964d982bfb1b039913a847 *R/extractVotes.r
3a3b87569b3f7fbd008cd1d6553fdb32 *R/hello.r
a68a2ed5e435379d9dbabf719ae32701 *R/hitmiss.R
ed0e60f8f2df4e1f70be74fdff483bd0 *R/hurdle.R
826cd8a86151c764f6179b63f252c5cf *R/ideal.r
24cfd3cf6b0498e16ab9a08a5ed63fd4 *R/idealHelper.r
57c42afc03bc7b48bf57aad15e6b5696 *R/igamma.r
1069285f3fe6835578a863a1d05ab8db *R/margins.rollcall.r
7f33ab0717237682733911d1f50370b2 *R/ntable.R
93c40e4a84b0d2c4db72b7bb79b26a45 *R/odTest.R
2ccee1a9ff1cb45ad9c41aa072876814 *R/pi.r
aea47b7871d6bb1fce7c9cc57b864a75 *R/plot.ideal.r
e0d535a36192a68399200a5d7b2a43bd *R/postProcess.r
6b47bc9b373b1187662fef8941e5e91a *R/predict.ideal.r
d3423d8e4fb2d372947e30b5fbf0e0b1 *R/predprob.R
106f115dd003c08e60f45f43c75a3088 *R/predprob.glm.R
a14694458a410c3ff8fd70647009f54f *R/pseudoRSq.R
fa7303f57d5c336c47f05ec5d09f4175 *R/readKH.r
38612c0cdb48624c5f8e3cb0e2c753c4 *R/restrict.ideal.r
2dbbefb6f9c0b016c711dd8d3a270884 *R/rollcall.r
2327c6ca8e1f51b6c4c594a4d8ddcdec *R/seatsVotes.R
8181536f4cdf5dd0217ad9ead60c3546 *R/summary.ideal.r
0202cd83b23bb8c999f9d270f6e210a9 *R/toMCMC.r
bb44e8325e20f4a6a6e17b1346372eff *R/vuong.R
9aefa6635344ef8c977e224805ded336 *R/zeroinfl.R
bdfbae70de1517193e1dfb8740fe01e8 *R/zzz.R
53313b6f0b69be68a1fc8770c9ef7eb0 *README
860c7a4542ca222f8a3eaf80940fb625 *TODO
48d5186bc1c850ca764a4428fed72db9 *data/AustralianElectionPolling.rda
c00d0a7d9afc7f549864d9a1c1acc905 *data/AustralianElections.rda
1fd7bdaf9dc34c6a0f335f5b7e45c255 *data/EfronMorris.rda
55d9d1b1379537b08ea76b4334c345f3 *data/RockTheVote.rda
270a8877abcc0eba69a2d4953961fb06 *data/UKHouseOfCommons.rda
f915a5e3e05397653b34f4d496b0a289 *data/absentee.rda
33919d0bbc3570d4a99bae9d1823a374 *data/admit.rda
9bf4f0eae9528dedca5f6aeab65cb552 *data/bioChemists.rda
a1acc98d25d8a34c564522497a6ddc4a *data/ca2006.rda
d60b096feabfbb58999ff68355f8faeb *data/iraqVote.rda
a37e4bfd97430c9ea022b616102e2c36 *data/nj07.rda
010a897b9ed96c17484aee8378c27a9a *data/partycodes.rda
4bba832e5f3fe5b936d8a05bfcce9fd5 *data/politicalInformation.rda
47f4a8c0c38c7240989f2574ebb8bdc6 *data/presidentialElections.rda
00a6f68d522e345991ba69ca93ddb171 *data/prussian.rda
773fa6967a9aa1ec5a3e56cfbc60cc7e *data/s109.rda
b51d0806c46e14ed3661fb47d1048087 *data/sc9497.rda
713f3c337726d96eb138ef220289a4d8 *data/state.info.rda
d7638296db19c4ba7de8ffa89d4d144c *data/unionDensity.rda
497a2fb245ca5588e562ba3efa9fd73f *data/vote92.rda
b1684d7631e2aaf9b870b79adae6832f *inst/CITATION
73fd5542d60b3c0afdf6fd36f0a55ebb *inst/doc/DebTrivedi.rda
f0b2acaed3829613387d308477b32cfb *inst/doc/countreg.Rnw
5fbb807bd14a6fa797d43474e73009bb *inst/doc/countreg.bib
492f73850a1b7886092f88d6367254ea *inst/doc/countreg.pdf
1f374780d3fdab077448b3f8c8ed4535 *man/AustralianElectionPolling.Rd
4c7220ae568fc8650e5a083ecfe61751 *man/AustralianElections.Rd
413c8bb8c2a97bf96a086752b64f9727 *man/EfronMorris.Rd
8d936782297f143d7b583f58fc5b6ac7 *man/RockTheVote.Rd
e530063893fe76e74d0bce2443647932 *man/UKHouseOfCommons.Rd
c129da4f0e4ec6908b9531e176bcc34e *man/absentee.Rd
9f58b0a319641b8780d6717b4189262c *man/admit.Rd
21e2df080979a911fe55565ee1cbb02f *man/betaHPD.Rd
67cb83cb4c84b23f9601d663877deebf *man/bioChemists.Rd
97530d29c9ef5df8617be6703bbcb364 *man/ca2006.Rd
83a1c4252ad2a97f2701495bd0d2d282 *man/computeMargins.Rd
b20779e918ed3190c82eb19a25aab843 *man/constrain.items.Rd
cde2f4e188fbed3a385e6a687faf15b5 *man/constrain.legis.Rd
3332b1e2c6825660602c04ad75f6392d *man/convertCodes.Rd
5a954aadd19f2814e98c8848232de93e *man/dropRollCall.Rd
1bfa8bbb776eeae989dcb4ffa590a156 *man/dropUnanimous.Rd
2b7432e7385f3582d701153569a1e89f *man/extractRollCallObject.Rd
a20a016755514fd36ab11b3ec8ce07d4 *man/hitmiss.Rd
edc14a2d7f63d105e16a7224ea866e2b *man/hurdle.Rd
a2cdd121c20655dbec00738598efed1a *man/hurdle.control.Rd
a2fca81930e1f2dc594a7a551bb6488f *man/hurdletest.Rd
33585828c1fea3777ade0fb9fc8a9de5 *man/ideal.Rd
8c6bb8a7e10235c854ebbc2456b69bab *man/idealToMCMC.Rd
f18d51d590ed9904dfe6e41571fe3903 *man/igamma.Rd
532e377d3f632d4d8d467734b66a7c34 *man/iraqVote.Rd
ad0ccd84450a594df90119fa3ef8461e *man/nj07.Rd
078b921a42e58dd7330c8df04d127fed *man/ntable.Rd
a370eb5db65f4fc1aefa6e807facf22e *man/odTest.Rd
ec2940ca232be004fd6148651ce42dbd *man/pR2.Rd
99951244af04af9a168419c38096b60b *man/partycodes.Rd
549c790a485bfabb8255f84012bc67f6 *man/plot.ideal.Rd
32f60d2b0f1d85b2947891731567f17a *man/plot.predict.ideal.Rd
cd69945b628a1030c3a361b23b04d75a *man/plot.seatsVotes.Rd
28363c6cffcd612ae93335e9abd066ef *man/politicalInformation.Rd
7a9135f5914b656bc521f8f3333856bf *man/postProcess.Rd
589a61aaef2ea8a77cada485036f1685 *man/predict.hurdle.Rd
b2ce558820a4ad6140fc82be663d0b37 *man/predict.ideal.Rd
d43b9cc311c2a17ff678c6b1e2fa95e8 *man/predict.zeroinfl.Rd
2cc067fd655c891057604ddecd7f7be2 *man/predprob.Rd
6f0d72cddc3d45b83d09074b77aa7e48 *man/predprob.glm.Rd
9939090df9d59afebb2e2948657c3bf2 *man/predprob.ideal.Rd
b72bec49edb1288224e0b08cf484d4e9 *man/presidentialElections.Rd
40b952f533b01527691b62c22fa1b757 *man/prussian.Rd
f2e85675a400d5926d06728fd8da5867 *man/readKH.Rd
3ed90ebe8e28b86cfff88c7b9d3a1d1f *man/rollcall.Rd
a7eef4fbf81a2e82d8f9d537c99c1811 *man/s109.Rd
020d6e0155cef909fe932536998bc684 *man/sc9497.Rd
b72ce8933d92ee28c1a4fa7cf7eb6b6e *man/seatsVotes.Rd
23bff5995d683d5bf95bce59ca47fa86 *man/simpi.Rd
c351971ed35a4a7c1e81d26048e239a9 *man/state.info.Rd
09ea85f6b8ef9bfa80769c827be48770 *man/summary.ideal.Rd
69d21844fd8dd6c2a445302c84d210ff *man/summary.rollcall.Rd
b997e43520c34b348b421bc09ab0f900 *man/tracex.Rd
2531fcd99d3935897ec347c7d298b84e *man/unionDensity.Rd
77fc48107d0d11045b2db0538a11c58f *man/vectorRepresentation.Rd
e98499c1ce4c6b994fa946375f650bfb *man/vote92.Rd
ff3f06cb610af7bb183235be14b16662 *man/vuong.Rd
0b67233ce3f099152201d376e3adacd9 *man/zeroinfl.Rd
a71cbe2fdb4bfc8d678f4fbfaa36f6ca *man/zeroinfl.control.Rd
411afc0af4307234a6659002f8cb9a5f *src/IDEAL.c
c1242e2c0dc49254b3103abcaa3fce43 *src/bayesreg.c
84fc8d596f9ed6fff436213f5aa0176b *src/check.c
7827d05ccbfda37a6770d1893ad2657a *src/chol.c
54b5d46b82a2d8d1b711265ae6976ca7 *src/chol.h
27ff6dd23ef01d1b20ebf152634ab2c1 *src/crossprod.c
b5cfc01c17e0d459aea4d5c7a4324059 *src/dmatTOdvec.c
641d96ada563d7b14e368d438c82100b *src/dtnorm.c
535fd3e635d6d566fe6b826003974385 *src/dvecTOdmat.c
e2caa6a2b8babf8fbddf2a38162dce82 *src/gaussj.c
a0ce9dacf3232a1b44ae9751b3576157 *src/ideal.h
14d39512d67823bb714f49a60271612e *src/pi.c
2ef159d3f034d158763a31e44c334d21 *src/predict.c
75a219a7638c2da5c7412785e9de37cf *src/printmat.c
6481e2946861c489decc8f5cf927a929 *src/renormalize.c
6df18e9e98db01a252f5944670fa0366 *src/rigamma.c
3a9b673c687b42a9a32fda8ee46b0ccc *src/rmvnorm.c
c0fdc0b2f60d730bba7f5fbd6170d4f1 *src/updateb.c
2751e0771f01014a0d856d4057a8ca34 *src/updatex.c
13831bf39bc2ae096899c94239770c9b *src/updatey.c
419ed48fd112dd27f0dea33ed73b0d5c *src/util.c
4531f2dfbc17c8f2f692de0e7c97b7c7 *src/util.h
5967f2c183b3301343fe317875a181bc *src/xchol.c
21805fdd82f57d48144b119f84e73219 *src/xreg.c
1.04.4 * clean up partial matches to args, keeping R check happy
1.04.3 * bug in postProcess, not evaluating args in call of ideal object
1.04.2 * minor typo in dropRollCall.Rd
1.04.1 * fixed bug in non-English locales for hurdle/zeroinfl formula
processing if second part of formula contained a period.
1.04 * fixed quite serious bug with storing item parameters
* COPYING file deprecated (?), deleted from repos with r174
1.03.12 * minor bug in tracex with d>1
* deprecate showAll plotting option in tracex, change to "multi" (default=FALSE)
1.03.11 * small change to documentation for ca2006 (thanks Arthur Aguirre)
1.03.10 * pythag deprecated in Rmath.h, use system hypot instead (3/13/2011)
* warnings about memory etc only come on with verbose=TRUE (req by Stephen Jessee)
......
......@@ -7,7 +7,7 @@
ver <- read.dcf(file=system.file("DESCRIPTION", package=pkgname),
fields=c("Version", "Date"))
cat(paste(pkgname, ver[1], "\t", ver[2], "\n"))
packageStartupMessage(paste(pkgname, ver[1], "\t", ver[2], "\n"))
#cat(" R classes and methods developed in the\n")
#cat(" Political Science Computational Laboratory\n")
......
......@@ -187,7 +187,7 @@ hurdle <- function(formula, data, subset, na.action, weights, offset,
ffz <- ffc <- ff <- formula
ffz[[2]] <- NULL
}
if(length(grep("in formula and no", try(terms(ffz), silent = TRUE), fixed = TRUE)) > 0) {
if(inherits(try(terms(ffz), silent = TRUE), "try-error")) {
ffz <- eval(parse(text = sprintf( paste("%s -", deparse(ffc[[2]])), deparse(ffz) )))
}
......
......@@ -18,29 +18,32 @@ ideal <- function(object,
cat("ideal: analysis of roll call data via Markov chain Monte Carlo methods.\n\n")
## name of rollcall object as unevaluated, parsed expression
## calling args, some evaluated if symbols, for future use
cl <- match.call()
if(is.null(cl$d))
cl$d <- d
if(is.null(cl$d) | is.symbol(cl$d))
cl$d <- eval(d,parent.frame())
if(is.null(cl$codes))
cl$codes <- codes
if(is.null(cl$dropList))
cl$dropList <- dropList
if(is.null(cl$maxiter))
cl$maxiter <- maxiter
if(is.null(cl$thin))
cl$thin <- thin
if(is.null(cl$burnin))
cl$burnin <- burnin
if(is.null(cl$maxiter) | is.symbol(cl$maxiter))
cl$maxiter <- eval(maxiter,parent.frame())
if(is.null(cl$thin) | is.symbol(cl$thin))
cl$thin <- eval(thin,parent.frame())
if(is.null(cl$burnin) | is.symbol(cl$burnin))
cl$burnin <- eval(burnin,parent.frame())
if(is.null(cl$impute))
cl$impute <- impute
if(is.null(cl$mda))
cl$mda <- mda
if(is.null(cl$store.item))
cl$store.item <- store.item
if(is.null(cl$store.item) | is.symbol(cl$store.item))
cl$store.item <- eval(store.item,parent.frame())
if(is.null(cl$normalize))
cl$normalize <- normalize
if(is.null(cl$verbose))
cl$verbose <- verbose
## check validity of user arguments
if (!("rollcall" %in% class(object)))
stop("object must be of class rollcall")
......@@ -192,8 +195,7 @@ ideal <- function(object,
xpv <- matrix(priors$xpv,n,d)
if(is.matrix(priors$xpv))
xpv <- priors$xpv
}
else{
} else {
if(verbose)
cat("no prior precisions supplied for ideal points,\n",
"setting to default of 1\n")
......@@ -205,8 +207,7 @@ ideal <- function(object,
bp <- matrix(priors$bp,m,d+1)
if(is.matrix(priors$bp))
bp <- priors$bp
}
else{
} else {
if(verbose)
cat("no prior means supplied for item parameters,\n",
"setting to default to 0\n")
......@@ -214,15 +215,17 @@ ideal <- function(object,
}
if(!is.null(priors$bpv)){
if(length(priors$bpv)==1) ## user supplied a scalar
if(length(priors$bpv)==1){ ## user supplied a scalar
bpv <- matrix(priors$bpv,m,d+1)
if(is.matrix(priors$bpv))
}
if(is.matrix(priors$bpv)){
bpv <- priors$bpv
}
else{
if(verbose)
}
} else {
if(verbose){
cat("no prior precisions supplied for item parameters,\n",
"setting to default of .04\n")
}
bpv <- matrix(.04,m,d+1)
}
......@@ -302,7 +305,7 @@ ideal <- function(object,
if(!is.null(startvals$x)){
if(length(startvals$x) != n*d)
stop("length of xstart not n by d")
stop("supplied start values for x is not n by d")
if(d==1)
xstart <- matrix(startvals$x,ncol=1)
else
......@@ -410,7 +413,8 @@ ideal <- function(object,
as.double(xp), as.double(xpv), as.double(bp),
as.double(bpv), as.double(xstart), as.double(bstart),
xoutput=as.double(rep(0,n*d*numrec)),
boutput=NULL,as.integer(burnin),
boutput=as.double(0),
as.integer(burnin),
as.integer(usefile), as.integer(store.item), as.character(file),
as.integer(verbose))
}
......@@ -455,16 +459,17 @@ ideal <- function(object,
###############################################################
## item parameters
if (store.item) {
b <- array(output$boutput,c(d+1,m,numrec)) ## parameters by votes by iters
dimnames(b) <- list(c(paste("Discrimination D",1:d,sep=""),
if(store.item){
print(vote.names)
b <- array(output$boutput,c(m,d+1,numrec)) ## votes by parameters by iters
dimnames(b) <- list(vote.names,
c(paste("Discrimination D",1:d,sep=""),
"Difficulty"),
vote.names,
itervec)
## reshape to iteration first format
b <- aperm(b,c(3,2,1)) ## iters by votes by parameters
b <- aperm(b,c(3,1,2)) ## iters by votes by parameters
if(verbose)
cat("...computing posterior means for item parameters...")
cat("...computing posterior means for item parameters...")
betabar <- getMean(keep,b)
if(verbose)
cat("done\n")
......@@ -533,7 +538,7 @@ probit <- function(y,x){
family=binomial(link=probit))
b <- coef(glmobj)
k <- length(b)
b <- b[c(2:k,1)]
b <- b[c(2:k,1)] ## put intercept last
b
}
......@@ -550,7 +555,13 @@ b.startvalues <- function(v,x,d,verbose=FALSE){
for(j in 1:m){
b[j,] <- probit(y=v[,j],x=x)
}
b[,d+1] <- -b[,d+1] ## flip the sign on the intercept, make it a difficulty parameter
## check for crazy discrimination parameters
for(j in 1:d){
bad <- is.na(b[,j])
b[bad,j] <- 0
}
b[,d+1] <- -b[,d+1] ## flip the sign on the intercepts, make it a difficulty parameter
if(verbose)
cat("done\n")
b
......
......@@ -249,7 +249,7 @@ tracex <- function(object,
legis=NULL,
d=1,
conf.int=0.95,
showAll=FALSE,
multi=FALSE,
burnin=NULL,
span=.25,
legendLoc="topright"){
......@@ -347,7 +347,7 @@ tracex <- function(object,
for (i in 1:nLegis){
meat <- object$x[keep,p[[i]],1]
meat <- object$x[keep,p[[i]],d]
iter <- as.numeric(dimnames(object$x)[[1]])[keep]
par(mar=c(4, 4, 4, 2) + 0.1)
......@@ -424,12 +424,12 @@ tracex <- function(object,
col=col[i])
}
if(showAll){ ## plot all 2d traces at once
if(!multi){ ## plot all 2d traces at once
xRange <- range(unlist(lapply(meat,function(x)x$x)),na.rm=TRUE)
yRange <- range(unlist(lapply(meat,function(x)x$y)),na.rm=TRUE)
require(graphics)
layout(mat=matrix(c(1,2),1,2,byrow=TRUE),
width=c(.7,.3))
widths=c(.7,.3))
par(mar=c(4,4,1,1))
plot(x=xRange,y=yRange,
......@@ -478,7 +478,7 @@ tracex <- function(object,
}
}
if(!showAll){
if(multi){ ## multiple panels, one per legislator
par(mfrow=c(2,2))
count <- 0
for(i in 1:nLegis){
......
......@@ -191,8 +191,15 @@ implementConstraints <- function(object,tMat,debug){
newBeta <- array(NA,dim(object$beta))
}
## get burnin
##if(is.symbol(object$call$burnin)){
## burnin <- eval(object$call$burnin)
##} else {
## burnin <- object$call$burnin
##}
keep <- checkBurnIn(object,
burnin=object$call$burnin)
burnin=eval(object$call$burnin))
nSavedIters <- dim(object$x)[1]
newX <- array(NA,dim(object$x))
newObject <- object ## copy ideal object
......
## predict method for class ideal
predict.ideal <- function(object,
cutoff=0.5,
burnin=NULL,
......@@ -48,15 +47,19 @@ predict.ideal <- function(object,
correct <- predprob
if(!is.null(burnin)){
cat("Computing posterior means using ideal object.\n")
x1 <- matrix(apply(object$x[keep,-1],2,mean),
nrow=object$n,ncol=object$d,byrow=TRUE)
x1 <- matrix(apply(object$x[keep,],
c(2,3),
mean),
nrow=object$n,
ncol=object$d,
byrow=TRUE)
x1 <- cbind(x1,-1) ## negative intercept !!! SDJ 05/15/07
b <- matrix(apply(object$beta[keep,-1],2,mean),
nrow=object$m,ncol=object$d+1,byrow=TRUE)
}
else{
cat("Using posterior means in ideal object.\n")
x1 <- cbind(object$xbar,-1) ## negative intercept !!! SDJ 01/22/07
x1 <- cbind(object$xbar,-1.0) ## negative intercept !!! SDJ 01/22/07
b <- object$betabar
}
mu <- tcrossprod(x1,b) ## this should be n by (d+1) times (d+1) by m
......
......@@ -107,7 +107,7 @@ readKH <- function(file,
nay=nay,
missing=missing,
notInLegis=notInLegis,
legis.name=legisId,
legis.names=legisId,
legis.data=legis.data,
vote.data=vote.data,
desc=desc,
......
......@@ -272,6 +272,7 @@ convertCodes <- function(object,codes=object$codes){
tmp <- matrix(-999,
dim(object$votes)[1],
dim(object$votes)[2])
dimnames(tmp) <- dimnames(object$votes)
tmp[object$votes %in% theCodes$yea] <- 1
tmp[object$votes %in% theCodes$nay] <- 0
if(!is.null(theCodes$missing)){
......
......@@ -151,7 +151,7 @@ zeroinfl <- function(formula, data, subset, na.action, weights, offset,
ffz <- ffc <- ff <- formula
ffz[[2]] <- NULL
}
if(length(grep("in formula and no", try(terms(ffz), silent = TRUE), fixed = TRUE)) > 0) {
if(inherits(try(terms(ffz), silent = TRUE), "try-error")) {
ffz <- eval(parse(text = sprintf( paste("%s -", deparse(ffc[[2]])), deparse(ffz) )))
}
......
......@@ -12,12 +12,12 @@
##}
.onAttach <- function(...){
cat("Classes and Methods for R developed in the\n")
cat("Political Science Computational Laboratory\n")
cat("Department of Political Science\n")
cat("Stanford University\n")
cat("Simon Jackman\n")
cat("hurdle and zeroinfl functions by Achim Zeileis\n")
packageStartupMessage("Classes and Methods for R developed in the\n")
packageStartupMessage("Political Science Computational Laboratory\n")
packageStartupMessage("Department of Political Science\n")
packageStartupMessage("Stanford University\n")
packageStartupMessage("Simon Jackman\n")
packageStartupMessage("hurdle and zeroinfl functions by Achim Zeileis\n")
}
.onUnload <- function(libpath){
......
No preview for this file type
r-cran-pscl (1.03.10-1.1) unstable; urgency=low
r-cran-pscl (1.04.4-1) unstable; urgency=low
* Non-maintainer upload.
* debian/control:
- Build-depend on r-cran-vcd and r-cran-colorspace to fix FTBFS
on all architectures (Closes: #629748).
* New upstream release.
* Rebuild for R 3.0.
-- Luca Falavigna <dktrkranz@debian.org> Sat, 04 Aug 2012 01:45:43 +0200
-- Chris Lawrence <lawrencc@debian.org> Sun, 31 Mar 2013 20:55:40 -0400
r-cran-pscl (1.03.10-1) unstable; urgency=low
......
......@@ -2,13 +2,13 @@ Source: r-cran-pscl
Section: gnu-r
Priority: optional
Maintainer: Chris Lawrence <lawrencc@debian.org>
Build-Depends: debhelper (>> 7), cdbs, r-base-dev (>> 2.3.0), r-cran-mass, r-cran-mvtnorm (>= 0.7.5-2), r-cran-coda, r-cran-lattice, r-cran-gam, r-cran-vcd, r-cran-colorspace
Standards-Version: 3.9.1
Build-Depends: debhelper (>> 9), cdbs, r-base-dev (>= 3.0), r-cran-mass, r-cran-mvtnorm (>= 0.7.5-2), r-cran-coda, r-cran-lattice, r-cran-gam, dpkg-dev (>= 1.16.1~), r-cran-vcd (>= 1:1.2-13)
Standards-Version: 3.9.3
Homepage: http://pscl.stanford.edu/
Package: r-cran-pscl
Architecture: any
Depends: r-base-core (>> 2.3.0), r-cran-mass, r-cran-mvtnorm (>= 0.7.5-2), r-cran-coda, r-cran-lattice, r-cran-gam, ${shlibs:Depends}, ${misc:Depends}
Depends: r-cran-mass, r-cran-mvtnorm (>= 0.7.5-2), r-cran-coda, r-cran-lattice, r-cran-gam, ${shlibs:Depends}, ${misc:Depends}, ${R:Depends}, r-cran-vcd (>= 1:1.2-13)
Suggests: r-cran-mcmcpack, r-cran-zoo, r-cran-sandwich, r-cran-lmtest, r-cran-car
Enhances: r-cran-mass
Description: GNU R package for discrete data models
......
......@@ -3,24 +3,16 @@
# debian/rules file for the Debian/GNU Linux r-cran-car package
# Copyright 2003 by Dirk Eddelbuettel <edd@debian.org>
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/langcore.mk
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk
## We need the CRAN (upstream) name
cranName := $(shell grep Package: DESCRIPTION | cut -f2 -d" ")
## and we need to build a Debian Policy-conformant lower-case package name
cranNameLC := $(shell echo $(cranName) | tr "[A-Z]" "[a-z]" | tr "." "-" )
## which we can use to build the package directory
package := r-cran-$(cranNameLC)
## which we use for the to-be-installed-in directory
debRlib := $(CURDIR)/debian/$(package)/usr/lib/R/site-library
PKG_CFLAGS=$(CFLAGS)
PKG_CXXFLAGS=$(CXXFLAGS)
PKG_CPPFLAGS=$(CPPFLAGS)
PKG_FFLAGS=$(FFLAGS)
DEB_INSTALL_CHANGELOGS_ALL := NEWS
export PKG_CFLAGS PKG_CXXFLAGS PKG_CPPFLAGS PKG_FFLAGS
common-install-indep:: R_any_arch
common-install-arch:: R_any_arch
makeFlags="LDFLAGS=$(LDFLAGS)"
R_any_arch:
dh_installdirs usr/lib/R/site-library
R CMD INSTALL -l $(debRlib) --clean .
rm -vf $(debRlib)/R.css $(debRlib)/$(cranName)/COPYING
include /usr/share/R/debian/r-cran.mk
(TeX-add-style-hook "countreg"
(lambda ()
(LaTeX-add-bibliographies)
(LaTeX-add-labels
"sec:intro"
"sec:software"
"tab:overview"
"eq:family"
"eq:mean"
"eq:Poisson"
"eq:negbin"
"eq:hurdle"
"eq:hurdle-mean"
"eq:zeroinfl"
"eq:zeroinfl-mean"
"sec:illustrations"
"fig:ofp"
"fig:bad-good"
"fig:ofp2"
"tab:summary"
"sec:summary"
"app:hurdle"
"app:zeroinfl"
"app:methods"
"tab:methods"
"app:replication")
(TeX-add-symbols
'("fct" 1)
'("class" 1))
(TeX-run-style-hooks
"thumbpdf"
"latex2e"
"jss10"
"jss"
"nojss")))
No preview for this file type
......@@ -31,9 +31,11 @@
}
\source{2006 data from the California Secretary of State's web site,
\url{http://vote.ss.ca.gov/Returns/usrep/all.htm} (last updated
Tuesday November 14, 2006). 2004 and 2000 presidential vote in
congressional districts from the 2006 \emph{Almanac of American Politics}.
\url{http://vote2006.sos.ca.gov/Returns/usrep/all.htm}; Excel data at
\url{http://www.sos.ca.gov/elections/sov/2006_general/congress.xls}.
2004 and 2000 presidential vote in congressional districts from the 2006 \emph{Almanac of American Politics}.
Thanks to Arthur Aguirre for the updated links, above.
}
\references{
......
......@@ -41,7 +41,7 @@ dropRollCall(object, dropList,debug=FALSE)
\item{dropVotes}{an \code{\link{expression}} that evaluates to
mode \code{logical}, vector of length equal to the number of
rollcalls represented in \code{object}. The expression is evaluated
in the \code{votes.data} component of the rollcall \code{object}.
in the \code{vote.data} component of the rollcall \code{object}.
Rollcalls for which the expression evaluates to \code{TRUE} are
dropped.}
}
......
......@@ -54,10 +54,8 @@ ideal(object, codes = object$codes,
\item{normalize}{\code{\link{logical}}, impose identification with
the constraint that the ideal points have mean zero and
standard deviation one. This option is only functional for
unidimensional models (i.e., \code{d=1}), and is sufficient to
locally identify the model parameters in this case; more
restrictions are required for identification when \code{d > 1}.
standard deviation one, in each dimension. For one dimensional models this option is sufficient to
locally identify the model parameters.
See Details.}
\item{meanzero}{to be deprecated/ignored; use \code{normalize} instead.}
......@@ -303,8 +301,10 @@ ideal(object, codes = object$codes,
the MCMC samples for the item-specific parameters, using iterations
\code{burnin} to \code{maxiter}, at an interval of \code{thin}.}
\item{args}{calling arguments, evaluated in the frame calling \code{ideal}.}
\item{call}{an object of class \code{\link{call}}, containing
the arguments passed to \code{ideal} as unevaluated expressions.}
the arguments passed to \code{ideal} as unevaluated expressions or values (for functions arguments that evaluate to scalar integer or logical such as \code{maxiter}, \code{burnin}, etc).}
}
\references{
......
......@@ -9,7 +9,7 @@
}
\usage{
plot.predict.ideal(x, type = c("legis", "votes"),...)
\method{plot}{predict.ideal}(x, type = c("legis", "votes"),...)
}
\arguments{
......
......@@ -6,7 +6,7 @@
Plot seats-votes curves produced by \code{seatsVotes}
}
\usage{
plot.seatsVotes(x, type = c("seatsVotes", "density"),
\method{plot}{seatsVotes}(x, type = c("seatsVotes", "density"),
legend = "bottomright", transform=FALSE, ...)
}
%- maybe also 'usage' for other objects documented here.
......
......@@ -68,8 +68,12 @@
compute fitted responses. The latter additionally provides the predicted density
(i.e., probabilities for the observed counts), the predicted mean from the count
component (without zero hurdle) and the predicted ratio of probabilities for
observing a non-zero count. The \code{\link[stats]{residuals}} method can compute
raw residuals (observed - fitted) and Pearson residuals (raw residuals scaled by
observing a non-zero count. The latter is the ratio of probabilities for a non-zero
implied by the zero hurdle component and a non-zero count in the non-truncated
count distribution. See also Appendix C in Zeileis et al. (2008).
The \code{\link[stats]{residuals}} method can compute raw residuals
(observed - fitted) and Pearson residuals (raw residuals scaled by
square root of variance function).
The \code{\link[stats]{terms}} and \code{\link[stats]{model.matrix}} extractors can
......@@ -79,6 +83,13 @@
can be called to compute information criteria.
}
\references{
Zeileis, Achim, Christian Kleiber and Simon Jackman 2008.
\dQuote{Regression Models for Count Data in R.}
\emph{Journal of Statistical Software}, \bold{27}(8).
URL \url{http://www.jstatsoft.org/v27/i08/}.
}
\author{Achim Zeileis <Achim.Zeileis@R-project.org>}
\seealso{\code{\link{hurdle}}}
......
......@@ -10,7 +10,7 @@
\usage{
tracex(object, legis=NULL, d=1, conf.int=0.95,
showAll = FALSE, burnin=NULL,span=.25,
multi = FALSE, burnin=NULL,span=.25,
legendLoc="topright")
}
......@@ -23,7 +23,7 @@ tracex(object, legis=NULL, d=1, conf.int=0.95,
dimension(s) to be traced.}
\item{conf.int}{numeric, the level of the confidence interval on the
posterior mean to be plotted.}
\item{showAll}{logical, if \code{TRUE} and \code{length(d)==2},
\item{multi}{logical, multiple plotting panels, one per legislators? If \code{FALSE} (default) and \code{length(d)==2},
display traces for all selected legislators' ideal points on
the one plot.}
\item{burnin}{of the recorded MCMC samples, how many to discard as
......@@ -81,8 +81,8 @@ tracex(id1,legis=c("KENN","BOX","KYL","Thomas Bayes"))
\dontrun{
id2 <- ideal(s109,
d=2,
maxiter=5000, ## unidentified!
d=2, ## unidentified!
maxiter=5000,
burnin=0,
thin=50)
tracex(id2,d=1,legis=c("KENNEDY","BOXER","KYL","Thomas Bayes"))
......@@ -94,7 +94,7 @@ tracex(id2,d=1:2,
tracex(id2,d=1:2,
legis=c("KENN","BOX","BID","SNO","SPEC","MCCA","KYL",
"Thomas Bayes"),
showAll=TRUE)
multi=TRUE)
}
}
......
#include <stdio.h>
#include "util.h"
#include <R_ext/Print.h>