Fiml meanstructure argument#304
Conversation
| throw(ArgumentError( | ||
| "You set `meanstructure = true`, but your model specification contains no mean parameters." | ||
| )) |
There was a problem hiding this comment.
[JuliaFormatter] reported by reviewdog 🐶
| throw(ArgumentError( | |
| "You set `meanstructure = true`, but your model specification contains no mean parameters." | |
| )) | |
| throw( | |
| ArgumentError( | |
| "You set `meanstructure = true`, but your model specification contains no mean parameters.", | |
| ), | |
| ) |
| throw(ArgumentError( | ||
| "If your model specification contains mean parameters, you have to set `Sem(..., meanstructure = true)`." | ||
| )) |
There was a problem hiding this comment.
[JuliaFormatter] reported by reviewdog 🐶
| throw(ArgumentError( | |
| "If your model specification contains mean parameters, you have to set `Sem(..., meanstructure = true)`." | |
| )) | |
| throw( | |
| ArgumentError( | |
| "If your model specification contains mean parameters, you have to set `Sem(..., meanstructure = true)`.", | |
| ), | |
| ) |
| "If your model specification contains mean parameters, you have to set `Sem(..., meanstructure = true)`." | ||
| )) | ||
| end | ||
| end No newline at end of file |
There was a problem hiding this comment.
[JuliaFormatter] reported by reviewdog 🐶
| end | |
| end | |
|
|
||
| function SemFIML(; observed::SemObservedMissing, specification, kwargs...) | ||
| function SemFIML(; observed::SemObservedMissing, implied, specification, kwargs...) | ||
|
|
There was a problem hiding this comment.
[JuliaFormatter] reported by reviewdog 🐶
| throw(ArgumentError( | ||
| "Full information maximum likelihood (FIML) can only be used with a meanstructure. | ||
| Did you forget to set `Sem(..., meanstructure = true)`?")) |
There was a problem hiding this comment.
[JuliaFormatter] reported by reviewdog 🐶
| throw(ArgumentError( | |
| "Full information maximum likelihood (FIML) can only be used with a meanstructure. | |
| Did you forget to set `Sem(..., meanstructure = true)`?")) | |
| throw( | |
| ArgumentError( | |
| "Full information maximum likelihood (FIML) can only be used with a meanstructure. | |
| Did you forget to set `Sem(..., meanstructure = true)`?", | |
| ), | |
| ) |
| observed_var_prefix::Union{Symbol, AbstractString} = :obs, | ||
| kwargs..., | ||
| ) | ||
|
|
There was a problem hiding this comment.
[JuliaFormatter] reported by reviewdog 🐶
| throw(ArgumentError( | ||
| "Your dataset contains missing values. | ||
| Remove missing values or use full information maximum likelihood (FIML) estimation. | ||
| A FIML model can be constructed with | ||
| Sem( | ||
| ..., | ||
| observed = SemObservedMissing, | ||
| loss = SemFIML, | ||
| meanstructure = true | ||
| )")) |
There was a problem hiding this comment.
[JuliaFormatter] reported by reviewdog 🐶
| throw(ArgumentError( | |
| "Your dataset contains missing values. | |
| Remove missing values or use full information maximum likelihood (FIML) estimation. | |
| A FIML model can be constructed with | |
| Sem( | |
| ..., | |
| observed = SemObservedMissing, | |
| loss = SemFIML, | |
| meanstructure = true | |
| )")) | |
| throw( | |
| ArgumentError( | |
| "Your dataset contains missing values. | |
| Remove missing values or use full information maximum likelihood (FIML) estimation. | |
| A FIML model can be constructed with | |
| Sem( | |
| ..., | |
| observed = SemObservedMissing, | |
| loss = SemFIML, | |
| meanstructure = true | |
| )", | |
| ), | |
| ) |
|
|
||
| @testset "Sem(implied=$impliedtype, loss=$losstype)" for impliedtype in (RAM, RAMSymbolic), | ||
| losstype in (SemML, SemWLS) | ||
| @testset "Sem(implied=$impliedtype, loss=SemML)" for impliedtype in (RAM, RAMSymbolic) |
There was a problem hiding this comment.
[JuliaFormatter] reported by reviewdog 🐶
| @testset "Sem(implied=$impliedtype, loss=SemML)" for impliedtype in (RAM, RAMSymbolic) |
| @test @inferred(nsamples(model)) == nsamples(obs) | ||
| end | ||
|
|
||
| @testset "Sem(implied=RAMSymbolic, loss=SemWLS)" begin |
There was a problem hiding this comment.
[JuliaFormatter] reported by reviewdog 🐶
| @testset "Sem(implied=RAMSymbolic, loss=SemWLS)" begin |
| semloss = loss(model).functions[1] | ||
| @test semloss isa SemWLS | ||
|
|
||
| @test @inferred(nsamples(model)) == nsamples(obs) |
There was a problem hiding this comment.
[JuliaFormatter] reported by reviewdog 🐶
| @test @inferred(nsamples(model)) == nsamples(obs) | |
| end | |
No description provided.