Skip to content

Expandir o no expandir thetas en item.fit #19

@jcliberatol

Description

@jcliberatol

En la estadistica x² el paquete ltm no expande los trazos de los individuos cuando calcula los cuantiles de la distribucion de los trazos, esto significaria que los cuantiles se sacarian solamente de los trazos sin importar las frecuencias.

Vease el siguiente codigo para referencia :

  fp = full.pattern.expand(patterns,ncol(patterns)-1);
  theta = fp[,ncol(patterns)]
  freq = patterns[,ncol(patterns)-1]
  groups = quantile(theta,seq(0, 1, length.out = G + 1))
  groups[1] = groups[1] - 0.1
  #summary(theta)
  groups[G + 1] = groups[G + 1] + 0.1
  groups.Ind = findInterval(theta,groups)  #que theta pertenece a que intervalo (grupos)
  groups.Ind = factor(groups.Ind, levels = sort(unique(groups.Ind)))  #volverla un factor
  thetaG = tapply(rep(theta, frec), rep(groups.Ind, frec), FUN = FUN) #por grupos calcule la mediana

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions