Nominal predictor to be used in regression

Well that’s precisely a case we want to handle though. Shouldn’t it draw from the prior or do something sensible for that test = [2]?