boot_blackbt: Bootstrap of Blackbox Transpose Scaling

Description Usage Arguments Value Author(s) See Also Examples

View source: R/basicspace.R

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

1
  boot_blackbt(data, missing=NULL, dims=1, dim.extract=dims, minscale, 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.

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.

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 ktpoole@uga.edu

Howard Rosenthal hr31@nyu.edu

Jeffrey Lewis jblewis@ucla.edu

James Lo lojames@usc.edu

Royce Carroll rcarroll@rice.edu

See Also

'blackbox_transpose', 'plot.boot_blackbt'.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
data(LC1980)

data=LC1980[,-1]

 # Not run to save time, but loaded object is the output

# bootbbt <- boot_blackbt(data, missing=c(0,8,9), dims=1, minscale=8, iter=10)

data("bootbbt")


plot.boot_blackbt(bootbbt)

basicspace documentation built on Jan. 11, 2020, 9:32 a.m.