R/weighted_stats_extend_wgt.R

Defines functions weighted_stats_extend_wgt

## File Name: weighted_stats_extend_wgt.R
## File Version: 0.09

weighted_stats_extend_wgt <- function( wgt, mat )
{
    N1 <- nrow(mat)
    N2 <- ncol(mat)
    if ( is.null(wgt) ){
        wgt <- rep( 1, N1 )
    }
    if ( is.vector(wgt) ){
        wgt <- matrix( wgt, nrow=N1, ncol=N2 )
    }
    return(wgt)
}
alexanderrobitzsch/sirt documentation built on April 23, 2024, 2:31 p.m.