Package 'basicspace'

Title: Recovering a Basic Space from Issue Scales
Description: Provides functions to estimate latent dimensions of choice and judgment using Aldrich-McKelvey and Blackbox scaling methods, as described in Poole et al. (2016, <doi:10.18637/jss.v069.i07>). These techniques allow researchers (particularly those analyzing political attitudes, public opinion, and legislative behavior) to recover spatial estimates of political actors' ideal points and stimuli from issue scale data, accounting for perceptual bias, multidimensional spaces, and missing data. The package uses singular value decomposition and alternating least squares (ALS) procedures to scale self-placement and perceptual data into a common latent space for the analysis of ideological or evaluative dimensions. Functionality also include tools for assessing model fit, handling complex survey data structures, and reproducing simulated datasets for methodological validation.
Authors: Royce Carroll [aut], Christopher Hare [aut, cre], Jeffrey B. Lewis [aut], James Lo [aut], Keith T. Poole [aut], Howard Rosenthal [aut]
Maintainer: Christopher Hare <[email protected]>
License: GPL-2
Version: 0.25
Built: 2024-12-04 05:26:36 UTC
Source: https://github.com/cran/basicspace

Help Index


Aldrich-McKelvey Scaling

Description

aldmck is a function that takes a matrix of perceptual data, such as liberal-conservative rankings of various stimuli, and recovers the true location of those stimuli in a spatial model. It differs from procedures such as wnominate, which instead use preference data to estimate candidate and citizen positions. The procedure here, developed by John Aldrich and Richard McKelvey in 1977, is restricted to estimating data with no missing values and only in one dimension. Please refer to the blackbox and blackbox_transpose functions in this package for procedures that accomodate missing data and multidimensionality estimates.

Usage

aldmck(data, respondent=0, missing=NULL, polarity, verbose=FALSE)

Arguments

data

matrix of numeric values, containing the perceptual data. Respondents should be organized on rows, and stimuli on columns. It is helpful, though not necessary, to include row names and column names.

respondent

integer, specifies the column in the data matrix of the stimuli that contains the respondent's self-placement on the scale. Setting respondent = 0 specifies that the self-placement data is not available. Self-placement data is not required to estimate the locations of the stimuli, but is required if recovery of the respondent ideal points, or distortion parameters is desired. Note that no distortion parameters are estimated in AM without self-placements because they are not needed, see equation (24) in Aldrich and McKelvey (1977) for proof.

missing

vector or matrix of numeric values, sets the missing values for the data. NA values are always treated as missing regardless of what is set here. Observations with missing data are discarded before analysis. If input is a vector, then the vector is assumed to contain the missing value codes for all the data. If the input is a matrix, it must be of dimension p x q, where p is the maximum number of missing values and q is the number of columns in the data. Each column of the inputted matrix then specifies the missing data values for the respective variables in data. If null (default), no missing values are in the data other than the standard NA value.

polarity

integer, specifies the column in the data matrix of the stimuli that is to be set on the left side (generally this means a liberal)

verbose

logical, indicates whether aldmck should print out detailed output when scaling the data.

Value

An object of class aldmck.

legislators

vector, containing the recovered locations of the stimuli. The names of the stimuli are attached if provided as column names in the argument data, otherwise they are generated sequentiall as 'stim1', 'stim2', etc.

respondents

matrix, containing the information estimated for each respondent. Observations which were discarded in the estimation for missing data purposes have been NA'd out:

intercept

Intercept of perceptual distortion for respondent.

weight

Weight of perceptual distortion for respondent.

idealpt

Estimated location of the respondent. Note that these positions are still calculated for individuals with negative weights, so these may need to be discarded. Note that this will not be calculated if self-placements are not provided in the data.

selfplace

The self-reported location of the individual, copied from the data argument if respondent is not set to 0.

polinfo

Estimated political information of respondent, calculated as the correlation between the true and reported stimulus locations. The validation of this measure is provided in the article by Palfrey and Poole in the references. Note that this measure is included even for respondents that were not used in the estimation. Individuals with negative weights have also been assigned a political information score of 0, rather than negative scores.

eigenvalues

A vector of the eigenvalues from the estimation.

AMfit

Ratio of overall variance to perceptions in scaled data divided by average variance. This measure of fit, described by Aldrich and McKelvey, measures the amount of reduction of the variance of the scaled over unscaled data.

N

Number of respondents used in the estimation (i.e. had no missing data)

N.neg

Number of cases with negative weights. Only calculated if respondent self-placements are specified, will equal 0 if not.

N.pos

Number of cases with positive weights. Only calculated if respondent self-placements are specified, will equal 0 if not.

Author(s)

Keith Poole [email protected]

Howard Rosenthal [email protected]

Jeffrey Lewis [email protected]

James Lo [email protected]

Royce Carroll [email protected]

Christopher Hare [email protected]

References

John H. Aldrich and Richard D. McKelvey. 1977. “A Method of Scaling with Applications to the 1968 and 1972 Presidential Elections.” American Political Science Review 71(1): 111-130. doi: 10.2307/1956957

David A. Armstrong II, Ryan Bakker, Royce Carroll, Christopher Hare, Keith T. Poole, and Howard Rosenthal. 2021. Analyzing Spatial Models of Choice and Judgment. 2nd ed. Statistics in the Social and Behavioral Sciences Series. Boca Raton, FL: Chapman & Hall/CRC. doi: 10.1201/9781315197609

Thomas R. Palfrey and Keith T. Poole. 1987. “The Relationship between Information, Ideology, and Voting Behavior.” American Journal of Political Science 31(3): 511-530. doi: 10.2307/2111281

Keith T. Poole, Jeffrey B. Lewis, Howard Rosenthal, James Lo, and Royce Carroll. 2016. “Recovering a Basic Space from Issue Scales in R.” Journal of Statistical Software 69(7): 1-21. doi:10.18637/jss.v069.i07

Keith T. Poole. 1998. “Recovering a Basic Space From a Set of Issue Scales.” American Journal of Political Science 42(3): 954-993. doi: 10.2307/2991737

See Also

'LC1980', 'summary.aldmck', 'plot.aldmck', 'plot.cdf'.

Examples

### Loads the Liberal-Conservative scales from the 1980 ANES.
	data(LC1980)
	
	result <- aldmck(data=LC1980, polarity=2, respondent=1, 
		missing=c(0,8,9), verbose=FALSE)
	
	summary(result)
	plot.aldmck(result)

Blackbox Scaling

Description

blackbox is a function that takes a matrix of survey data in which individuals place themselves on continuous scales across multiple issues, and locates those citizens in a spatial model of voting. Mathematically, this function generalizes the singular value of a matrix to cases in which there is missing data in the matrix. Scales generated using perceptual data (i.e. scales of legislator locations using liberal-conservative rankings by survey respondents) should instead use the blackbox_transpose function in this package instead.

Usage

blackbox(data, missing=NULL, verbose=FALSE, dims=1, minscale)

Arguments

data

matrix of numeric values containing the issue scale data. Respondents should be organized on rows, and stimuli on columns. It is helpful, though not necessary, to include row names and column names.

missing

vector or matrix of numeric values, sets the missing values for the data. NA values are always treated as missing regardless of what is set here. Observations with missing data are discarded before analysis. If input is a vector, then the vector is assumed to contain the missing value codes for all the data. If the input is a matrix, it must be of dimension p x q, where p is the maximum number of missing values and q is the number of columns in the data. Each column of the inputted matrix then specifies the missing data values for the respective variables in data. If null (default), no missing values are in the data other than the standard NA value.

verbose

logical, indicates whether aldmck should print out detailed output when scaling the data.

dims

integer, specifies the number of dimensions to be estimated.

minscale

integer, specifies the minimum number of responses a respondent needs needs to provide to be used in the scaling.

Value

An object of class blackbox.

stimuli

vector of data frames of length dims. Each data frame presents results for estimates from that dimension (i.e. x$stimuli[[2]] presents results for dimension 2). Each row contains data on a separate stimulus, and each data frame includes the following variables:

N

Number of respondents who provided a response to this stimulus.

c

Stimulus intercept.

w1

Estimate of the stimulus weight on the first dimension. If viewing the results for a higher dimension, higher dimension results will appear as w2, w3, etc.

R2

The percent variance explained for the stimulus. This increases as more dimensions are estimated.

individuals

vector of data frames of length dims. Each data frame presents results for estimates from that dimension (i.e. x$stimuli[[2]] presents results for dimension 2). Individuals that are discarded from analysis due to the minscale constraint are NA'd out. Each row contains data on a separate stimulus, and each data frame includes the following variables:

c1

Estimate of the individual intercept on the first dimension. If viewing the results for a higher dimension, higher dimension results will appear as c2, c3, etc.

fits

A data frame of fit results, with elements listed as follows:

SSE

Sum of squared errors.

SSE.explained

Explained sum of squared error.

percent

Percentage of total variance explained.

SE

Standard error of the estimate, with formula provided on pg. 973 of the article cited below.

singular

Singluar value for the dimension.

Nrow

Number of rows/stimuli.

Ncol

Number of columns used in estimation. This may differ from the data set due to columns discarded due to the minscale constraint.

Ndata

Total number of data entries.

Nmiss

Number of missing entries.

SS_mean

Sum of squares grand mean.

dims

Number of dimensions estimated.

Author(s)

Keith Poole [email protected]

Howard Rosenthal [email protected]

Jeffrey Lewis [email protected]

James Lo [email protected]

Royce Carroll [email protected]

Christopher Hare [email protected]

References

David A. Armstrong II, Ryan Bakker, Royce Carroll, Christopher Hare, Keith T. Poole, and Howard Rosenthal. 2021. Analyzing Spatial Models of Choice and Judgment. 2nd ed. Statistics in the Social and Behavioral Sciences Series. Boca Raton, FL: Chapman & Hall/CRC. doi: 10.1201/9781315197609

Keith T. Poole, Jeffrey B. Lewis, Howard Rosenthal, James Lo, and Royce Carroll. 2016. “Recovering a Basic Space from Issue Scales in R.” Journal of Statistical Software 69(7): 1-21. doi:10.18637/jss.v069.i07

Keith T. Poole. 1998. “Recovering a Basic Space From a Set of Issue Scales.” American Journal of Political Science 42(3): 954-993. doi: 10.2307/2991737

See Also

'Issues1980', 'summary.blackbox', 'plot.blackbox'.

Examples

