diff --git a/docs/src/methods/exported/assessment.md b/docs/src/methods/exported/assessment.md index 4f8b0d65..295e9861 100644 --- a/docs/src/methods/exported/assessment.md +++ b/docs/src/methods/exported/assessment.md @@ -2,6 +2,5 @@ ```@autodocs Modules = [Psychometrics] -Pages = ["examinee/assessment/assessment.jl", - ] +Pages = ["examinee/assessment/assessment.jl"] ``` \ No newline at end of file diff --git a/docs/src/methods/exported/likelihood.md b/docs/src/methods/exported/likelihood.md index 939e5cfd..55a260aa 100644 --- a/docs/src/methods/exported/likelihood.md +++ b/docs/src/methods/exported/likelihood.md @@ -5,11 +5,6 @@ ``` ```@docs -log_likelihood( - response_val::Float64, - latent_val::Float64, - parameters::AbstractParametersBinary, -) log_likelihood( response::AbstractResponse, examinee::AbstractExaminee, diff --git a/docs/src/methods/exported/online.md b/docs/src/methods/exported/online.md index 65f1b4b5..039db31d 100644 --- a/docs/src/methods/exported/online.md +++ b/docs/src/methods/exported/online.md @@ -2,6 +2,6 @@ ```@autodocs Modules = [Psychometrics] -Pages = ["online/online.jl"] +Pages = ["online/routing.jl", "online/design/A_gain.jl", "online/design/A_inv_gain.jl", "online/design/A.jl", "online/design/D_gain.jl", "online/design/D_inv_gain.jl", "online/design/D.jl"] ``` diff --git a/docs/src/methods/internals/likelihood.md b/docs/src/methods/internals/likelihood.md index 25bdb81b..0c3bebbc 100644 --- a/docs/src/methods/internals/likelihood.md +++ b/docs/src/methods/internals/likelihood.md @@ -4,14 +4,30 @@ CurrentModule = Psychometrics ``` -## Using Structs - ```@docs -_likelihood( +__likelihood( + response_val::Float64, + latent_val::Float64, + parameters::AbstractParametersBinary; + weight::Float64 = 1.0 +) +__log_likelihood( response_val::Float64, latent_val::Float64, parameters::AbstractParametersBinary, ) +_likelihood( + response_val::Float64, + latent_val::Float64, + item::AbstractItem; + weight::Float64 = 1.0 +) +_likelihood( + response::AbstractResponse, + latent_val::Float64, + item::AbstractItem; + weight::Float64 = 1.0 +) _log_likelihood( response_val::Float64, latent::Latent1D, diff --git a/src/examinee/examinees.jl b/src/examinee/examinees.jl index 8c19828a..7bba3b14 100644 --- a/src/examinee/examinees.jl +++ b/src/examinee/examinees.jl @@ -1,7 +1,7 @@ """ get_latents(examinees::Vector{<:AbstractExaminee}) - #Description +#Description Returns the latent objects of a vector of examinees as a vector of subtypes of `AbstractLatent`. """ @@ -13,7 +13,7 @@ end """ get_latents_vals(examinees::Vector{<:AbstractExaminee}) - #Description +#Description Returns a matrix with latent values displayed by row. """ diff --git a/src/information/information.jl b/src/information/information.jl index cd0c65a6..e170d946 100644 --- a/src/information/information.jl +++ b/src/information/information.jl @@ -49,7 +49,7 @@ A `Float64` vector. Compute the Fisher information for the latent/s of the examinees (second derivatives of the likelihood with respect to ``\\theta``) and each item. -``E_\\theta_n \\[ I(\\theta_n | b_i) \\] `` +\$\$E_\\theta_n \\[ I(\\theta_n | b_i) \\] \$\$ ```julia examinee = Examinee(); #default examinee factory @@ -99,12 +99,10 @@ end # Item expected information # ########################################## """ -```julia -item_expected_information( - item::AbstractItem, - examinee::AbstractExaminee, -) -``` + item_expected_information( + item::AbstractItem, + examinee::AbstractExaminee, + ) # Description @@ -271,12 +269,12 @@ See the docs of [`latent_information(examinee::AbstractExaminee, item::AbstractI # Arguments -- **`latents_matrix::Matrix{Float64}`** : Required. A ``n_latents \\times N`` matrix with latents values. -- **`parameters_matrix::Matrix{Float64}`** : Required. A ``(n_latents + 1) \\times I`` matrix with item parameters. intercept (b) must be in first row, latents coefficients ``(a_j)`` in next rows ``(2, \\ldots, n_latents + 1)``. +- **`latents_matrix::Matrix{Float64}`** : Required. A \$n\_latents \\times N\$ matrix with latents values. +- **`parameters_matrix::Matrix{Float64}`** : Required. A \$(n\_latents + 1) \\times I\$ matrix with item parameters. intercept (b) must be in first row, latents coefficients ``(a_j)`` in next rows ``(2, \\ldots, n_latents + 1)``. # Output -A ``I \\time N`` `Float64` matrix. +A ``I \\times N`` `Float64` matrix. """ function latent_information( latents_matrix::Matrix{Float64}, @@ -306,12 +304,12 @@ It follows the parametrization ``a \\theta - b ``. # Arguments -- **`latents_matrix::Matrix{Float64}`** : Required. A `n_latents x N` matrix with latents values. -- **`parameters_matrix::Matrix{Float64}`** : Required. A `(n_latents + 1) x I` matrix with item parameters. intercept (b) must be in first row, latents coefficients (a_j) in next rows (2, ..., n_latents + 1). +- **`latents_matrix::Matrix{Float64}`** : Required. A \$n\_latents \\times N\$ matrix with latents values. +- **`parameters_matrix::Matrix{Float64}`** : Required. A \$(n\_latents + 1) \\times I\$ matrix with item parameters. intercept (b) must be in first row, latents coefficients (a_j) in next rows (2, ..., n_latents + 1). # Output -A `I x N` `Float64` matrix. +A ``I \\times N`` `Float64` matrix. """ function latent_information_3PL( latents_matrix::Matrix{Float64}, diff --git a/src/online/design/D_gain.jl b/src/online/design/D_gain.jl index 38a39d0d..a295feea 100644 --- a/src/online/design/D_gain.jl +++ b/src/online/design/D_gain.jl @@ -17,18 +17,18 @@ end """ D_gain_method(item::AbstractItem, examinee::AbstractExaminee) - # Description - Computes the gain in the determinant of the expected information matrix for an item. - - # Arguments - - **`item::AbstractItem`**: The item. - - **`examinee::AbstractExaminee`**: The examinee at which computing the information. - - # Output - It returns a `Float64` scalar. - - # References - __Ren H, van der Linden WJ, Diao Q. Continuous online item calibration: Parameter recovery and item calibration. Psychometrika. 2017;82:498–522. doi: 10.1007/s11336-017-9553-1.__ +# Description +Computes the gain in the determinant of the expected information matrix for an item. + +# Arguments +- **`item::AbstractItem`**: The item. +- **`examinee::AbstractExaminee`**: The examinee at which computing the information. + +# Output +It returns a `Float64` scalar. + +# References +__Ren H, van der Linden WJ, Diao Q. Continuous online item calibration: Parameter recovery and item calibration. Psychometrika. 2017;82:498–522. doi: 10.1007/s11336-017-9553-1.__ """ function D_gain_method(item::AbstractItem, examinee::AbstractExaminee) return _D_gain_method(item.parameters, examinee.latent) diff --git a/src/probability.jl b/src/probability.jl index a991e311..70ee098d 100644 --- a/src/probability.jl +++ b/src/probability.jl @@ -427,7 +427,7 @@ It follows the parametrization ``a \\theta - b ``. # Arguments - **`parameters_matrix::Matrix{Float64}`** : Required. A `I x (n_latents + 1)` matrix with item parameters. intercept (b) must be in first column, latents coefficients (a_j) in next columns (2, ..., n_latents + 1). -- **`latent_matrix::Matrix{Float64}`** : Required. A `n_latents x N` or `(n_latents + 1) x N` matrix with latents values. +- **`latent_matrix::Matrix{Float64}`** : Required. A \$n\_latents \\times N\$ or `(n_latents + 1) x N` matrix with latents values. # Output @@ -455,7 +455,7 @@ It follows the parametrization ``a \\theta - b ``. # Arguments - **`parameters_matrix::Matrix{Float64}`** : Required. A `I x (n_latents + 1)` matrix with item parameters. intercept (b) must be in first column, latents coefficients (a_j) in next columns (2, ..., n_latents + 1). -- **`latent_matrix::Matrix{Float64}`** : Required. A `n_latents x N` matrix with latents values. +- **`latent_matrix::Matrix{Float64}`** : Required. A \$n\_latents \\times N\$ matrix with latents values. # Output