Skip to content

Latest commit

 

History

History
130 lines (85 loc) · 4.27 KB

README.md

File metadata and controls

130 lines (85 loc) · 4.27 KB

ExtendedRtIrtModeling.jl

Stable Documentation In development documentation Build Status Test workflow status Lint workflow Status Docs workflow Status

Coverage DOI Contributor Covenant All Contributors BestieTemplate

Overview

Four main RtIrt models are provided in this package,

  • GibbsMlIrt
  • GibbsRtIrt
  • GibbsRtIrtQuantile

These three models default to account for covariate variables (e.g., latent regression, and latent structure). If you need only a measurement model, you can use the null model.

  • GibbsRtIrtNull

Installation

You can download ExtendedRtIrtModeling directly from julia.

using Pkg
Pkg.add("ExtendedRtIrtModeling")

or

] add ExtendedRtIrtModeling

You can also access the newest version and download it from GitHub.

using Pkg
Pkg.add(url="https://github.com/jiewenTsai/ExtendedRtIrtModeling.jl")

or

] add "https://github.com/jiewenTsai/ExtendedRtIrtModeling.jl"

Get Started

Here is a simulation study example.

using ExtendedRtIrtModeling

## creat a toy data
Cond = setCond(nSubj=1000, nItem=15)
truePara = setTrueParaMlIrt(Cond)
Data = setDataMlIrt(Cond, truePara)

## build a model and sample it!
MCMC = GibbsMlIrt(Cond, Data=Data, truePara=truePara)
sample!(MCMC)

## check the parameter recovery
getRmse(MCMC.truePara.b, MCMC.Post.mean.b)
getBias(MCMC.truePara.b, MCMC.Post.mean.b)

If you have a data set to analyze, you can follow the following way,

using ExtendedRtIrtModeling
using CSV, DataFrames

## import your data set
yourData = CSV.read("yourData.csv", DataFrame)
Cond = setCond(qRa=0.85, qRt=0.85, nChain=3, nIter=3000)
Data = InputData(
    Y=Matrix(yourData[:,1:15]),
    T=exp.(Matrix(yourData[:,16:30])),
    X=Matrix(yourData[:,31:33])
)

## build a model and sample it!
MCMC = GibbsRtIrtQuantile(Cond, Data=Data)
sample!(MCMC)

coef(MCMC)
precis(MCMC)

MCMC.Post.mean.Σp
MCMC.Post.mean.β

How to Cite

If you use ExtendedRtIrtModeling.jl in your work, please cite using the reference given in CITATION.cff.

Contributing

If you want to make contributions of any kind, please first that a look into our contributing guide directly on GitHub or the contributing page on the website.


Contributors