### Loads issue scales from the 1980 NES.
  data(Issues1980)
  Issues1980[Issues1980[,"abortion1"]==7,"abortion1"] <- 8	#missing recode
  Issues1980[Issues1980[,"abortion2"]==7,"abortion2"] <- 8	#missing recode

   
  Issues1980_bb <- blackbox(Issues1980, missing=c(0,8,9), verbose=FALSE, 
    dims=3, minscale=8)
  
  ### 'Issues1980_bb' can be retrieved quickly with: 
  data(Issues1980_bb)

  summary(Issues1980_bb)

Blackbox transpose Scaling

Description

blackbox_transpose is a function that takes a matrix of perceptual data, such as liberal-conservative rankings of various stimuli, and recovers the true location of those stimuli in a spatial model. It differs from procedures such as wnominate, which instead use preference data to estimate candidate and citizen positions. The procedure here generalizes the technique developed by John Aldrich and Richard McKelvey in 1977, which is also included in this package as the aldmck function.

Usage

blackbox_transpose(data, missing=NULL, verbose=FALSE, dims=1, minscale)

Arguments

data

matrix of numeric values, containing the perceptual data. Respondents should be organized on rows, and stimuli on columns. It is helpful, though not necessary, to include row names and column names.

missing

vector or matrix of numeric values, sets the missing values for the data. NA values are always treated as missing regardless of what is set here. Observations with missing data are discarded before analysis. If input is a vector, then the vector is assumed to contain the missing value codes for all the data. If the input is a matrix, it must be of dimension p x q, where p is the maximum number of missing values and q is the number of columns in the data. Each column of the inputted matrix then specifies the missing data values for the respective variables in data. If null (default), no missing values are in the data other than the standard NA value.

verbose

logical, indicates whether aldmck should print out detailed output when scaling the data.

dims

integer, specifies the number of dimensions to be estimated.

minscale

integer, specifies the minimum number of responses a respondent needs needs to provide to be used in the scaling.

Value

An object of class blackbt.

stimuli

vector of data frames of length dims. Each data frame presents results for estimates from that dimension (i.e. x$stimuli[[2]] presents results for dimension 2). Each row contains data on a separate stimulus, and each data frame includes the following variables:

N

Number of respondents who ranked this stimulus.

coord1D

Location of the stimulus in the first dimension. If viewing the results for a higher dimension, higher dimension results will appear as coord2D, coord3D, etc.

R2

The percent variance explained for the stimulus. This increases as more dimensions are estimated.

individuals

vector of data frames of length dims. Each data frame presents results for estimates from that dimension (i.e. x$stimuli[[2]] presents results for dimension 2). Individuals that are discarded from analysis due to the minscale constraint are NA'd out. Each row contains data on a separate stimulus, and each data frame includes the following variables:

c

Estimate of the individual intercept.

w1

Estimate of the individual slope. If viewing the results for a higher dimension, higher dimension results will appear as w2, w3, etc.

R2

The percent variance explained for the respondent. This increases as more dimensions are estimated.

fits

A data frame of fit results, with elements listed as follows:

SSE

Sum of squared errors.

SSE.explained

Explained sum of squared error.

percent

Percentage of total variance explained.

SE

Standard error of the estimate, with formula provided in the article cited below.

singular

Singluar value for the dimension.

Nrow

Number of rows/stimuli.

Ncol

Number of columns used in estimation. This may differ from the data set due to columns discarded due to the minscale constraint.

Ndata

Total number of data entries.

Nmiss

Number of missing entries.

SS_mean

Sum of squares grand mean.

dims

Number of dimensions estimated.

Author(s)

Keith Poole [email protected]

Howard Rosenthal [email protected]

Jeffrey Lewis [email protected]

James Lo [email protected]

Royce Carroll [email protected]

Christopher Hare [email protected]

References

David A. Armstrong II, Ryan Bakker, Royce Carroll, Christopher Hare, Keith T. Poole, and Howard Rosenthal. 2021. Analyzing Spatial Models of Choice and Judgment. 2nd ed. Statistics in the Social and Behavioral Sciences Series. Boca Raton, FL: Chapman & Hall/CRC. doi: 10.1201/9781315197609

Keith T. Poole, Jeffrey B. Lewis, Howard Rosenthal, James Lo, and Royce Carroll. 2016. “Recovering a Basic Space from Issue Scales in R.” Journal of Statistical Software 69(7): 1-21. doi:10.18637/jss.v069.i07

Keith T. Poole. 1998. “Recovering a Basic Space From a Set of Issue Scales.” American Journal of Political Science 42(3): 954-993. doi: 10.2307/2991737

See Also

'plotcdf.blackbt', 'LC1980', 'plot.blackbt', 'summary.blackbt', 'LC1980_bbt'.

Examples

### Loads the Liberal-Conservative scales from the 1980 ANES.
  data(LC1980)
  LCdat <- LC1980[,-1]	#Dump the column of self-placements

   
  LC1980_bbt <- blackbox_transpose(LCdat, missing=c(0,8,9), dims=3, 
    minscale=5, verbose=FALSE)
  
  ### 'LC1980_bbt' can be retrieved quickly with: 
  data(LC1980_bbt)

  summary(LC1980_bbt)
  plot(LC1980_bbt)

Bootstrap of Aldrich-McKelvey Scaling

Description

boot_aldmck is a function automates the non-parametric bootstrapping of aldmck. The original function takes a matrix of perceptual data, such as liberal-conservative rankings of various stimuli, and recovers the true location of those stimuli in a spatial model. The bootstrap simply applies this estimator across multiple resampled data sets and stores the results of each iteration in a matrix. These results can be used to estimate uncertainty for various parameters of interest, and can be plotted using the plot.boot_aldmck function.

Usage

boot_aldmck(data, respondent = 0, missing=NULL, polarity, iter=100)

Arguments

data

matrix of numeric values, containing the perceptual data. Respondents should be organized on rows, and stimuli on columns. It is helpful, though not necessary, to include row names and column names.

respondent

integer, specifies the column in the data matrix of the stimuli that contains the respondent's self-placement on the scale. Setting respondent = 0 specifies that the self-placement data is not available. Self-placement data is not required to estimate the locations of the stimuli, but is required if recovery of the respondent ideal points, or distortion parameters is desired. Note that no distortion parameters are estimated in AM without self-placements because they are not needed, see equation (24) in Aldrich and McKelvey (1977) for proof.

missing

vector or matrix of numeric values, sets the missing values for the data. NA values are always treated as missing regardless of what is set here. Observations with missing data are discarded before analysis. If input is a vector, then the vector is assumed to contain the missing value codes for all the data. If the input is a matrix, it must be of dimension p x q, where p is the maximum number of missing values and q is the number of columns in the data. Each column of the inputted matrix then specifies the missing data values for the respective variables in data. If null (default), no missing values are in the data other than the standard NA value.

polarity

integer, specifies the column in the data matrix of the stimuli that is to be set on the left side (generally this means a liberal)

iter

integer, is the number of iterations the bootstrap should run for.

Value

An object of class boot_aldmck. This is simply a matrix of dimensions iter x number of stimuli. Each row stores the estimated stimuli locations for each iteration.

Author(s)

Keith Poole [email protected]

Howard Rosenthal [email protected]

Jeffrey Lewis [email protected]

James Lo [email protected]

Royce Carroll [email protected]

Christopher Hare [email protected]

References

John H. Aldrich and Richard D. McKelvey. 1977. “A Method of Scaling with Applications to the 1968 and 1972 Presidential Elections.” American Political Science Review 71(1): 111-130. doi: 10.2307/1956957

David A. Armstrong II, Ryan Bakker, Royce Carroll, Christopher Hare, Keith T. Poole, and Howard Rosenthal. 2021. Analyzing Spatial Models of Choice and Judgment. 2nd ed. Statistics in the Social and Behavioral Sciences Series. Boca Raton, FL: Chapman & Hall/CRC. doi: 10.1201/9781315197609

Thomas R. Palfrey and Keith T. Poole. 1987. “The Relationship between Information, Ideology, and Voting Behavior.” American Journal of Political Science 31(3): 511-530. doi: 10.2307/2111281

Keith T. Poole, Jeffrey B. Lewis, Howard Rosenthal, James Lo, and Royce Carroll. 2016. “Recovering a Basic Space from Issue Scales in R.” Journal of Statistical Software 69(7): 1-21. doi:10.18637/jss.v069.i07

Keith T. Poole. 1998. “Recovering a Basic Space From a Set of Issue Scales.” American Journal of Political Science 42(3): 954-993. doi: 10.2307/2991737

See Also

'LC1980', 'summary.aldmck', 'plot.aldmck', 'plot.cdf'.

Examples

### Loads the Liberal-Conservative scales from the 1980 ANES.
  data(LC1980)
  
  result <- boot_aldmck(data=LC1980, polarity=2, respondent=1, missing=c(0,8,9), iter=30)

  plot(result)

Bootstrap of Blackbox Transpose Scaling

Description

boot_blackbt is a function automates the non-parametric bootstrapping of blackbox_transpose. The original function takes a matrix of perceptual data, such as liberal-conservative rankings of various stimuli, and recovers the true location of those stimuli in a spatial model. The bootstrap simply applies this estimator across multiple resampled data sets and stores the results of each iteration in a matrix. These results can be used to estimate uncertainty for various parameters of interest, and can be plotted using the plot.boot_blackbt function.

Usage

boot_blackbt(data, missing=NULL, dims=1, dim.extract=dims, minscale, 
    iter=100, verbose=FALSE)

Arguments

data

matrix of numeric values, containing the perceptual data. Respondents should be organized on rows, and stimuli on columns. It is helpful, though not necessary, to include row names and column names.

missing

vector or matrix of numeric values, sets the missing values for the data. NA values are always treated as missing regardless of what is set here. Observations with missing data are discarded before analysis. If input is a vector, then the vector is assumed to contain the missing value codes for all the data. If the input is a matrix, it must be of dimension p x q, where p is the maximum number of missing values and q is the number of columns in the data. Each column of the inputted matrix then specifies the missing data values for the respective variables in data. If null (default), no missing values are in the data other than the standard NA value.

dims

integer, specifies the number of dimensions to be estimated.

dim.extract

integer, specifies which dimension to extract results for the bootstrap from.

minscale

integer, specifies the minimum number of responses a respondent needs needs to provide to be used in the scaling.

iter

integer, number of iterations the bootstrap should run for.

verbose

logical, indicates whether the progress of blackbox_transpose (at each 10th iteration) should be printed to the screen.

Value

An object of class boot_blackbt. This is simply a matrix of dimensions iter x number of stimuli. Each row stores the estimated stimuli locations for each iteration.

Author(s)

Keith Poole [email protected]

Howard Rosenthal [email protected]

Jeffrey Lewis [email protected]

James Lo [email protected]

Royce Carroll [email protected]

Christopher Hare [email protected]

References

