Skip to content

Taking weighting seriously #653

Taking weighting seriously

Taking weighting seriously #653

Triggered via pull request November 19, 2024 20:02
Status Failure
Total duration 4m 54s
Artifacts

Documenter.yml

on: pull_request
Fit to window
Zoom out
Zoom in

Annotations

6 errors and 1 notice
Documentation: docs/src/api.md#L24
doctest failure in src/api.md:24-37 ```jldoctest julia> using GLM, StableRNGs julia> fit(LinearModel, hcat(ones(10), 1:10), randn(MersenneTwister(12321), 10)) LinearModel Coefficients: ──────────────────────────────────────────────────────────────── Coef. Std. Error t Pr(>|t|) Lower 95% Upper 95% ──────────────────────────────────────────────────────────────── x1 0.361896 0.69896 0.52 0.6186 -1.24991 1.9737 x2 -0.012125 0.112648 -0.11 0.9169 -0.271891 0.247641 ──────────────────────────────────────────────────────────────── ``` Subexpression: fit(LinearModel, hcat(ones(10), 1:10), randn(MersenneTwister(12321), 10)) Evaluated output: ERROR: UndefVarError: `MersenneTwister` not defined in `Main` Suggestion: check for spelling errors or missing imports. Hint: a global variable of this name may be made accessible by importing Random in the current active module Main Stacktrace: [1] top-level scope @ none:1 Expected output: LinearModel Coefficients: ──────────────────────────────────────────────────────────────── Coef. Std. Error t Pr(>|t|) Lower 95% Upper 95% ──────────────────────────────────────────────────────────────── x1 0.361896 0.69896 0.52 0.6186 -1.24991 1.9737 x2 -0.012125 0.112648 -0.11 0.9169 -0.271891 0.247641 ──────────────────────────────────────────────────────────────── diff = Warning: Diff output requires color. LinearModel Coefficients: ──────────────────────────────────────────────────────────────── Coef. Std. Error t Pr(>|t|) Lower 95% Upper 95% ──────────────────────────────────────────────────────────────── x1 0.361896 0.69896 0.52 0.6186 -1.24991 1.9737 x2 -0.012125 0.112648 -0.11 0.9169 -0.271891 0.247641 ────────────────────────────────────────────────────────────────ERROR: UndefVarError: `MersenneTwister` not defined in `Main` Suggestion: check for spelling errors or missing imports. Hint: a global variable of this name may be made accessible by importing Random in the current active module Main Stacktrace: [1] top-level scope @ none:1
Documentation: docs/src/api.md#L40
doctest failure in src/api.md:40-53 ```jldoctest julia> using GLM, StableRNGs julia> lm(hcat(ones(10), 1:10), randn(MersenneTwister(12321), 10)) LinearModel Coefficients: ──────────────────────────────────────────────────────────────── Coef. Std. Error t Pr(>|t|) Lower 95% Upper 95% ──────────────────────────────────────────────────────────────── x1 0.361896 0.69896 0.52 0.6186 -1.24991 1.9737 x2 -0.012125 0.112648 -0.11 0.9169 -0.271891 0.247641 ──────────────────────────────────────────────────────────────── ``` Subexpression: lm(hcat(ones(10), 1:10), randn(MersenneTwister(12321), 10)) Evaluated output: ERROR: UndefVarError: `MersenneTwister` not defined in `Main` Suggestion: check for spelling errors or missing imports. Hint: a global variable of this name may be made accessible by importing Random in the current active module Main Stacktrace: [1] top-level scope @ none:1 Expected output: LinearModel Coefficients: ──────────────────────────────────────────────────────────────── Coef. Std. Error t Pr(>|t|) Lower 95% Upper 95% ──────────────────────────────────────────────────────────────── x1 0.361896 0.69896 0.52 0.6186 -1.24991 1.9737 x2 -0.012125 0.112648 -0.11 0.9169 -0.271891 0.247641 ──────────────────────────────────────────────────────────────── diff = Warning: Diff output requires color. LinearModel Coefficients: ──────────────────────────────────────────────────────────────── Coef. Std. Error t Pr(>|t|) Lower 95% Upper 95% ──────────────────────────────────────────────────────────────── x1 0.361896 0.69896 0.52 0.6186 -1.24991 1.9737 x2 -0.012125 0.112648 -0.11 0.9169 -0.271891 0.247641 ────────────────────────────────────────────────────────────────ERROR: UndefVarError: `MersenneTwister` not defined in `Main` Suggestion: check for spelling errors or missing imports. Hint: a global variable of this name may be made accessible by importing Random in the current active module Main Stacktrace: [1] top-level scope @ none:1
Documentation: docs/src/index.md#L149
doctest failure in src/index.md:149-205 ```jldoctest weights julia> using StableRNGs, DataFrames, GLM julia> data = DataFrame(y = rand(StableRNG(1), 100), x = randn(StableRNG(2), 100), weights = repeat([1, 2, 3, 4], 25), ); julia> m = lm(@formula(y ~ x), data) LinearModel y ~ 1 + x Coefficients: ────────────────────────────────────────────────────────────────────────── Coef. Std. Error t Pr(>|t|) Lower 95% Upper 95% ────────────────────────────────────────────────────────────────────────── (Intercept) 0.517369 0.0280232 18.46 <1e-32 0.461758 0.57298 x -0.0500249 0.0307201 -1.63 0.1066 -0.110988 0.0109382 ────────────────────────────────────────────────────────────────────────── julia> m_aweights = lm(@formula(y ~ x), data, wts=aweights(data.weights)) LinearModel y ~ 1 + x Coefficients: ────────────────────────────────────────────────────────────────────────── Coef. Std. Error t Pr(>|t|) Lower 95% Upper 95% ────────────────────────────────────────────────────────────────────────── (Intercept) 0.51673 0.0270707 19.09 <1e-34 0.463009 0.570451 x -0.0478667 0.0308395 -1.55 0.1239 -0.109067 0.0133333 ────────────────────────────────────────────────────────────────────────── julia> m_fweights = lm(@formula(y ~ x), data, wts=fweights(data.weights)) LinearModel y ~ 1 + x Coefficients: ───────────────────────────────────────────────────────────────────────────── Coef. Std. Error t Pr(>|t|) Lower 95% Upper 95% ───────────────────────────────────────────────────────────────────────────── (Intercept) 0.51673 0.0170172 30.37 <1e-84 0.483213 0.550246 x -0.0478667 0.0193863 -2.47 0.0142 -0.0860494 -0.00968394 ───────────────────────────────────────────────────────────────────────────── julia> m_pweights = lm(@formula(y ~ x), data, wts=pweights(data.weights)) LinearModel y ~ 1 + x Coefficients: ─────────────────────────────────────────────────────────────────────────── Coef. Std. Error t Pr(>|t|) Lower 95% Upper 95% ─────────────────────────────────────────────────────────────────────────── (Intercept) 0.51673 0.0288654 17.90 <1e-31 0.459447 0.574012 x -0.0478667 0.0266884 -1.79 0.0760 -0.100829 0.00509556 ─────────────────────────────────────────────────────────────────────────── ``` Subexpression: m_pweights = lm(@formula(y ~ x), data, wts=pweights(data.weights)) Evaluated output: LinearModel y ~ 1 + x Coefficients: ─────────────────────────────────────────────────────────────────────────── Coef. Std. Error t Pr(>|t|) Lower 95% Upper 95% ─────────────────────────────────────────────────────────────────────────── (Intercept) 0.51673 0.0287193 17.99 <1e-32 0.459737 0.573722 x -0.0478667 0.0265532 -1.80 0.0745 -0.100561 0.00482739 ─────────────────────────────────────────────────────────────────────────── Expected output: LinearModel y ~ 1 + x Coefficients: ─────────────────────────────────────────────────────────────────────────── Coef. Std. Error t Pr(>|t|) Lower 95% Upper 95% ─────────────────────────────────────────────────────────────────────────── (Intercept) 0.51673 0.0288654 17.90 <1e-31 0.459447 0.574012 x -0.0478667 0.0266884 -1.79 0.0760 -0.100829 0.00509556 ─────────────────────────────────────────────────────────────────────────── diff = Warning: Diff output requires color. LinearModel y ~ 1 + x Coefficients: ─────────────────────────────────────────────────────────────────────────── Coef. Std. Error t Pr(>|t|) Lower 95% Upper 95% ─────────────────────────────────────────────────────────────────────────── (Intercept) 0.51673 0.0288654 17.90 <1e-31 0.459447 0.574012 0.0287193 17.99 <1e-32 0.459737 0.573722 x -0.0478667 0.0266884 -1.79
Documentation: docs/src/index.md#L219
doctest failure in src/index.md:219-228 ```jldoctest weights julia> loglikelihood(m_aweights) -16.296307561384253 julia> loglikelihood(m_fweights) -25.51860961756451 julia> loglikelihood(m_pweights) -16.296307561384253 ``` Subexpression: loglikelihood(m_pweights) Evaluated output: ERROR: ArgumentError: The `loglikelihood` for probability weighted models is not currently supported. Stacktrace: [1] loglikelihood(r::GLM.LmResp{Vector{Float64}, ProbabilityWeights{Int64, Int64, Vector{Int64}}}) @ GLM ~/work/GLM.jl/GLM.jl/src/lm.jl:84 [2] loglikelihood(obj::LinearModel{GLM.LmResp{Vector{Float64}, ProbabilityWeights{Int64, Int64, Vector{Int64}}}, GLM.DensePredChol{Float64, LinearAlgebra.CholeskyPivoted{Float64, Matrix{Float64}, Vector{Int64}}, ProbabilityWeights{Int64, Int64, Vector{Int64}}}}) @ GLM ~/work/GLM.jl/GLM.jl/src/lm.jl:266 [3] top-level scope @ none:1 Expected output: -16.296307561384253 diff = Warning: Diff output requires color. -16.296307561384253ERROR: ArgumentError: The `loglikelihood` for probability weighted models is not currently supported. Stacktrace: [1] loglikelihood(r::GLM.LmResp{Vector{Float64}, ProbabilityWeights{Int64, Int64, Vector{Int64}}}) @ GLM ~/work/GLM.jl/GLM.jl/src/lm.jl:84 [2] loglikelihood(obj::LinearModel{GLM.LmResp{Vector{Float64}, ProbabilityWeights{Int64, Int64, Vector{Int64}}}, GLM.DensePredChol{Float64, LinearAlgebra.CholeskyPivoted{Float64, Matrix{Float64}, Vector{Int64}}, ProbabilityWeights{Int64, Int64, Vector{Int64}}}}) @ GLM ~/work/GLM.jl/GLM.jl/src/lm.jl:266 [3] top-level scope @ none:1
Documentation: docs/src/index.md#L321
doctest failure in src/index.md:321-327 ```jldoctest methods julia> round.(cooksdistance(mdl); digits=8) 3-element Vector{Float64}: 2.5 0.25 2.5 ``` Subexpression: round.(cooksdistance(mdl); digits=8) Evaluated output: 3×1 Matrix{Float64}: 2.5 0.25 2.5 Expected output: 3-element Vector{Float64}: 2.5 0.25 2.5 diff = Warning: Diff output requires color. 3-element Vector{Float64}: 3×1 Matrix{Float64}: 2.5 0.25 2.5
Documentation
Process completed with exit code 1.
[julia-buildpkg] Caching of the julia depot was not detected
Consider using `julia-actions/cache` to speed up runs https://github.com/julia-actions/cache. To ignore, set input `ignore-no-cache: true`