gen.mixture(levels,vars)
levels=2
, the identity matrix is produced, so that each variable is either 0 or 1. For
levels=3
, rows are added to the identity containing two variables at 1/2 and the others at 0. etc.In general, a mixture model of degree d will have the same number of terms as the candidate
list generated by gen.mixture
for levels=d+1
, and this will be optimal.