std_coef: Standardized factor loading parameter estimates and...

Description Usage Arguments Value Author(s) See Also Examples

View source: R/std_coef.R

Description

std_coef compute standardized factor loading parameter estimates and correlation matrix.

std_cov scales a covariance matrix into the corresponding correlation matrix.

Usage

1
2
3
4
## S3 method for class 'flirt'
std_coef(est, dim_info, cov_matrix)
## S3 method for class 'flirt'
std_cov(dim_info, cov_matrix)

Arguments

est

a vector of loading parameter estimates from flirt

dim_info

a list of items for each dimension

cov_matrix

a square numeric variance_covariance matrix

Value

std_coef returns a list of standardized loading parameter estimates and correlation matrix. std_cov returns a correlation matrix.

Author(s)

Minjeong Jeon <jeon.117@osu.edu>

See Also

flirt

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
library(flirt)


## verbal aggression data: polytmous item responses 

data(verb2)

# 2-dimensional 2PL model for binary data 
# a*th + b parameterization 
model1 <- flirt(data=resp, loading=list(on=TRUE, inside=FALSE),  
    mul=list(on=TRUE, dim_info=list(dim1=1:12, dim2=13:24)) , control=list(nq=5) )

## function for standardized loadings and covariance matrix 
# length 24, unstandardized loading parameter estimates 
est <- coef(model1)[1:24,1] 

# length 3 (sd1, cov12, sd2) unstandardized sd and cov estimates vector   
cov_el <- coef(model1)[51:53,1] 

# covariance matrix 
cov_matrix <- matrix(c(cov_el[1]^2,cov_el[3], cov_el[3],cov_el[2]^2),2,2, byrow=FALSE) 

# list 
dim_info <- list(dim1=1:12, dim2=13:24) 

test0 <- std_coef(est=est, dim_info=dim_info, cov_matrix= cov_matrix) 
test1 <- std_cov(dim_info=dim_info, cov_matrix= cov_matrix)

seonghobae/flirt.x32 documentation built on May 29, 2019, 6:54 p.m.