Skip to content

Commit

Permalink
Update mglmxls.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
mwsohn committed Oct 6, 2024
1 parent a7ef8c3 commit 34dd400
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/mglmxls.jl
Original file line number Diff line number Diff line change
Expand Up @@ -208,17 +208,20 @@ function mglmxls(glmout,

vn = covars[i]

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

# use labels if exist
if labels != nothing && haskey(labels, Symbol(vn))
varname[i] = labels[Symbol(vn)]
elseif nlev[i] == 2 && occursin(": 1",vn)
varname[i] = chop(vn, tail=3)
else
varname[i] = vn
end

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

# write table
Expand Down

0 comments on commit 34dd400

Please sign in to comment.