add weights argument to long-format models