Skip to content

Commit

Permalink
[docs] update
Browse files Browse the repository at this point in the history
  • Loading branch information
giadasp committed Mar 25, 2021
1 parent 49a0a35 commit bd98daf
Show file tree
Hide file tree
Showing 8 changed files with 48 additions and 40 deletions.
3 changes: 1 addition & 2 deletions docs/src/methods/exported/assessment.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@

```@autodocs
Modules = [Psychometrics]
Pages = ["examinee/assessment/assessment.jl",
]
Pages = ["examinee/assessment/assessment.jl"]
```
5 changes: 0 additions & 5 deletions docs/src/methods/exported/likelihood.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@
```

```@docs
log_likelihood(
response_val::Float64,
latent_val::Float64,
parameters::AbstractParametersBinary,
)
log_likelihood(
response::AbstractResponse,
examinee::AbstractExaminee,
Expand Down
2 changes: 1 addition & 1 deletion docs/src/methods/exported/online.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
```

22 changes: 19 additions & 3 deletions docs/src/methods/internals/likelihood.md
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions src/examinee/examinees.jl
Original file line number Diff line number Diff line change
@@ -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`.
"""
Expand All @@ -13,7 +13,7 @@ end
"""
get_latents_vals(examinees::Vector{<:AbstractExaminee})
#Description
#Description
Returns a matrix with latent values displayed by row.
"""
Expand Down
24 changes: 11 additions & 13 deletions src/information/information.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -99,12 +99,10 @@ end
# Item expected information #
##########################################
"""
```julia
item_expected_information(
item::AbstractItem,
examinee::AbstractExaminee,
)
```
item_expected_information(
item::AbstractItem,
examinee::AbstractExaminee,
)
# Description
Expand Down Expand Up @@ -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},
Expand Down Expand Up @@ -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},
Expand Down
24 changes: 12 additions & 12 deletions src/online/design/D_gain.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions src/probability.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit bd98daf

Please sign in to comment.