Skip to content

Commit

Permalink
..
Browse files Browse the repository at this point in the history
  • Loading branch information
cdriveraus committed May 28, 2024
1 parent 0afc575 commit 214abf3
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 44 deletions.
10 changes: 5 additions & 5 deletions readme.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ remotes::install_github('cdriveraus/bigIRT', INSTALL_opts = "--no-multiarch", de

This example generates data from a 3 parameter logistic model, fits the model using mirt and bigIRT, and compares the parameter estimates.

```{r, results=FALSE,plot=FALSE}
```{r, results=FALSE,plot=FALSE, message=FALSE, warning=FALSE}
library(bigIRT)
library(data.table)
library(mirt)
library(ggplot2)
#generate data
dat <- simIRT(Nsubs = 1000,Nitems = 50,Nscales = 1,
dat <- simIRT(Nsubs = 400,Nitems = 50,Nscales = 1,
logitCMean = -2,logitCSD = 1,AMean = 1,ASD = .3,
BMean=0,BSD = .5,
AbilityMean = 0,AbilitySD = 1)
Expand All @@ -41,12 +41,12 @@ dat <- simIRT(Nsubs = 1000,Nitems = 50,Nscales = 1,
trueitempars <- normaliseIRT(B = dat$B, A = dat$A, Ability = dat$Ability)
#fit using bigIRT
bigirtfit <- fitIRT(dat$dat, pl=3, cores=4, dropPerfectScores = FALSE, stochastic=TRUE,
bigirtfit <- fitIRT(dat$dat, pl=3, cores=2, dropPerfectScores = FALSE, stochastic=TRUE,
score = 'score', id = 'id', scale = 'Scale', item = 'Item')
#view item and person parameter estimates
print(bigirtfit$itemPars)
print(bigirtfit$personPars)
#print(bigirtfit$itemPars)
#print(bigirtfit$personPars)
#get normalized parameter estimates (normalised on ability)
bigirtpars <- normaliseIRT(B = bigirtfit$itemPars$B, A = bigirtfit$itemPars$A, Ability = bigirtfit$pars$Ability)
Expand Down
Loading

0 comments on commit 214abf3

Please sign in to comment.