David A. Armstrong II, Ryan Bakker, Royce Carroll, Christopher Hare, Keith T. Poole, and Howard Rosenthal. 2021. Analyzing Spatial Models of Choice and Judgment. 2nd ed. Statistics in the Social and Behavioral Sciences Series. Boca Raton, FL: Chapman & Hall/CRC. doi: 10.1201/9781315197609

Keith T. Poole, Jeffrey B. Lewis, Howard Rosenthal, James Lo, and Royce Carroll. 2016. “Recovering a Basic Space from Issue Scales in R.” Journal of Statistical Software 69(7): 1-21. doi:10.18637/jss.v069.i07

Keith T. Poole. 1998. “Recovering a Basic Space From a Set of Issue Scales.” American Journal of Political Science 42(3): 954-993. doi: 10.2307/2991737

See Also

'blackbox_transpose', 'plot.boot_blackbt'.

Examples

### Loads the Liberal-Conservative scales from the 1980 ANES.
  data(LC1980)
  LCdat <- LC1980[,-1]	#Dump the column of self-placements

   
    bootbbt <- boot_blackbt(LCdat, missing=c(0,8,9), dims=1, 
      minscale=8, iter=10, verbose=FALSE)
  
  ### 'LC1980_bbt' can be retrieved quickly with: 
  data(bootbbt)

  plot.boot_blackbt(bootbbt)

Blackbox Transpose Bootstrap of 1980 Liberal-Conservative Scales.

Description

Output from 10 bootstrap trials of LC1980 data. Included to allow the example to run sufficiently quickly to pass CRAN guidelines.

Usage

data(bootbbt)

Value

See 'boot_blackbt'.

Author(s)

Keith Poole [email protected]

Howard Rosenthal [email protected]

Jeffrey Lewis [email protected]

James Lo [email protected]

Royce Carroll [email protected]

Christopher Hare [email protected]

References

David A. Armstrong II, Ryan Bakker, Royce Carroll, Christopher Hare, Keith T. Poole, and Howard Rosenthal. 2021. Analyzing Spatial Models of Choice and Judgment. 2nd ed. Statistics in the Social and Behavioral Sciences Series. Boca Raton, FL: Chapman & Hall/CRC. doi: 10.1201/9781315197609

Keith T. Poole, Jeffrey B. Lewis, Howard Rosenthal, James Lo, and Royce Carroll. 2016. “Recovering a Basic Space from Issue Scales in R.” Journal of Statistical Software 69(7): 1-21. doi:10.18637/jss.v069.i07

Keith T. Poole. 1998. “Recovering a Basic Space From a Set of Issue Scales.” American Journal of Political Science 42(3): 954-993. doi: 10.2307/2991737

See Also

'LC1980', 'boot_blackbt', 'plot.boot_blackbt'.

Examples

### Loads the Liberal-Conservative scales from the 1980 ANES.
  data(LC1980)
  LCdat <- LC1980[,-1]	#Dump the column of self-placements

   
    bootbbt <- boot_blackbt(LCdat, missing=c(0,8,9), dims=1, minscale=8, iter=10)
  
  ### 'LC1980_bbt' can be retrieved quickly with: 
  data(bootbbt)

  plot.boot_blackbt(bootbbt)

2004 PELA Liberal-Conservative Scales.

Description

Liberal-Conservative 10-point scales from the University of Salamanca's Parliamentary Elites of Latin America (PELA) survey. Stored as a matrix of integers. The number 99 is a missing value. These data come from Sebastian Saiegh and are used in the paper and book cited below.

Usage

data(colombia)

Value

The data is formatted as an integer matrix with the following elements.

colombia

matrix, containing reported placements of various stimuli on a 10 point Liberal-Conservative scale:

id

Respondent ID.

party

Respondent party.

departam

Respondent district.

entrey

Interviewer ID.

pl_uribista

Placement of “Partido Liberal Uribista” on 10 point scale.

pl_oficial

Placement of “Partido Liberal Oficial” on 10 point scale.

conservator

Placement of “Partido Conservador” on 10 point scale.

polo

Placement of “Polo” on 10 point scale.

union_cristiana

Placement of “Union Cristiana” on 10 point scale.

salvation

Placement of “Salvacion” on 10 point scale.

urine

Placement of Mr. Uribe on 10 point scale.

antanas

Placement of Mr. Antanas on 10 point scale.

gomez

Placement of Mr. Gomez on 10 point scale.

garzon

Placement of Garzon on 10 point scale.

holgin

Placement of Holguin on 10 point scale.

rivera

Placement of Rivera on 10 point scale.

self

Respondent self placement on 10 point scale.

Author(s)

Keith Poole [email protected]

Howard Rosenthal [email protected]

Jeffrey Lewis [email protected]

James Lo [email protected]

Royce Carroll [email protected]

Christopher Hare [email protected]

Source

Sebastian Saiegh. 2009. “Recovering a Basic Space from Elite Surveys: Evidence from Latin America.” Legislative Studies Quarterly 34(1): 117-145. doi: 10.3162/036298009787500349

Sebastian Saiegh. 2011. Ruling By Statute: How Uncertainty and Vote-Buying Shape Lawmaking. New York: Cambridge University Press. doi: 10.1017/CBO9780511842276

References

John H. Aldrich and Richard D. McKelvey. 1977. “A Method of Scaling with Applications to the 1968 and 1972 Presidential Elections.” American Political Science Review 71(1): 111-130. doi: 10.2307/1956957

David A. Armstrong II, Ryan Bakker, Royce Carroll, Christopher Hare, Keith T. Poole, and Howard Rosenthal. 2021. Analyzing Spatial Models of Choice and Judgment. 2nd ed. Statistics in the Social and Behavioral Sciences Series. Boca Raton, FL: Chapman & Hall/CRC. doi: 10.1201/9781315197609

Thomas R. Palfrey and Keith T. Poole. 1987. “The Relationship between Information, Ideology, and Voting Behavior.” American Journal of Political Science 31(3): 511-530. doi: 10.2307/2111281

Keith T. Poole, Jeffrey B. Lewis, Howard Rosenthal, James Lo, and Royce Carroll. 2016. “Recovering a Basic Space from Issue Scales in R.” Journal of Statistical Software 69(7): 1-21. doi:10.18637/jss.v069.i07

Keith T. Poole. 1998. “Recovering a Basic Space From a Set of Issue Scales.” American Journal of Political Science 42(3): 954-993. doi: 10.2307/2991737

See Also

'aldmck', 'summary.aldmck', 'plot.aldmck', 'plot.cdf'.

Examples

### Loads the Liberal-Conservative scales from the 2004 PELA survey.
  data(colombia)
  tmp <- colombia[,c(5:8,12:17)]

  result <- aldmck(data=tmp, polarity=7, respondent=10, missing=c(99), verbose=TRUE)
  summary(result)
  plot.cdf(result)

Extraction function for fit of scaling model

Description

fit is a convenience function to extract the model fit statistics from an aldmck, blackbox, or blackbt object.

Usage

fit(object)

Arguments

object

an aldmck, blackbox, or blackbt output object.

Value

The model fit statistics of the estimated output, which can also be recovered as object$fits (for blackbox or blackbt objects) or object$AMfit (for aldmck objects). Please refer to the documentation of aldmck, blackbox, or blackbox_transpose for specifics.

Author(s)

Keith Poole [email protected]

Howard Rosenthal [email protected]

Jeffrey Lewis [email protected]

James Lo [email protected]

Royce Carroll [email protected]

Christopher Hare [email protected]

References

John H. Aldrich and Richard D. McKelvey. 1977. “A Method of Scaling with Applications to the 1968 and 1972 Presidential Elections.” American Political Science Review 71(1): 111-130. doi: 10.2307/1956957

David A. Armstrong II, Ryan Bakker, Royce Carroll, Christopher Hare, Keith T. Poole, and Howard Rosenthal. 2021. Analyzing Spatial Models of Choice and Judgment. 2nd ed. Statistics in the Social and Behavioral Sciences Series. Boca Raton, FL: Chapman & Hall/CRC. doi: 10.1201/9781315197609

Thomas R. Palfrey and Keith T. Poole. 1987. “The Relationship between Information, Ideology, and Voting Behavior.” American Journal of Political Science 31(3): 511-530. doi: 10.2307/2111281

Keith T. Poole, Jeffrey B. Lewis, Howard Rosenthal, James Lo, and Royce Carroll. 2016. “Recovering a Basic Space from Issue Scales in R.” Journal of Statistical Software 69(7): 1-21. doi:10.18637/jss.v069.i07

Keith T. Poole. 1998. “Recovering a Basic Space From a Set of Issue Scales.” American Journal of Political Science 42(3): 954-993. doi: 10.2307/2991737

See Also

'aldmck', 'blackbox', 'blackbox_transpose'.

Examples

### Loads issue scales from the 1980 NES.
  data(Issues1980)
  Issues1980[Issues1980[,"abortion1"]==7,"abortion1"] <- 8	#missing recode
  Issues1980[Issues1980[,"abortion2"]==7,"abortion2"] <- 8	#missing recode

   
  Issues1980_bb <- blackbox(Issues1980, missing=c(0,8,9), verbose=FALSE, 
    dims=3, minscale=8)
  
  ### 'Issues1980_bb' can be retrieved quickly with: 
  data(Issues1980_bb)

  fit(Issues1980_bb)

Extraction function for scaled individuals

Description

individuals is a convenience function to extract the individual/respondent parameters from an aldmck, blackbox, or blackbt object.

Usage

individuals(object)

Arguments

object

an aldmck, blackbox, or blackbt output object.

Value

The individual parameters of the estimated output, which can also be recovered as object$individuals (for blackbox or blackbt objects) or object$respondents (for aldmck objects). Please refer to the documentation of aldmck, blackbox, or blackbox_transpose for specifics.

Author(s)

Keith Poole [email protected]

Howard Rosenthal [email protected]

Jeffrey Lewis [email protected]

James Lo [email protected]

Royce Carroll [email protected]

Christopher Hare [email protected]

References

John H. Aldrich and Richard D. McKelvey. 1977. “A Method of Scaling with Applications to the 1968 and 1972 Presidential Elections.” American Political Science Review 71(1): 111-130. doi: 10.2307/1956957

David A. Armstrong II, Ryan Bakker, Royce Carroll, Christopher Hare, Keith T. Poole, and Howard Rosenthal. 2021. Analyzing Spatial Models of Choice and Judgment. 2nd ed. Statistics in the Social and Behavioral Sciences Series. Boca Raton, FL: Chapman & Hall/CRC. doi: 10.1201/9781315197609

