this is a minor headscratcher:
julia> using GLM, CovarianceMatrices
julia> yb= [1.0:10.0;]; df= DataFrame( y=yb, x1= yb.^2, x2= yb.^3 );
julia> mylm= glm( @formula(y~x1+x2), df, Normal(), IdentityLink());
julia> vcov( mylm, HC3 )
3×3 Array{Float64,2}:
0.133385 -0.00995492 0.000943407
-0.00995492 0.000961188 -9.92315e-5
0.000943407 -9.92315e-5 1.05389e-5
julia> stderr( mylm, HC3 )
ERROR: MethodError: no method matching (::Base.TTY)(::StatsModels.DataFrameRegressionModel{GeneralizedLinearModel{GlmResp{Array{Float64,1},Normal{Float64},IdentityLink},DensePredChol{Float64,LinearAlgebra.Cholesky{Float64,Array{Float64,2}}}},Array{Float64,2}}, ::Type{HC3})
Closest candidates are:
TTY(::StatsBase.StatisticalModel) at /Users/ivo/.julia/packages/StatsBase/NzjNi/src/deprecates.jl:24
Stacktrace:
[1] top-level scope at none:0
I would have thought stderr
should just pick off the diagonal and squareroot it, and so it would work just the same as vcov. is this undesirable, or should stderr() have another method here, too?
PS: what is the (::Base.TTY) ?