-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
76a5334
commit 30f928b
Showing
21 changed files
with
227 additions
and
218 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
Package: sirt | ||
Type: Package | ||
Title: Supplementary Item Response Theory Models | ||
Version: 3.3-1 | ||
Date: 2019-02-08 14:12:25 | ||
Version: 3.3-6 | ||
Date: 2019-02-27 22:42:09 | ||
Author: Alexander Robitzsch [aut,cre] (<https://orcid.org/0000-0002-8226-3132>) | ||
Maintainer: Alexander Robitzsch <[email protected]> | ||
Description: | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,32 @@ | ||
## File Name: invgamma2.R | ||
## File Version: 0.18 | ||
## File Version: 0.19 | ||
|
||
|
||
################################################################### | ||
# inverse gamma distribution for variance | ||
rinvgamma2 <- function( n, n0, var0 ){ | ||
# INPUT: | ||
# N ... number of random draws | ||
# n0 ... sample size prior | ||
# var0 ... prior variance | ||
# res <- 1/ stats::rgamma( N, n0 / 2, n0 * var0 / 2 ) | ||
|
||
#---- inverse gamma distribution for variance | ||
rinvgamma2 <- function( n, n0, var0 ) | ||
{ | ||
res <- sirt_rinvgamma( n, shape=n0 / 2, scale=n0 * var0 / 2 ) | ||
return(res) | ||
} | ||
##################################################################### | ||
dinvgamma2 <- function( x, n0, var0 ){ | ||
res <- sirt_dinvgamma( x, shape=n0 / 2, scale=n0 * var0 / 2 ) | ||
return(res) | ||
} | ||
|
||
#----------------------------------------------------------------------- | ||
# copied from MCMCpack package | ||
#--- copied from MCMCpack package | ||
sirt_dinvgamma <- function (x, shape, scale=1) | ||
{ | ||
if (shape <=0 | scale <=0) { | ||
stop("Shape or scale parameter negative in dinvgamma().\n") | ||
} | ||
alpha <- shape | ||
beta <- scale | ||
log.density <- alpha * log(beta) - lgamma(alpha) - (alpha + | ||
1) * log(x) - (beta/x) | ||
log.density <- alpha * log(beta) - lgamma(alpha) - (alpha + 1) * log(x) - (beta/x) | ||
return(exp(log.density)) | ||
} | ||
|
||
sirt_rinvgamma <- function (n, shape, scale=1) | ||
{ | ||
return(1/rgamma(n=n, shape=shape, rate=scale)) | ||
return(1/stats::rgamma(n=n, shape=shape, rate=scale)) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
## File Name: mad_normalized.R | ||
## File Version: 0.03 | ||
|
||
mad_normalized <- function(x) | ||
{ | ||
x <- stats::na.omit(x) | ||
res <- stats::median( abs( x - stats::median(x) ) ) | ||
res <- res/0.6745 | ||
return(res) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
## File Name: sirt_trim_increment.R | ||
## File Version: 0.02 | ||
|
||
sirt_trim_increment <- function(increment, max_increment) | ||
{ | ||
eps <- 1E-10 | ||
ci <- ceiling( abs(increment) / ( max_increment + eps ) ) | ||
change <- ifelse( abs(increment) > max_increment, increment/(2*ci), increment ) | ||
return(change) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.