I want to include observation weights in the party package mob() function but get the following error message:
m2 <- mob(ab_any ~ rdt_result | pfpr + peak2offpeak + urb_rur + region + fac6type + fac4owner + staff_doctor + supervision_lastvisit + rdt_totalguidelines + imci_guidelines + prov3qualif + mgt_meetings + userfees_routine + timer2observed + rdt2observed + amany2observed + abany2observed + provider_sex + provider_qualifyears + provider_incharge + provider_workhours + training_anyrdt + training_imci + provider_recentsupervision + provider_supervisiondiscuss + childage + childsex + parentage + nearestfacility + parenteduc + consultlength + starthour + waittime + cough + diarrhea + dangersign + real_temp + illnessduration, weights = P4Data$weight1, data = P4Data, model = glinearModel, family = binomial()) Error in if (any(y < 0 | y > 1)) stop("y values must be 0 <= y <= 1") : missing value where TRUE/FALSE needed
Sample weights in the dataset (P4Data$weights1) are non-negative values ranging from 0.29865 to 5.084378, which I then multiplied to create integer valued weights (29865 to 5084378). Note that I do not get any error message if this same function is run but without weights.
Thanks for any guidance.