buildmodel function

Build model for multiple systems estimation