# Use coefficient of variation as weight in GAM

Is it possible or reasonable to use the coefficient of variation in a GAM / GLM as a weight to incorporate uncertainty into a response variable?

I've got density estimates that have a CV value and need to model while taking into account the observation error.

In R's glm() and mgcv::gam() there is a weights argument. ?glm says
Non-NULL weights can be used to indicate that different observations have different dispersions (with the values in weights being inversely proportional to the dispersions); or equivalently, when the elements of weights are positive integers w_i, that each response y_i is the mean of w_i unit-weight observations.
From that description, I think you would need to use weights = 1/CV to get the desired effect.