Learn R Programming

ShinyItemAnalysis (version 1.3.4)

plotAdjacent: Function for plotting category probabilities of adjacent logistic regression model

Description

Function for plotting category probabilities function estimated by vglm() from VGAM package

Usage

plotAdjacent(x, matching.name = "matching")

Arguments

x

object of class vglm

matching.name

character: name of matching criterion used for estimation in x.

See Also

vglm

Examples

Run this code
# NOT RUN {
# loading packages
library(VGAM)

# loading data
data <- dataMedicalgraded[, 1:100]

# total score calculation
score <- apply(data, 1, sum)
data[, 1] <- ordered(factor(data[, 1], levels = 0:max(data[, 1])))

# cummulative logistic model for item 1
fit <- vglm(data[, 1] ~ score, family = acat(reverse = FALSE, parallel = TRUE))
# coefficients for item 1
coefs <- coef(fit)

plotAdjacent(fit, matching.name = "Total score")
# }

Run the code above in your browser using DataLab