Doesn't include the argument given. That explains the error from a syntax perspective. Details provides the reason
Quasilikelihood-based inferences are not allowed for the mediator model because the functional form must be exactly specified for the estimation algorithm to work. The ’binomial’ family can only be used for binary response mediators and cannot be used for multiple-trial responses. This is due to conflicts between how the latter type of models are implemented in glm and how ’mediate’ is currently written.
The prior weights in the mediator and outcome models are taken as sampling weights and the estimated effects will be weighted averages when non-NULL weights are used in fitting ’model.m’ and ’model.y’. This will be useful when data does not come from a simple random sample, for example.
Thanks for the explanation. I used weights()function to get the weights from survey design, then use this weights argument in mediate(). I am wondering if this process is right.
I don't want to give you false comfort by offering an opinion because this isn't something that I've done. I'd suggest reading the vignette and working some of the examples to understand how the weights argument is to be used.