Skip to content

Commit

Permalink
Update mglmxls.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
mwsohn committed Jul 22, 2024
1 parent 9b2d2fe commit 3f3a739
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/mglmxls.jl
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,6 @@ function mglmxls(glmout,
tdata = Vector(undef,num_models)
tconfint = Vector(undef,num_models)
loc = Dict()
nrows = length(covariates)
varname = Vector{String}(undef, nrows)

for i=1:num_models
if isa(glmout[i].model, CoxModel)
Expand Down Expand Up @@ -180,7 +178,8 @@ function mglmxls(glmout,

# go through each variable and construct variable name and value label arrays
# vals = Vector{String}(undef,nrows)
nlev = zeros(Int,nrows)
nrows = length(covariates)
nlev = zeros(Int, nrows)
npred = [dof(m) for m in glmout]

for i = 1:length(covariates)
Expand All @@ -194,7 +193,7 @@ function mglmxls(glmout,

# count the number of levels in a categorical variable
if haskey(vvalues, vn)
nlev[i] = length(vvalues[vn])
nlev[i] = length(vvalues[vn])
end
end

Expand Down

0 comments on commit 3f3a739

Please sign in to comment.