Hello! I’m confused. In StatsModels 0.5.0 i can get contrasts levels simply:

```
ModelFrame.contrasts[:name].levels
```

How can I do it now?

And how can i get predictors list?

Hello! I’m confused. In StatsModels 0.5.0 i can get contrasts levels simply:

```
ModelFrame.contrasts[:name].levels
```

How can I do it now?

And how can i get predictors list?

Ok, I just found how to get it by number:

```
ModelFrame.f.rhs.terms[2].contrasts.contrasts
```

How to get contrasts by Symbol (column name)?

Ok, i made some solution to do this:

```
#Find all factors
function findtermnames(MF::ModelFrame)
a = Array{Symbol, 1}(undef, 0)
l = length(MF.f.rhs.terms)
for i = 1:l
if isa(MF.f.rhs.terms[i], InterceptTerm) continue end
push!(a, MF.f.rhs.terms[i].sym)
end
return Tuple(a)
end
#Find by Symbol
function findterm(MF::ModelFrame, symbol::Symbol)::Int
l = length(MF.f.rhs.terms)
for i = 1:l
if isa(MF.f.rhs.terms[i], InterceptTerm) continue end
if MF.f.rhs.terms[i].sym == symbol return i end
end
return 0
end
#Return length by Symbol
function termmodellen(MF::ModelFrame, symbol::Symbol)::Int
id = findterm(MF, symbol)
return length(MF.f.rhs.terms[id].contrasts.termnames)
end
```

Is it right way?

Is it any “build in” function that i could not find to do this?

Ok!

For example, I can get coefficient names by coefnames() , how to get facor or term for each coefficient in list?