# ggumProbability: GGUM Probability Function In duckmayr/bggum: Bayesian Estimation of Generalized Graded Unfolding Model Parameters

## Description

Calculate the probability of a response according to the GGUM

## Usage

 `1` ```ggumProbability(response, theta, alpha, delta, tau) ```

## Arguments

 `response` A numeric vector or matrix giving the response(s) for which probability should be calculated. `theta` A numeric vector of latent trait score(s) for respondent(s) `alpha` A numeric vector of discrimination parameter(s) `delta` A numeric vector of location parameter(s) `tau` A numeric vector (if responses to one item are given) or a list (if responses to multiple items are given); the tau parameters for each item is a numeric vector of length K (the number of possible responses) giving the options' threshold parameters; the first element of `tau` should be zero

## Details

The General Graded Unfolding Model (GGUM) is an item response model designed to consider the possibility of disagreement for opposite reasons. This function gives the probability of a respondent's response to a test item given item and respondent parameters. The user can calculate the probability of one particular response to an item, for any number of the possible responses to the item, the probability of a vector of responses (either responses by one person to multiple items, or by multiple people to one item), or the probability of each response in a response matrix.

The probability that respondent i chooses option k for item j is given by

(exp(α_j [k(θ_i-δ_j) - ∑_{m=0}^k τ_{jm}]) + exp(α_j [(2K - k - 1) (θ_i - δ_j) - ∑_{m=0}^k τ_{jm}])) / (∑_{l=0}^{K-1} [exp (α_j [l (θ_i - δ_j) - ∑_{m=0}^l τ_{jm}]) + exp (α_j [(2K - l - 1) (θ_i - δ_j) - ∑_{m=0}^l τ_{jm}])])

, where θ_i is i's latent trait parameter, α_j is the item's discrimination parameter, δ_j is the item's location parameter, τ_{j0}, …, τ_{j(K-1)} are the options' threshold parameters, and τ_{j0} is 0, K is the number of options for item j, and the options are indexed by k = 0, …, K-1.

## Value

A matrix or vector of the same dimensions/length of `response`.

## Note

Please note that items' options should be zero-indexed.

## References

de la Torre, Jimmy, Stephen Stark, and Oleksandr S. Chernyshenko. 2006. “Markov Chain Monte Carlo Estimation of Item Parameters for the Generalized Graded Unfolding Model.” Applied Psychological Measurement 30(3): 216–232.

Roberts, James S., John R. Donoghue, and James E. Laughlin. 2000. “A General Item Response Theory Model for Unfolding Unidimensional Polytomous Responses.” Applied Psychological Measurement 24(1): 3–32.

## Examples

 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17``` ```## What is the probability of a 1 response to a dichotomous item ## with discrimination parameter 2, location parameter 0, and ## option threshold vector (0, -1) for respondents at -1, 0, and 1 ## on the latent scale? ggumProbability(response = rep(1, 3), theta = c(-1, 0, 1), alpha = 2, delta = 0, tau = c(0, -1)) ## We can also use this function for getting the probability of all ## observed responses given the data and item and person parameter estimtes. ## Here's an example of that with some simulated data: ## Simulate data with 10 items, each with four options, and 100 respondents set.seed(123) sim_data <- ggum_simulation(100, 10, 4) head(ggumProbability(response = sim_data\$response_matrix, theta = sim_data\$theta, alpha = sim_data\$alpha, delta = sim_data\$delta, tau = sim_data\$tau)) ```

duckmayr/bggum documentation built on Jan. 20, 2020, 5:23 a.m.