Skip to contents

Randomly subtract or add an amount to a proportion of the grid ratings. This emulates randomness during the rating process, producing a grid which might also have resulted.

Usage

perturbate(x, prop = 0.1, amount = c(-1, 1), prob = c(0.5, 0.5))

grids_perturbate(x, n = 10, prop = 0.1, amount = c(-1, 1), prob = c(0.5, 0.5))

Arguments

x

A repgrid object.

prop

The proportion of ratings to be perturbated.

amount

The amount set of possible perturbations. Will depend on scale range. Usually {-1, 1} are reasonable settings.

prob

Probability for each amount to occur.

n

Number of perturbated grid to generate.

Examples

## All results for PVAFF index when ratings are slightly perturbated
p <- indexPvaff(boeker)
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
l <- grids_perturbate(boeker, n = 100, prop = .1)
pp <- sapply(l, indexPvaff)  # apply indexPvaff function to all perturbated grids
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
#> Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default.Before that the construct correlation matrix was used (see method=2).
#> 
range(pp)   # min and max PVAFF
#> [1] 0.3674606 0.4375565
hist(pp, xlab = "PVAFF values")    # visualize
abline(v = p, col = "blue", lty = 2)