Add file fit.R to fit marginal