zeroinfl {pscl}R Documentation

Zero-inflated Count Data Regression

Description

Fit zero-inflated regression models for count data via maximum likelihood.

Usage

zeroinfl(formula, data, subset, na.action,
  dist = c("poisson", "negbin", "geometric"),
  link = c("logit", "probit", "cloglog", "cauchit", "log"),
  control = zeroinfl.control(...),
  model = TRUE, y = TRUE, x = FALSE, ...)

Arguments

formula symbolic description of the model, see details.
data, subset, na.action arguments controlling formula processing via model.frame.
dist character specification of count model family (a log link is always used).
link character specification of link function in the binary zero-inflation model (a binomial family is always used).
control a list of control arguments specified via zeroinfl.control.
model, y, x logicals. If TRUE the corresponding components of the fit (model frame, response, model matrix) are returned.
... arguments passed to zeroinfl.control in the default setum the legend. legendLoc may be a vector, specifying a unique legend location for each requested trace plots. If legendLoc is of length 1, it will be replicated to have length equal to the number of requested trace plots.

See Also

ideal; pmatch for matching legislators' names. See legend for valid options to legendLoc.

Examples

data(s109)
## short run for demo purposes only
id1 <- ideal(s109,
             meanzero=TRUE,
             maxiter=500,
             burnin=100,thin=10,
             verbose=TRUE)
tracex(id1,legis="KENN")

## n.b., no such legislator named Horrendous Goblin
tracex(id1,legis=c("KENN","BOX","KYL","Horrendous Goblin"))

## Not run: 
id2 <- ideal(s109,
             d=2,
             maxiter=5000,   ## unidentified!
             burnin=0,
             thin=50)
tracex(id2,d=1,legis=c("KENNEDY","BOXER","KYL","Horrendous Goblin"))
tracex(id2,d=2,legis=c("KENNEDY","BOXER","KYL","Horrendous Goblin"))
tracex(id2,d=1:2,
       legis=c("KENNEDY","BOXER","KYL","Horrendous Goblin"))

## partial matching
tracex(id2,d=1:2,
       legis=c("KENN","BOX","BID","SNO","SPEC","MCCA","KYL",
               "Horrendous Goblin"),
       showAll=TRUE)
## End(Not run)

[Package pscl version 0.73 Index]
./usr/lib/R/site-library/pscl/html/unionDensity.html0000644000000000000000000000632210533476033021371 0ustar rootroot R: cross national rates of trade union density
unionDensity {pscl}R Documentation

cross national rates of trade union density

Description

Cross-national data on relative size of the trade unions and predictors, in 20 countries. Two of the predictors are highly collinear, and are the source of a debate between Stephens and Wallerstein (1991), later reviewed by Western and Jackman (1994).

Usage

data(unionDensity)

Format

    union
    numeric, percentage of the total number of wage and salary earners plus the unemployed who are union members, measured between 1975 and 1980, with most of the data drawn from 1979
    left
    numeric, an index tapping the extent to which parties of the left have controlled governments since 1919, due to Wilensky (1981).
    size
    numeric, log of labor force size, defined as the number of wage and salary earners, plus the unemployed
    concen
    numeric, percentage of employment, shipments, or production accounted for by the four largest enterprises in a particular industry, averaged over industries (with weights proportional to the size of the industry) and the resulting measure is normalized such that the United States scores a 1.0, and is due to Pryor (1973). Some of the scores on this variable are imputed using procedures described in Stephens and Wallerstein (1991, 945).

Source

Pryor, Frederic. 1973. Property and Industrial Organization in Communist and Capitalist Countries. Bloomington: Indiana University Press.

Stephens, John and Michael Wallerstein. 1991. Industrial Concentration, Country Size and Trade Union Membership. American Political Science Review 85:941-953.

Western, Bruce and Simon Jackman. 1994. Bayesian Inference for Comparative Research. American Political Science Review 88:412-423.

Wilensky, Harold L. 1981. Leftism, Catholicism, Democratic Corporatism: The Role of Political Parties in Recemt Welfare State Development. In The Development of Welfare States in Europe and America, ed. Peter Flora and Arnold J. Heidenheimer. New Brunswick: Transaction Books.

Examples

data(unionDensity)
summary(unionDensity)
pairs(unionDensity,
      labels=c("Union\nDensity",
        "Left\nGovernment",
        "log Size of\nLabor Force",
        "Economic\nConcentration"),
      lower.panel=function(x,y,digits=2){
        r <- cor(x,y)
        par(usr=c(0,1,0,1))
        text(.5,.5,
             format(c(r,0.123456789),digits=digits)[1],
             cex=1.5)
      }
      )
ols <- lm(union ~ left + size + concen,
          data=unionDensity)
summary(ols)

[Package pscl version 0.73 Index]
./usr/lib/R/site-library/pscl/html/vectorRepresentation.html0000644000000000000000000000637410533476036023140 0ustar rootroot R: convert roll call matrix to series of vectors
vectorRepresentation {pscl}R Documentation

convert roll call matrix to series of vectors

Description

Extract the information in a roll call matrix as a series of vectors with voting decision, a unique identifier for the legislator and a unique identifier for the roll call.

Usage

vectorRepresentation(object, dropList = list(codes = c("missing", "notInLegis")))

Arguments

object an object of class rollcall
dropList a dropList; see dropRollCall

Details

It is often the case that roll call matrices are sparse, say, when the roll call matrix has an “overlapping generations” structure; e.g., consider forming data by pooling across a long temporal sequence of legislatures such that relatively few of the legislators in the data set actually vote on any given roll call. In such a case, representing the data as a roll call matrix is not particularly helpful nor efficient, either for data summaries or modeling.

Value

A matrix with z rows, where z is the number of non-missing entries in object$votes, with ‘missingness’ defined by the codes component of the dropList. The matrix has 3 columns:

vote the voting decision, either a 1