Thomas R. Palfrey and Keith T. Poole. 1987. “The Relationship between Information, Ideology, and Voting Behavior.” American Journal of Political Science 31(3): 511-530. doi: 10.2307/2111281

Keith T. Poole, Jeffrey B. Lewis, Howard Rosenthal, James Lo, and Royce Carroll. 2016. “Recovering a Basic Space from Issue Scales in R.” Journal of Statistical Software 69(7): 1-21. doi:10.18637/jss.v069.i07

Keith T. Poole. 1998. “Recovering a Basic Space From a Set of Issue Scales.” American Journal of Political Science 42(3): 954-993. doi: 10.2307/2991737

See Also

'aldmck', 'blackbox', 'blackbox_transpose'.

Examples

### Loads issue scales from the 1980 NES.
  data(Issues1980)
  Issues1980[Issues1980[,"abortion1"]==7,"abortion1"] <- 8	#missing recode
  Issues1980[Issues1980[,"abortion2"]==7,"abortion2"] <- 8	#missing recode

   
  Issues1980_bb <- blackbox(Issues1980, missing=c(0,8,9), verbose=FALSE, 
    dims=3, minscale=8)
  
  ### 'Issues1980_bb' can be retrieved quickly with: 
  data(Issues1980_bb)

  individuals(Issues1980_bb)

1980 Issues Scakes

Description

Issue scales from the 1980 National Election Study. The numbers 0, 8, and 9 are considered to be missing values, except for the two abortion scales, where '7' is also a missing value. Hence, it must be recoded as in the example shown below before scaling. The data is used as an example for blackbox().

Usage

data(LC1980)

Value

The data is formatted as an numeric matrix with the following elements.

Issues

matrix, containing reported self-placements along various stimuli on a 7 point Liberal-Conservative scales (with the exception of abortion scales, which are 4 point):

libcon1

Liberal-conservative self-placement on 7 point scale.

defense

Defense spending self-placement on 7 point scale.

govserv

Government service on 7 point scale.

inflation

Importance of inflation self-placement on 7 point scale.

abortion1

Attitude on abortion 4 point scale.

taxcut

Support for tax cut on 7 point scale.

libcon2

Liberal-conservative self-placement on 7 point scale.

govhelpmin

Government aid on 7 point scale.

russia

Attitude towards Russia on 7 point scale.

womenrole

Role of women on 7 point scale.

govjobs

Placement of Democrats on 7 point scale.

equalrights

Support for equal rights on 7 point scale.

busing

Opinion on busing on 7 point scale.

abortion2

Another attitude on abortion on 4 point scale.

Author(s)

Keith Poole [email protected]

Howard Rosenthal [email protected]

Jeffrey Lewis [email protected]

James Lo [email protected]

Royce Carroll [email protected]

Christopher Hare [email protected]

Source

