set.seed(1)
## Using 'Mult' with 'Exp' to constrain the first constituent multiplier
## to be non-negative
## Fit the "UNIDIFF" mobility model across education levels
unidiff <- gnm(Freq ~ educ*orig + educ*dest +
Mult(Exp(educ), orig:dest),
family = poisson, data = yaish, subset = (dest != 7))
Run the code above in your browser using DataLab