Learn R Programming

basicspace (version 0.13)

boot_blackbt: 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)

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 vecto
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.

See Also

'blackbox_transpose', 'plot.boot_blackbt'.

Examples

Run this code
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)

Run the code above in your browser using DataLab