loglin.model function

define a log-linear model