NLCUB: Fitting NLCUB models

Description Usage Arguments Details Value Author(s) References Examples

View source: R/NLCUB.R

Description

Testo di descrizione \loadmathjax

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
NLCUB(
  r,
  g = NULL,
  m = NULL,
  maxT = NULL,
  param0 = c(0.5, 0.5),
  freq.table = TRUE,
  method = "EM",
  dk = NULL
)

Arguments

r

numeric, observed ratings (either the vector of microdata or the vector of the m observed frequencies (frequency table)

g

numeric vector, 'latent' categories assigned to each rating point; if g is declared, pai and xi are estimated for fixed g;if g is not declared, model selection is performed (see method) in order to determine optimal g

m

integer, number of categories of the response scale (active only when g is not declared)

maxT

numeric, maximum value for T (must be maxT > m-1, default = 2m-1); active only when g is not declared

param0

numeric, starting values for pai and xi (default: c(0.5,0.5))

freq.table

logical, if TRUE, the data in r is the vector of the m observed frequencies (frequency table) (default=TRUE)

method

character, "NM" (likelihood based - Melder-Mead maximization) - "EM" (likelihood based - EM algorithm)

dk

numeric, proportion of 'don't know' responses; if declared, in addition to the estimate of pai, the estimated of pai adjusted for the presence of dk responses is provided

Details

(Details here). Se serve possiamo inserire anche formule con Latex: \mjdeqn\sum_k=1^n n \choose k p^k (1-p)^n-ktesto ascii

Value

A list with the following estimates:

The command can also display two graphs: observed vs fitted frequencies + transition plot

Author(s)

Paola Zuccolotto, Marica Manisera, Sandri Marco

References

M. Manisera and P. Zuccolotto (2014) Modeling rating data with Nonlinear CUB models. Computational Statistics and Data Analysis, 78, pp. 100–118

M. Manisera and P. Zuccolotto (2014) Nonlinear CUB models: The R code. Statistical Software - Statistica & Applicazioni, Vol. XII, n. 2, pp. 205-223

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
N <- 1000
pai.sim <- 0.8
xi.sim <- 0.3
g.sim <- c(1,1,2,4,2)
cats <- 5
set.seed(1234567)
dataNLCUB <- simNLCUB(N, pai.sim, xi.sim, g.sim)
datitab <- table(dataNLCUB)
est <- NLCUB(datitab, g=g.sim, freq.table=TRUE)
plot(est)

sndmrc/NLCUB documentation built on Dec. 23, 2021, 3:28 a.m.