R/noharm_sirt_number_estimated_parameters.R

Defines functions noharm_sirt_number_estimated_parameters

## File Name: noharm_sirt_number_estimated_parameters.R
## File Version: 0.03

noharm_sirt_number_estimated_parameters <- function(I, Fpatt, Ppatt, Psipatt)
{
    Nestpars <- list(total=0)
    Nestpars$total <- Nestpars$thresh <- I
    Nestpars$F <- sum( Fpatt > 0 )
    Nestpars$total <- Nestpars$total + Nestpars$F
    Nestpars$P <- sum( diag(Ppatt)==1 ) / 2 +  sum( Ppatt==1 ) / 2
    Nestpars$total <- Nestpars$total + Nestpars$P
    Nestpars$Psi <- 1/2 * sum( Psipatt==1 )
    Nestpars$total <- Nestpars$total + Nestpars$Psi
    #--- output
    return(Nestpars)
}

Try the sirt package in your browser

Any scripts or data that you put into this service are public.

sirt documentation built on Aug. 11, 2023, 5:07 p.m.