American National Election Studies (https://electionstudies.org/)

References

David A. Armstrong II, Ryan Bakker, Royce Carroll, Christopher Hare, Keith T. Poole, and Howard Rosenthal. 2021. Analyzing Spatial Models of Choice and Judgment. 2nd ed. Statistics in the Social and Behavioral Sciences Series. Boca Raton, FL: Chapman & Hall/CRC. doi: 10.1201/9781315197609

Keith T. Poole, Jeffrey B. Lewis, Howard Rosenthal, James Lo, and Royce Carroll. 2016. “Recovering a Basic Space from Issue Scales in R.” Journal of Statistical Software 69(7): 1-21. doi:10.18637/jss.v069.i07

Keith T. Poole. 1998. “Recovering a Basic Space From a Set of Issue Scales.” American Journal of Political Science 42(3): 954-993. doi: 10.2307/2991737

See Also

'blackbox', 'summary.blackbox'.

Examples

### Loads issue scales from the 1980 ANES.
  data(Issues1980)
  Issues1980[Issues1980[,"abortion1"]==7,"abortion1"] <- 8	#missing recode
  Issues1980[Issues1980[,"abortion2"]==7,"abortion2"] <- 8	#missing recode

   
  Issues1980_bb <- blackbox(Issues1980, missing=c(0,8,9), verbose=FALSE, 
    dims=3, minscale=8)
  
  ### 'Issues1980_bb' can be retrieved quickly with: 
  data(Issues1980_bb)

  summary(Issues1980_bb)

Blackbox Estimate, 1980 ANES Issue Scales.

Description

Blackbox estimates from issues scales from the 1980 American National Election Study.

Usage

data(Issues1980_bb)

Value

An object of class blackbox.

stimuli

vector of data frames of length dims. Each data frame presents results for estimates from that dimension (i.e. x$stimuli[[2]] presents results for dimension 2). Each row contains data on a separate stimulus, and each data frame includes the following variables:

N

Number of respondents who provided a response to this stimulus.

c

Stimulus intercept.

w1

Estimate of the stimulus weight on the first dimension. If viewing the results for a higher dimension, higher dimension results will appear as w2, w3, etc.

R2

The percent variance explained for the stimulus. This increases as more dimensions are estimated.

individuals

vector of data frames of length dims. Each data frame presents results for estimates from that dimension (i.e. x$stimuli[[2]] presents results for dimension 2). Individuals that are discarded from analysis due to the minscale constraint are NA'd out. Each row contains data on a separate stimulus, and each data frame includes the following variables:

c1

Estimate of the individual intercept on the first dimension. If viewing the results for a higher dimension, higher dimension results will appear as c2, c3, etc.

fits

A data frame of fit results, with elements listed as follows:

SSE

Sum of squared errors.

SSE.explained

Explained sum of squared error.

percent

Percentage of total variance explained.

SE

Standard error of the estimate, with formula provided on pg. 973 of the article cited below.

singular

Singluar value for the dimension.

Nrow

Number of rows/stimuli.

Ncol

Number of columns used in estimation. This may differ from the data set due to columns discarded due to the minscale constraint.

Ndata

Total number of data entries.

Nmiss

Number of missing entries.

SS_mean

Sum of squares grand mean.

dims

Number of dimensions estimated.

Author(s)

Keith Poole [email protected]

Howard Rosenthal [email protected]

Jeffrey Lewis [email protected]

James Lo [email protected]

Royce Carroll [email protected]

Christopher Hare [email protected]

Source

American National Election Studies (https://electionstudies.org/)

References

David A. Armstrong II, Ryan Bakker, Royce Carroll, Christopher Hare, Keith T. Poole, and Howard Rosenthal. 2021. Analyzing Spatial Models of Choice and Judgment. 2nd ed. Statistics in the Social and Behavioral Sciences Series. Boca Raton, FL: Chapman & Hall/CRC. doi: 10.1201/9781315197609

Keith T. Poole, Jeffrey B. Lewis, Howard Rosenthal, James Lo, and Royce Carroll. 2016. “Recovering a Basic Space from Issue Scales in R.” Journal of Statistical Software 69(7): 1-21. doi:10.18637/jss.v069.i07

Keith T. Poole. 1998. “Recovering a Basic Space From a Set of Issue Scales.” American Journal of Political Science 42(3): 954-993. doi: 10.2307/2991737

See Also

'Issues1980', 'summary.blackbox', 'plot.blackbox'.

Examples

### Loads issue scales from the 1980 ANES.
  data(Issues1980)
  Issues1980[Issues1980[,"abortion1"]==7,"abortion1"] <- 8	#missing recode
  Issues1980[Issues1980[,"abortion2"]==7,"abortion2"] <- 8	#missing recode

   
  Issues1980_bb <- blackbox(Issues1980, missing=c(0,8,9), verbose=FALSE, 
    dims=3, minscale=8)
  
  ### 'Issues1980_bb' can be retrieved quickly with: 
  data(Issues1980_bb)

  summary(Issues1980_bb)

1980 Liberal-Conservative Scales.

Description

Liberal-Conservative 7-point scales from the 1980 National Election Study. Includes (in order) self-placement, and rankings of Carter, Reagan, Kennedy, Anderson, Republican party, Democratic Party. Stored as a matrix of integers. The numbers 0, 8, and 9 are considered to be missing values.

Usage

data(LC1980)

Value

The data is formatted as an integer matrix with the following elements.

LC1980

matrix, containing reported placements of various stimuli on a 7 point Liberal-Conservative scale:

Self

Self-placement on 7 point scale.

Carter

Placement of Carter on 7 point scale.

Reagan

Placement of Reagan on 7 point scale.

Kennedy

Placement of Kennedy on 7 point scale.

Anderson

Placement of Anderson on 7 point scale.

Republicans

Placement of Republicans on 7 point scale.

Democrats

Placement of Democrats on 7 point scale.

Author(s)

Keith Poole [email protected]

Howard Rosenthal [email protected]

Jeffrey Lewis [email protected]

James Lo [email protected]

Royce Carroll [email protected]

Christopher Hare [email protected]

Source

American National Election Studies (https://electionstudies.org/)

References

John H. Aldrich and Richard D. McKelvey. 1977. “A Method of Scaling with Applications to the 1968 and 1972 Presidential Elections.” American Political Science Review 71(1): 111-130. doi: 10.2307/1956957

David A. Armstrong II, Ryan Bakker, Royce Carroll, Christopher Hare, Keith T. Poole, and Howard Rosenthal. 2021. Analyzing Spatial Models of Choice and Judgment. 2nd ed. Statistics in the Social and Behavioral Sciences Series. Boca Raton, FL: Chapman & Hall/CRC. doi: 10.1201/9781315197609

Thomas R. Palfrey and Keith T. Poole. 1987. “The Relationship between Information, Ideology, and Voting Behavior.” American Journal of Political Science 31(3): 511-530. doi: 10.2307/2111281

Keith T. Poole, Jeffrey B. Lewis, Howard Rosenthal, James Lo, and Royce Carroll. 2016. “Recovering a Basic Space from Issue Scales in R.” Journal of Statistical Software 69(7): 1-21. doi:10.18637/jss.v069.i07

Keith T. Poole. 1998. “Recovering a Basic Space From a Set of Issue Scales.” American Journal of Political Science 42(3): 954-993. doi: 10.2307/2991737

See Also

'aldmck', 'summary.aldmck', 'plot.aldmck', 'plot.cdf'.

Examples

### Loads the Liberal-Conservative scales from the 1980 ANES.
  data(LC1980)
  
  result <- aldmck(data=LC1980, polarity=2, respondent=1, missing=c(0,8,9), verbose=TRUE)

  summary(result)
  plot(result)

Blackbox Transpose Estimate, 1980 Liberal-Conservative Scales.

Description

Blackbox-Transpose estimates from Liberal-Conservative 7-point scales from the 1980 National Election Study. Estimates in 3 dimensions.

Usage

data(LC1980_bbt)

Value

An object of class blackbt.

stimuli

vector of data frames of length dims. Each data frame presents results for estimates from that dimension (i.e. x$stimuli[[2]] presents results for dimension 2). Each row contains data on a separate stimulus, and each data frame includes the following variables:

N

Number of respondents who ranked this stimulus.

coord1D

Location of the stimulus in the first dimension. If viewing the results for a higher dimension, higher dimension results will appear as coord2D, coord3D, etc.

R2

The percent variance explained for the stimulus. This increases as more dimensions are estimated.

individuals

vector of data frames of length dims. Each data frame presents results for estimates from that dimension (i.e. x$stimuli[[2]] presents results for dimension 2). Individuals that are discarded from analysis due to the minscale constraint are NA'd out. Each row contains data on a separate stimulus, and each data frame includes the following variables:

c

Estimate of the individual intercept.

w1

Estimate of the individual slope. If viewing the results for a higher dimension, higher dimension results will appear as w2, w3, etc.

R2

The percent variance explained for the respondent. This increases as more dimensions are estimated.

fits

A data frame of fit results, with elements listed as follows:

SSE

Sum of squared errors.

SSE.explained

Explained sum of squared error.

percent

Percentage of total variance explained.

SE

Standard error of the estimate, with formula provided in the article cited below.

singular

Singluar value for the dimension.

Nrow

Number of rows/stimuli.

Ncol

Number of columns used in estimation. This may differ from the data set due to columns discarded due to the minscale constraint.

Ndata

Total number of data entries.

Nmiss

Number of missing entries.

SS_mean

Sum of squares grand mean.

dims

Number of dimensions estimated.

Author(s)

Keith Poole [email protected]

Howard Rosenthal [email protected]

Jeffrey Lewis [email protected]

James Lo [email protected]

Royce Carroll [email protected]

Christopher Hare [email protected]

Source

American National Election Studies (https://electionstudies.org/)

References

David A. Armstrong II, Ryan Bakker, Royce Carroll, Christopher Hare, Keith T. Poole, and Howard Rosenthal. 2021. Analyzing Spatial Models of Choice and Judgment. 2nd ed. Statistics in the Social and Behavioral Sciences Series. Boca Raton, FL: Chapman & Hall/CRC. doi: 10.1201/9781315197609

Keith T. Poole, Jeffrey B. Lewis, Howard Rosenthal, James Lo, and Royce Carroll. 2016. “Recovering a Basic Space from Issue Scales in R.” Journal of Statistical Software 69(7): 1-21. doi:10.18637/jss.v069.i07

Keith T. Poole. 1998. “Recovering a Basic Space From a Set of Issue Scales.” American Journal of Political Science 42(3): 954-993. doi: 10.2307/2991737

See Also

'plotcdf.blackbt', 'LC1980', 'plot.blackbt', 'summary.blackbt', 'blackbox_transpose'.

Examples

### Loads the Liberal-Conservative scales from the 1980 ANES.
  data(LC1980)
  LCdat <- LC1980[,-1]	#Dump the column of self-placements

   
  LC1980_bbt <- blackbox_transpose(LCdat, missing=c(0,8,9), dims=3, 
    minscale=5, verbose=TRUE)
  
  ### 'LC1980_bbt' can be retrieved quickly with: 
  data(LC1980_bbt)

  summary(LC1980_bbt)
  plot(LC1980_bbt)

Aldrich-McKelvey Coordinate Distribution Plot

Description

plot.aldmck reads an aldmck object and plots the probability distribution of the respondents and stimuli.

Usage

## S3 method for class 'aldmck'
plot(x, ...)

Arguments

x

an aldmck output object.

...

Other arguments to plot.

Value

A plot of the probability distribution of the respondent ideal points, along with the locations of the stimuli. If no self-placements were specified during estimation, no graphical plots will appear.

Author(s)

Keith Poole [email protected]

Howard Rosenthal [email protected]

Jeffrey Lewis [email protected]

James Lo [email protected]

Royce Carroll [email protected]

Christopher Hare [email protected]

References

John H. Aldrich and Richard D. McKelvey. 1977. “A Method of Scaling with Applications to the 1968 and 1972 Presidential Elections.” American Political Science Review 71(1): 111-130. doi: 10.2307/1956957

David A. Armstrong II, Ryan Bakker, Royce Carroll, Christopher Hare, Keith T. Poole, and Howard Rosenthal. 2021. Analyzing Spatial Models of Choice and Judgment. 2nd ed. Statistics in the Social and Behavioral Sciences Series. Boca Raton, FL: Chapman & Hall/CRC. doi: 10.1201/9781315197609

Thomas R. Palfrey and Keith T. Poole. 1987. “The Relationship between Information, Ideology, and Voting Behavior.” American Journal of Political Science 31(3): 511-530. doi: 10.2307/2111281

Keith T. Poole, Jeffrey B. Lewis, Howard Rosenthal, James Lo, and Royce Carroll. 2016. “Recovering a Basic Space from Issue Scales in R.” Journal of Statistical Software 69(7): 1-21. doi:10.18637/jss.v069.i07

Keith T. Poole. 1998. “Recovering a Basic Space From a Set of Issue Scales.” American Journal of Political Science 42(3): 954-993. doi: 10.2307/2991737

See Also

'aldmck', 'LC1980', 'summary.aldmck', 'plot.AM', 'plot.cdf' 'plot.aldmck_negative','plot.aldmck_positive'.

Examples

### Loads and scales the Liberal-Conservative scales from the 1980 ANES.
  data(LC1980)

  result <- aldmck(data=LC1980, polarity=2, respondent=1, missing=c(0,8,9), verbose=TRUE)

  summary(result)
  plot(result)

Aldrich-McKelvey Negative Coordinate Distribution Plot

Description

plot.aldmck_negative reads an aldmck object and plots the probability distribution of the respondents and stimuli with negative weights.

Usage

## S3 method for class 'aldmck_negative'
plot(x, xlim=c(-2,2), ...)

Arguments

x

an aldmck output object.

xlim

vector of length 2, fed to the plot function as the xlim argument, which sets the minimum and maximum range of the x-axis.

...

other arguments to plot.

Value

A plot of the probability distribution of the respondent ideal points, along with the locations of the stimuli. If no negative weights exist, either because respondent self-placements are not specified, or because all weights are positive, a plot indicating this in text is given.

Author(s)

Keith Poole [email protected]

Howard Rosenthal [email protected]

Jeffrey Lewis [email protected]

James Lo [email protected]

Royce Carroll [email protected]

Christopher Hare [email protected]

References

John H. Aldrich and Richard D. McKelvey. 1977. “A Method of Scaling with Applications to the 1968 and 1972 Presidential Elections.” American Political Science Review 71(1): 111-130. doi: 10.2307/1956957

David A. Armstrong II, Ryan Bakker, Royce Carroll, Christopher Hare, Keith T. Poole, and Howard Rosenthal. 2021. Analyzing Spatial Models of Choice and Judgment. 2nd ed. Statistics in the Social and Behavioral Sciences Series. Boca Raton, FL: Chapman & Hall/CRC. doi: 10.1201/9781315197609

Thomas R. Palfrey and Keith T. Poole. 1987. “The Relationship between Information, Ideology, and Voting Behavior.” American Journal of Political Science 31(3): 511-530. doi: 10.2307/2111281

Keith T. Poole, Jeffrey B. Lewis, Howard Rosenthal, James Lo, and Royce Carroll. 2016. “Recovering a Basic Space from Issue Scales in R.” Journal of Statistical Software 69(7): 1-21. doi:10.18637/jss.v069.i07

Keith T. Poole. 1998. “Recovering a Basic Space From a Set of Issue Scales.” American Journal of Political Science 42(3): 954-993. doi: 10.2307/2991737

See Also

'aldmck', 'LC1980', 'summary.aldmck', 'plot.cdf', 'plot.aldmck'

Examples

### Loads the Liberal-Conservative scales from the 1980 ANES.
  data(LC1980)
  result <- aldmck(data=LC1980, polarity=2, respondent=1, missing=c(0,8,9), verbose=TRUE)
  
  summary(result)
  
  plot.aldmck_negative(result, xlim=c(-1.5,1.5))

Aldrich-McKelvey Positive Coordinate Distribution Plot

Description

plot.aldmck_positive reads an aldmck object and plots the probability distribution of the respondents and stimuli with positive weights.

Usage

## S3 method for class 'aldmck_positive'
plot(x, xlim=c(-2,2), ...)

Arguments

x

an aldmck output object.

xlim

vector of length 2, fed to the plot function as the xlim argument, which sets the minimum and maximum range of the x-axis.

...

other arguments to plot.

Value

A plot of the probability distribution of the respondent ideal points, along with the locations of the stimuli. If no weights exist because respondent self-placements are not specified, a plot indicating this in text is given.

Author(s)

Keith Poole [email protected]

Howard Rosenthal [email protected]

Jeffrey Lewis [email protected]

James Lo [email protected]

Royce Carroll [email protected]

Christopher Hare [email protected]

References

John H. Aldrich and Richard D. McKelvey. 1977. “A Method of Scaling with Applications to the 1968 and 1972 Presidential Elections.” American Political Science Review 71(1): 111-130. doi: 10.2307/1956957

David A. Armstrong II, Ryan Bakker, Royce Carroll, Christopher Hare, Keith T. Poole, and Howard Rosenthal. 2021. Analyzing Spatial Models of Choice and Judgment. 2nd ed. Statistics in the Social and Behavioral Sciences Series. Boca Raton, FL: Chapman & Hall/CRC. doi: 10.1201/9781315197609

Thomas R. Palfrey and Keith T. Poole. 1987. “The Relationship between Information, Ideology, and Voting Behavior.” American Journal of Political Science 31(3): 511-530. doi: 10.2307/2111281

Keith T. Poole, Jeffrey B. Lewis, Howard Rosenthal, James Lo, and Royce Carroll. 2016. “Recovering a Basic Space from Issue Scales in R.” Journal of Statistical Software 69(7): 1-21. doi:10.18637/jss.v069.i07

Keith T. Poole. 1998. “Recovering a Basic Space From a Set of Issue Scales.” American Journal of Political Science 42(3): 954-993. doi: 10.2307/2991737

See Also

'aldmck', 'LC1980', 'summary.aldmck', 'plot.cdf', 'plot.aldmck'

Examples

### Loads and scales the Liberal-Conservative scales from the 1980 ANES.
  data(LC1980)
  result <- aldmck(data=LC1980, polarity=2, respondent=1, missing=c(0,8,9), verbose=TRUE)

  summary(result)
  
  plot.aldmck_positive(result,xlim=c(-1.5,1.5))

Aldrich-McKelvey Coordinate Distribution Plot

Description

plot.AM reads an aldmck object and plots the probability distribution of the respondents and stimuli.

Usage

## S3 method for class 'AM'
plot(x, xlim=c(-2,2), ...)

Arguments

x

an aldmck output object.

xlim

vector of length 2, fed to the plot function as the xlim argument, which sets the minimum and maximum range of the x-axis.

...

other arguments to plot.

Value

A plot of the probability distribution of the respondent ideal points, along with the locations of the stimuli. If no self-placements were specified during estimation, no graphical plots will appear.

Author(s)

Keith Poole [email protected]

Howard Rosenthal [email protected]

Jeffrey Lewis [email protected]

James Lo [email protected]

Royce Carroll [email protected]

Christopher Hare [email protected]

References

John H. Aldrich and Richard D. McKelvey. 1977. “A Method of Scaling with Applications to the 1968 and 1972 Presidential Elections.” American Political Science Review 71(1): 111-130. doi: 10.2307/1956957

David A. Armstrong II, Ryan Bakker, Royce Carroll, Christopher Hare, Keith T. Poole, and Howard Rosenthal. 2021. Analyzing Spatial Models of Choice and Judgment. 2nd ed. Statistics in the Social and Behavioral Sciences Series. Boca Raton, FL: Chapman & Hall/CRC. doi: 10.1201/9781315197609

Thomas R. Palfrey and Keith T. Poole. 1987. “The Relationship between Information, Ideology, and Voting Behavior.” American Journal of Political Science 31(3): 511-530. doi: 10.2307/2111281

Keith T. Poole, Jeffrey B. Lewis, Howard Rosenthal, James Lo, and Royce Carroll. 2016. “Recovering a Basic Space from Issue Scales in R.” Journal of Statistical Software 69(7): 1-21. doi:10.18637/jss.v069.i07

Keith T. Poole. 1998. “Recovering a Basic Space From a Set of Issue Scales.” American Journal of Political Science 42(3): 954-993. doi: 10.2307/2991737

See Also

'aldmck', 'LC1980', 'summary.aldmck', 'plot.cdf', 'plot.aldmck'

Examples

### Loads and scales the Liberal-Conservative scales from the 1980 ANES.
  data(LC1980)
  result <- aldmck(data=LC1980, polarity=2, respondent=1, missing=c(0,8,9), verbose=TRUE)
  
  summary(result)
  
  plot.AM(result, xlim=c(-1.5,1.5))

Blackbox Coordinate Distribution Plot

Description

plot.blackbox reads an blackbox object and plots a histogram of the estimated intercepts.

Usage

## S3 method for class 'blackbox'
plot(x, ...)

Arguments

x

an blackbox output object.

...

other arguments to hist.

Value

A histogram of the estimated intercepts.

Author(s)

Keith Poole [email protected]

Howard Rosenthal [email protected]

Jeffrey Lewis [email protected]

James Lo [email protected]

Royce Carroll [email protected]

Christopher Hare [email protected]

References

David A. Armstrong II, Ryan Bakker, Royce Carroll, Christopher Hare, Keith T. Poole, and Howard Rosenthal. 2021. Analyzing Spatial Models of Choice and Judgment. 2nd ed. Statistics in the Social and Behavioral Sciences Series. Boca Raton, FL: Chapman & Hall/CRC. doi: 10.1201/9781315197609

Keith T. Poole, Jeffrey B. Lewis, Howard Rosenthal, James Lo, and Royce Carroll. 2016. “Recovering a Basic Space from Issue Scales in R.” Journal of Statistical Software 69(7): 1-21. doi:10.18637/jss.v069.i07

Keith T. Poole. 1998. “Recovering a Basic Space From a Set of Issue Scales.” American Journal of Political Science 42(3): 954-993. doi: 10.2307/2991737

See Also

'Issues1980', 'summary.blackbox', 'plot.blackbox'.

Examples

### Loads issue scales from the 1980 ANES.
  data(Issues1980)
  Issues1980[Issues1980[,"abortion1"]==7,"abortion1"] <- 8	#missing recode
  Issues1980[Issues1980[,"abortion2"]==7,"abortion2"] <- 8	#missing recode

   
  Issues1980_bb <- blackbox(Issues1980, missing=c(0,8,9), verbose=FALSE, 
    dims=3, minscale=8)
  
  ### 'Issues1980_bb' can be retrieved quickly with: 
  data(Issues1980_bb)

  summary(Issues1980_bb)
  plot(Issues1980_bb)

Blackbox Transpose Coordinate Distribution Plot

Description

plot.blackbt reads an blackbt object and plots the probability distribution of the respondents and stimuli.

Usage

## S3 method for class 'blackbt'
plot(x, xlim=c(-1,1), ...)

Arguments

x

an blackbt output object.

xlim

vector of length 2, fed to the plot function as the xlim argument, which sets the minimum and maximum range of the x-axis.

...

other arguments to plot.

Value

A plot of the probability distribution of the respondent ideal points, along with the locations of the stimuli.

Author(s)

Keith Poole [email protected]

Howard Rosenthal [email protected]

Jeffrey Lewis [email protected]

James Lo [email protected]

Royce Carroll [email protected]

Christopher Hare [email protected]

References

David A. Armstrong II, Ryan Bakker, Royce Carroll, Christopher Hare, Keith T. Poole, and Howard Rosenthal. 2021. Analyzing Spatial Models of Choice and Judgment. 2nd ed. Statistics in the Social and Behavioral Sciences Series. Boca Raton, FL: Chapman & Hall/CRC. doi: 10.1201/9781315197609

Keith T. Poole, Jeffrey B. Lewis, Howard Rosenthal, James Lo, and Royce Carroll. 2016. “Recovering a Basic Space from Issue Scales in R.” Journal of Statistical Software 69(7): 1-21. doi:10.18637/jss.v069.i07

Keith T. Poole. 1998. “Recovering a Basic Space From a Set of Issue Scales.” American Journal of Political Science 42(3): 954-993. doi: 10.2307/2991737

See Also

'blackbox_transpose', 'LC1980', 'plotcdf.blackbt', 'summary.blackbt', 'LC1980_bbt'.

Examples

### Loads and scales the Liberal-Conservative scales from the 1980 ANES.
  data(LC1980)
  LCdat <- LC1980[,-1]	#Dump the column of self-placements

   
  LC1980_bbt <- blackbox_transpose(LCdat, missing=c(0,8,9), dims=3, 
    minscale=5, verbose=TRUE)
  
  ### 'LC1980_bbt' can be retrieved quickly with: 
  data(LC1980_bbt)

  summary(LC1980_bbt)
  plot(LC1980_bbt)

Bootstrapped Aldrich-McKelvey Stimulus Plots

Description

plot.boot_aldmck reads an boot_aldmck object and plots a dotchart of the stimuli with estimated confidence intervals.

Usage

## S3 method for class 'boot_aldmck'
plot(x, ...)

Arguments

x

an boot_aldmck output object.

...

other arguments to plot.

Value

A dotchart of estimated stimulus locations, with 95 percent confidence intervals. Point estimates are estimates from the original data set.

Author(s)

Keith Poole [email protected]

Howard Rosenthal [email protected]

Jeffrey Lewis [email protected]

James Lo [email protected]

Royce Carroll [email protected]

Christopher Hare [email protected]

References

David A. Armstrong II, Ryan Bakker, Royce Carroll, Christopher Hare, Keith T. Poole, and Howard Rosenthal. 2021. Analyzing Spatial Models of Choice and Judgment. 2nd ed. Statistics in the Social and Behavioral Sciences Series. Boca Raton, FL: Chapman & Hall/CRC. doi: 10.1201/9781315197609

Keith T. Poole, Jeffrey B. Lewis, Howard Rosenthal, James Lo, and Royce Carroll. 2016. “Recovering a Basic Space from Issue Scales in R.” Journal of Statistical Software 69(7): 1-21. doi:10.18637/jss.v069.i07

Keith T. Poole. 1998. “Recovering a Basic Space From a Set of Issue Scales.” American Journal of Political Science 42(3): 954-993. doi: 10.2307/2991737

See Also

'aldmck', 'boot_aldmck'.

Examples

### Loads the Liberal-Conservative scales from the 1980 ANES.
  data(LC1980)
  result <- boot_aldmck(data=LC1980, polarity=2, respondent=1, missing=c(0,8,9), iter=30)
  
  plot(result)

Bootstrapped Blackbox Transpose Stimulus Plots

Description

plot.boot_blackbt reads an boot_blackbt object and plots a dotchart of the stimuli with estimated confidence intervals.

Usage

## S3 method for class 'boot_blackbt'
plot(x, ...)

Arguments

x

an boot_blackbt output object.

...

other arguments to plot.

Value

A dotchart of estimated stimulus locations, with 95 percent confidence intervals. Point estimates are estimates from the original data set.

Author(s)

Keith Poole [email protected]

Howard Rosenthal [email protected]

Jeffrey Lewis [email protected]

James Lo [email protected]

Royce Carroll [email protected]

Christopher Hare [email protected]

References

David A. Armstrong II, Ryan Bakker, Royce Carroll, Christopher Hare, Keith T. Poole, and Howard Rosenthal. 2021. Analyzing Spatial Models of Choice and Judgment. 2nd ed. Statistics in the Social and Behavioral Sciences Series. Boca Raton, FL: Chapman & Hall/CRC. doi: 10.1201/9781315197609

Keith T. Poole, Jeffrey B. Lewis, Howard Rosenthal, James Lo, and Royce Carroll. 2016. “Recovering a Basic Space from Issue Scales in R.” Journal of Statistical Software 69(7): 1-21. doi:10.18637/jss.v069.i07

Keith T. Poole. 1998. “Recovering a Basic Space From a Set of Issue Scales.” American Journal of Political Science 42(3): 954-993. doi: 10.2307/2991737

See Also

'blackbox_transpose', 'boot_blackbt'.

Examples

### Loads the Liberal-Conservative scales from the 1980 ANES.
  data(LC1980)
  data <- LC1980[,-1]	#Dump the column of self-placements

   
  bootbbt <- boot_blackbt(data, missing=c(0,8,9), dims=1, 
    minscale=8, iter=10)
  
  ### 'bootbbt' can be retrieved quickly with: 
  data(bootbbt)

  plot.boot_blackbt(bootbbt)

Aldrich-McKelvey Coordinate Cumulative Distribution Plot

Description

plot.aldmck reads an aldmck object and plots the cumulative distribution of the respondents and stimuli.

Usage

## S3 method for class 'cdf'
plot(x, align=NULL, xlim=c(-2,2), ...)

Arguments

x

an aldmck output object.

align

integer, the x-axis location that stimuli names should be aligned to If set to NULL, it will attempt to guess a location.

xlim

vector of length 2, fed to the plot function as the xlim argument, which sets the minimum and maximum range of the x-axis.

...

other arguments to plot.

Value

A plot of the empirical cumulative distribution of the respondent ideal points, along with the locations of the stimuli. If no self-placements were specified during estimation, no graphical plots will appear.

Author(s)

Keith Poole [email protected]

Howard Rosenthal [email protected]

Jeffrey Lewis [email protected]

James Lo [email protected]

Royce Carroll [email protected]

Christopher Hare [email protected]

References

John H. Aldrich and Richard D. McKelvey. 1977. “A Method of Scaling with Applications to the 1968 and 1972 Presidential Elections.” American Political Science Review 71(1): 111-130. doi: 10.2307/1956957

David A. Armstrong II, Ryan Bakker, Royce Carroll, Christopher Hare, Keith T. Poole, and Howard Rosenthal. 2021. Analyzing Spatial Models of Choice and Judgment. 2nd ed. Statistics in the Social and Behavioral Sciences Series. Boca Raton, FL: Chapman & Hall/CRC. doi: 10.1201/9781315197609

Thomas R. Palfrey and Keith T. Poole. 1987. “The Relationship between Information, Ideology, and Voting Behavior.” American Journal of Political Science 31(3): 511-530. doi: 10.2307/2111281

Keith T. Poole, Jeffrey B. Lewis, Howard Rosenthal, James Lo, and Royce Carroll. 2016. “Recovering a Basic Space from Issue Scales in R.” Journal of Statistical Software 69(7): 1-21. doi:10.18637/jss.v069.i07

Keith T. Poole. 1998. “Recovering a Basic Space From a Set of Issue Scales.” American Journal of Political Science 42(3): 954-993. doi: 10.2307/2991737

See Also

'aldmck', 'LC1980', 'summary.aldmck', 'plot.aldmck'.

Examples

### Loads the Liberal-Conservative scales from the 1980 ANES.
  data(LC1980)
  result <- aldmck(data=LC1980, polarity=2, respondent=1, missing=c(0,8,9), verbose=TRUE)
  
  summary(result)
  
  plot.cdf(result)

Blackbox Transpose Coordinate Cumulative Distribution Plot

Description

plotcdf.blackbt reads an blackbt object and plots the cumulative distribution of the respondents and stimuli.

Usage

plotcdf.blackbt(x, align=NULL, xlim=c(-1.2,1), ...)

Arguments

x

an blackbt output object.

align

integer, the x-axis location that stimuli names should be aligned to If set to NULL, it will attempt to guess a location.

xlim

vector of length 2, fed to the plot function as the xlim argument, which sets the minimum and maximum range of the x-axis.

...

other arguments to plot.

Value

A plot of the empirical cumulative distribution of the respondent ideal points, along with the locations of the stimuli.

Author(s)

Keith Poole [email protected]

Howard Rosenthal [email protected]

Jeffrey Lewis [email protected]

James Lo [email protected]

Royce Carroll [email protected]

Christopher Hare [email protected]

References

David A. Armstrong II, Ryan Bakker, Royce Carroll, Christopher Hare, Keith T. Poole, and Howard Rosenthal. 2021. Analyzing Spatial Models of Choice and Judgment. 2nd ed. Statistics in the Social and Behavioral Sciences Series. Boca Raton, FL: Chapman & Hall/CRC. doi: 10.1201/9781315197609

Keith T. Poole, Jeffrey B. Lewis, Howard Rosenthal, James Lo, and Royce Carroll. 2016. “Recovering a Basic Space from Issue Scales in R.” Journal of Statistical Software 69(7): 1-21. doi:10.18637/jss.v069.i07

Keith T. Poole. 1998. “Recovering a Basic Space From a Set of Issue Scales.” American Journal of Political Science 42(3): 954-993. doi: 10.2307/2991737

See Also

'blackbox_transpose', 'LC1980', 'plot.blackbt', 'summary.blackbt', 'LC1980_bbt'.

Examples

### Loads the Liberal-Conservative scales from the 1980 ANES.
  data(LC1980)
  LCdat <- LC1980[,-1]	#Dump the column of self-placements

   
  LC1980_bbt <- blackbox_transpose(LCdat, missing=c(0,8,9), dims=3, 
    minscale=5, verbose=TRUE)
  
  ### 'LC1980_bbt' can be retrieved quickly with: 
  data(LC1980_bbt)
  summary(LC1980_bbt)

  plotcdf.blackbt(LC1980_bbt)

Predict method of aldmck objects

Description

predict.aldmck reads an aldmck object and uses the estimates to generate a matrix of predicted values.

Usage

## S3 method for class 'aldmck'
predict(object, caliper=0.2, ...)

Arguments

object

A aldmck output object.

caliper

Caliper tolerance. Any individuals with estimated weights lower than this value are NA'd out for prediction. Since predictions are made by dividing observed values by estimating weights, very small weights will grossly inflate the magnitude of predicted values and lead to extreme predictions.

...

Ignored.

Value

A matrix of predicted values generated from the parameters estimated from a aldmck object.

Author(s)

Keith Poole [email protected]

Howard Rosenthal [email protected]

Jeffrey Lewis [email protected]

James Lo [email protected]

Royce Carroll [email protected]

Christopher Hare [email protected]

References

John H. Aldrich and Richard D. McKelvey. 1977. “A Method of Scaling with Applications to the 1968 and 1972 Presidential Elections.” American Political Science Review 71(1): 111-130. doi: 10.2307/1956957

David A. Armstrong II, Ryan Bakker, Royce Carroll, Christopher Hare, Keith T. Poole, and Howard Rosenthal. 2021. Analyzing Spatial Models of Choice and Judgment. 2nd ed. Statistics in the Social and Behavioral Sciences Series. Boca Raton, FL: Chapman & Hall/CRC. doi: 10.1201/9781315197609

Thomas R. Palfrey and Keith T. Poole. 1987. “The Relationship between Information, Ideology, and Voting Behavior.” American Journal of Political Science 31(3): 511-530. doi: 10.2307/2111281

Keith T. Poole, Jeffrey B. Lewis, Howard Rosenthal, James Lo, and Royce Carroll. 2016. “Recovering a Basic Space from Issue Scales in R.” Journal of Statistical Software 69(7): 1-21. doi:10.18637/jss.v069.i07

Keith T. Poole. 1998. “Recovering a Basic Space From a Set of Issue Scales.” American Journal of Political Science 42(3): 954-993. doi: 10.2307/2991737

See Also

'aldmck', 'LC1980'

Examples

### Loads the Liberal-Conservative scales from the 1980 ANES.
  data(LC1980)

  ### Estimate an aldmck object from example and call predict function
  result <- aldmck(data=LC1980, polarity=2, respondent=1, missing=c(0,8,9), verbose=TRUE)
  prediction <- predict.aldmck(result)

  ### Examine predicted vs. observed values for first 10 respondents
  ### Note some observations are NA'd in prediction matrix from caliper
  ### First column of LC1980 are self-placements, which are excluded
  LC1980[1:10,-1]
  prediction[1:10,]

  ### Check correlation across all predicted vs. observed, excluding missing values
  prediction[which(LC1980[,-1] %in% c(0,8,9))] <- NA
  cor(as.numeric(prediction), as.numeric(LC1980[,-1]), use="pairwise.complete")

Predict method of blackbox objects

Description

predict.blackbox reads an blackbox object and uses the estimates to generate a matrix of predicted values.

Usage

## S3 method for class 'blackbox'
predict(object, dims=1, ...)

Arguments

object

A blackbox output object.

dims

Number of dimensions used in prediction. Must be equal to or less than number of dimensions used in estimation.

...

Ignored.

Value

A matrix of predicted values generated from the parameters estimated from a blackbox object.

Author(s)

Keith Poole [email protected]

Howard Rosenthal [email protected]

Jeffrey Lewis [email protected]

James Lo [email protected]

Royce Carroll [email protected]

Christopher Hare [email protected]

References

David A. Armstrong II, Ryan Bakker, Royce Carroll, Christopher Hare, Keith T. Poole, and Howard Rosenthal. 2021. Analyzing Spatial Models of Choice and Judgment. 2nd ed. Statistics in the Social and Behavioral Sciences Series. Boca Raton, FL: Chapman & Hall/CRC. doi: 10.1201/9781315197609

Keith T. Poole, Jeffrey B. Lewis, Howard Rosenthal, James Lo, and Royce Carroll. 2016. “Recovering a Basic Space from Issue Scales in R.” Journal of Statistical Software 69(7): 1-21. doi:10.18637/jss.v069.i07

Keith T. Poole. 1998. “Recovering a Basic Space From a Set of Issue Scales.” American Journal of Political Science 42(3): 954-993. doi: 10.2307/2991737

See Also

'blackbox', 'Issues1980'

Examples

### Loads issue scales from the 1980 ANES.
  data(Issues1980)
  Issues1980[Issues1980[,"abortion1"]==7,"abortion1"] <- 8	#missing recode
  Issues1980[Issues1980[,"abortion2"]==7,"abortion2"] <- 8	#missing recode

  ### Estimate blackbox object from example and call predict function
   
  Issues1980_bb <- blackbox(Issues1980, missing=c(0,8,9), verbose=FALSE, 
    dims=3, minscale=8)
  
  ### 'Issues1980_bb' can be retrieved quickly with: 
  data(Issues1980_bb)
  prediction <- predict.blackbox(Issues1980_bb, dims=3)

  ### Examine predicted vs. observed values for first 10 respondents
  ### Note that 4th and 6th respondents are NA because of missing data
  Issues1980[1:10,]
  prediction[1:10,]

  ### Check correlation across all predicted vs. observed, excluding missing values
  prediction[which(Issues1980 %in% c(0,8,9))] <- NA
  cor(as.numeric(prediction), as.numeric(Issues1980), use="pairwise.complete")

Predict method of blackbt objects

Description

predict.blackbt reads an blackbt object and uses the estimates to generate a matrix of predicted values.

Usage

## S3 method for class 'blackbt'
predict(object, dims=1, ...)

Arguments

object

A blackbox output object.

dims

Number of dimensions used in prediction. Must be equal to or less than number of dimensions used in estimation.

...

Ignored.

Value

A matrix of predicted values generated from the parameters estimated from a blackbt object.

Author(s)

Keith Poole [email protected]

Howard Rosenthal [email protected]

Jeffrey Lewis [email protected]

James Lo [email protected]

Royce Carroll [email protected]

Christopher Hare [email protected]

References

David A. Armstrong II, Ryan Bakker, Royce Carroll, Christopher Hare, Keith T. Poole, and Howard Rosenthal. 2021. Analyzing Spatial Models of Choice and Judgment. 2nd ed. Statistics in the Social and Behavioral Sciences Series. Boca Raton, FL: Chapman & Hall/CRC. doi: 10.1201/9781315197609

Keith T. Poole, Jeffrey B. Lewis, Howard Rosenthal, James Lo, and Royce Carroll. 2016. “Recovering a Basic Space from Issue Scales in R.” Journal of Statistical Software 69(7): 1-21. doi:10.18637/jss.v069.i07

Keith T. Poole. 1998. “Recovering a Basic Space From a Set of Issue Scales.” American Journal of Political Science 42(3): 954-993. doi: 10.2307/2991737

See Also

'blackbox_transpose', 'LC1980', 'LC1980_bbt'

Examples

### Loads the Liberal-Conservative scales from the 1980 ANES.
  data(LC1980)
  LCdat <- LC1980[,-1]	#Dump the column of self-placements

  ### Estimate blackbt object from example and call predict function
   
  LC1980_bbt <- blackbox_transpose(LCdat, missing=c(0,8,9), dims=3, 
    minscale=5, verbose=TRUE)
  
  ### 'LC1980_bbt' can be retrieved quickly with: 
  data(LC1980_bbt)
  prediction <- predict.blackbt(LC1980_bbt, dims=2)

  ### Examine predicted vs. observed values for first 10 respondents
  ### First column of LC1980 are self-placements, which are excluded
  LC1980[1:10,-1]
  prediction[1:10,]

  ### Check correlation across all predicted vs. observed, excluding missing values
  prediction[which(LC1980[,-1] %in% c(0,8,9))] <- NA
  cor(as.numeric(prediction), as.numeric(LC1980[,-1]), use="pairwise.complete")

Stimulus extraction function

Description

stimuli is a convenience function to extract the stimulus parameters from an aldmck, blackbox, or blackbt object.

Usage

stimuli(object)

Arguments

object

an aldmck, blackbox, or blackbt output object.

Value

The stimuli of the estimated output, which can also be recovered as object\$stimuli. Please refer to the documentation of aldmck, blackbox, or blackbox_transpose for specifics.

Author(s)

Keith Poole [email protected]

Howard Rosenthal [email protected]

Jeffrey Lewis [email protected]

James Lo [email protected]

Royce Carroll [email protected]

Christopher Hare [email protected]

References

John H. Aldrich and Richard D. McKelvey. 1977. “A Method of Scaling with Applications to the 1968 and 1972 Presidential Elections.” American Political Science Review 71(1): 111-130. doi: 10.2307/1956957

David A. Armstrong II, Ryan Bakker, Royce Carroll, Christopher Hare, Keith T. Poole, and Howard Rosenthal. 2021. Analyzing Spatial Models of Choice and Judgment. 2nd ed. Statistics in the Social and Behavioral Sciences Series. Boca Raton, FL: Chapman & Hall/CRC. doi: 10.1201/9781315197609

Thomas R. Palfrey and Keith T. Poole. 1987. “The Relationship between Information, Ideology, and Voting Behavior.” American Journal of Political Science 31(3): 511-530. doi: 10.2307/2111281

Keith T. Poole, Jeffrey B. Lewis, Howard Rosenthal, James Lo, and Royce Carroll. 2016. “Recovering a Basic Space from Issue Scales in R.” Journal of Statistical Software 69(7): 1-21. doi:10.18637/jss.v069.i07

Keith T. Poole. 1998. “Recovering a Basic Space From a Set of Issue Scales.” American Journal of Political Science 42(3): 954-993. doi: 10.2307/2991737

See Also

'aldmck', 'blackbox', 'blackbox_transpose'.

Examples

### Loads issue scales from the 1980 ANES.
  data(Issues1980)
  Issues1980[Issues1980[,"abortion1"]==7,"abortion1"] <- 8	#missing recode
  Issues1980[Issues1980[,"abortion2"]==7,"abortion2"] <- 8	#missing recode

   
  Issues1980_bb <- blackbox(Issues1980, missing=c(0,8,9), verbose=FALSE, 
    dims=3, minscale=8)
  
  ### 'Issues1980_bb' can be retrieved quickly with: 
  data(Issues1980_bb)

  summary(Issues1980_bb)
  stimuli(Issues1980_bb)

Aldrich-McKelvey Summary

Description

summary.aldmck reads an aldmck object and prints a summary.

Usage

## S3 method for class 'aldmck'
summary(object, ...)

Arguments

object

an aldmck output object.

...

further arguments to print.

Value

A summary of an aldmck object. Reports number of stimuli, respondents scaled, number of respondents with positive and negative weights, R-squared, Reudction of normalized variance of perceptions, and stimuli locations.

Author(s)

Keith Poole [email protected]

Howard Rosenthal [email protected]

Jeffrey Lewis [email protected]

James Lo [email protected]

Royce Carroll [email protected]

Christopher Hare [email protected]

References

John H. Aldrich and Richard D. McKelvey. 1977. “A Method of Scaling with Applications to the 1968 and 1972 Presidential Elections.” American Political Science Review 71(1): 111-130. doi: 10.2307/1956957

David A. Armstrong II, Ryan Bakker, Royce Carroll, Christopher Hare, Keith T. Poole, and Howard Rosenthal. 2021. Analyzing Spatial Models of Choice and Judgment. 2nd ed. Statistics in the Social and Behavioral Sciences Series. Boca Raton, FL: Chapman & Hall/CRC. doi: 10.1201/9781315197609

Thomas R. Palfrey and Keith T. Poole. 1987. “The Relationship between Information, Ideology, and Voting Behavior.” American Journal of Political Science 31(3): 511-530. doi: 10.2307/2111281

Keith T. Poole, Jeffrey B. Lewis, Howard Rosenthal, James Lo, and Royce Carroll. 2016. “Recovering a Basic Space from Issue Scales in R.” Journal of Statistical Software 69(7): 1-21. doi:10.18637/jss.v069.i07

Keith T. Poole. 1998. “Recovering a Basic Space From a Set of Issue Scales.” American Journal of Political Science 42(3): 954-993. doi: 10.2307/2991737

See Also

'aldmck', 'LC1980', 'plot.aldmck', 'plot.cdf'.

Examples

### Loads the Liberal-Conservative scales from the 1980 ANES.
	data(LC1980)
	
	result <- aldmck(data=LC1980, polarity=2, respondent=1, missing=c(0,8,9), verbose=TRUE)
	
	summary(result)
	plot.aldmck(result)

Blackbox Summary

Description

summary.blackbox reads an blackbox object and prints a summary.

Usage

## S3 method for class 'blackbox'
summary(object, ...)

Arguments

object

a blackbox output object.

...

further arguments to print.

Value

A summary of a blackbox object. For each dimension, reports all stimuli with coordinates, individuals used for scaling, and fit. Also summarizes number of rows, columns, total data entries, number of missing entries, percent missing data, and sum of squares.

Author(s)

Keith Poole [email protected]

Howard Rosenthal [email protected]

Jeffrey Lewis [email protected]

James Lo [email protected]

Royce Carroll [email protected]

Christopher Hare [email protected]

References

David A. Armstrong II, Ryan Bakker, Royce Carroll, Christopher Hare, Keith T. Poole, and Howard Rosenthal. 2021. Analyzing Spatial Models of Choice and Judgment. 2nd ed. Statistics in the Social and Behavioral Sciences Series. Boca Raton, FL: Chapman & Hall/CRC. doi: 10.1201/9781315197609

Keith T. Poole, Jeffrey B. Lewis, Howard Rosenthal, James Lo, and Royce Carroll. 2016. “Recovering a Basic Space from Issue Scales in R.” Journal of Statistical Software 69(7): 1-21. doi:10.18637/jss.v069.i07

Keith T. Poole. 1998. “Recovering a Basic Space From a Set of Issue Scales.” American Journal of Political Science 42(3): 954-993. doi: 10.2307/2991737

See Also

'blackbox', 'Issues1980'

Examples

### Loads issue scales from the 1980 ANES.
  data(Issues1980)
  Issues1980[Issues1980[,"abortion1"]==7,"abortion1"] <- 8	#missing recode
  Issues1980[Issues1980[,"abortion2"]==7,"abortion2"] <- 8	#missing recode

   
  Issues1980_bb <- blackbox(Issues1980, missing=c(0,8,9), verbose=FALSE, 
    dims=3, minscale=8)
  
  ### 'Issues1980_bb' can be retrieved quickly with: 
  data(Issues1980_bb)

  summary(Issues1980_bb)

Blackbox-Transpose Summary

Description

summary.blackbt reads an blackbt object and prints a summary.

Usage

## S3 method for class 'blackbt'
summary(object, ...)

Arguments

object

a blackbt output object.

...

further arguments to print.

Value

A summary of a blackbt object. For each dimension, reports all stimuli with coordinates, individuals used for scaling, and fit. Also summarizes number of rows, columns, total data entries, number of missing entries, percent missing data, and sum of squares.

Author(s)

Keith Poole [email protected]

Howard Rosenthal [email protected]

Jeffrey Lewis [email protected]

James Lo [email protected]

Royce Carroll [email protected]

Christopher Hare [email protected]

References

David A. Armstrong II, Ryan Bakker, Royce Carroll, Christopher Hare, Keith T. Poole, and Howard Rosenthal. 2021. Analyzing Spatial Models of Choice and Judgment. 2nd ed. Statistics in the Social and Behavioral Sciences Series. Boca Raton, FL: Chapman & Hall/CRC. doi: 10.1201/9781315197609

Keith T. Poole, Jeffrey B. Lewis, Howard Rosenthal, James Lo, and Royce Carroll. 2016. “Recovering a Basic Space from Issue Scales in R.” Journal of Statistical Software 69(7): 1-21. doi:10.18637/jss.v069.i07

Keith T. Poole. 1998. “Recovering a Basic Space From a Set of Issue Scales.” American Journal of Political Science 42(3): 954-993. doi: 10.2307/2991737

See Also

'blackbox_transpose', 'LC1980', 'plot.blackbt', 'plotcdf.blackbt', 'LC1980_bbt'.

Examples

### Loads the Liberal-Conservative scales from the 1980 ANES.
  data(LC1980)
  LCdat <- LC1980[,-1]	# Dump the column of self-placements

   
  LC1980_bbt <- blackbox_transpose(LCdat, missing=c(0,8,9), dims=3, 
    minscale=5, verbose=TRUE)
  
  ### 'LC1980_bbt' can be retrieved quickly with: 
  data(LC1980_bbt)

  summary(LC1980_bbt)
  plot(LC1980_bbt)