Skip to content

Commit

Permalink
YAS
Browse files Browse the repository at this point in the history
  • Loading branch information
palday committed Mar 22, 2024
1 parent de6eb96 commit 3152d4a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/utilities.jl
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ function confint_table(x::MixedModel, level=0.95; show_intercept=true)
se = stderror(x)
est = coef(x)

df = DataFrame(;
df = DataFrame(;
coefname=coefnames(x),
estimate=coef(x),
# signs are 'swapped' b/c semultiple comes from the lower tail
Expand All @@ -49,10 +49,10 @@ function confint_table(x::MixedModelBootstrap, level=0.95; show_intercept=true)
df = transform!(select!(DataFrame(x.β), Not(:iter)),
:coefname => ByRow(string) => :coefname)
ci(x) = shortestcovint(x, level)
df = combine(groupby(df, :coefname),
=> mean => :estimate,
=> NamedTuple{(:lower, :upper)} ci => [:lower, :upper])
return filter!(:coefname => in(_coefnames(x; show_intercept)), df)
df = combine(groupby(df, :coefname),
=> mean => :estimate,
=> NamedTuple{(:lower, :upper)} ci => [:lower, :upper])
return filter!(:coefname => in(_coefnames(x; show_intercept)), df)
end

_npreds(x; show_intercept=true) = length(_coefnames(x; show_intercept))
Expand Down

0 comments on commit 3152d4a

Please sign in to comment.