Interpretation of weights in a GLM I want to know whether my interpretation of GLM weights is correct.
On R documentation of GLM it says that

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 , that each response  is the mean of  unit-weight observations.

I would like to know if I could therefore say that using weights changes the log-likelihood function which is minimized in the following way \begin{align*}
\sum_{i} \log f(X_i) \to \sum_{i} w_i \log f(X_i)
\end{align*}
If yes does this only hold if the weights are positive integers?
EDIT:
If not how can I modify the log likelihood such that this holds?
\begin{align*}
\sum_{i} \log f(X_i) \to \sum_{i} w_i \log f(X_i)
\end{align*}
 A: As described in detail here, you can think of the weights as of pseudo-counts of observations (hence they need to be positive). If your likelihood function is
$$
\mathcal{L}(\theta|x_1,x_2,\dots,x_N) = f_\theta(x_1) f_\theta(x_2) \dots f_\theta(x_N) 
$$
then if you had your data recorded as tuples $(x_i, n_i)$ where $x_i$ is the value and $n_i$ is the number of times this value was observed, then the likelihood becomes
$$\begin{align}
\mathcal{L}(\theta|x_1,x_2,\dots,x_n) &= \underbrace{f_\theta(x_1) \dots f_\theta(x_1)}_{n_1\,\text{times}} \underbrace{f_\theta(x_2) \dots f_\theta(x_2)}_{n_2\,\text{times}} \dots \underbrace{f_\theta(x_n) \dots f_\theta(x_n)}_{n_N\,\text{times}} \\
&= f_\theta(x_1)^{n_1} f_\theta(x_2)^{n_2} \dots f_\theta(x_N)^{n_N}
\end{align}$$
with log-likelihood, by the properties of logarithms, this is just
$$
\log \mathcal{L}(\theta|x_1,x_2,\dots,x_N) = n_1 \log f_\theta(x_1) + n_2 \log f_\theta(x_2) + \dots + n_N \log f_\theta(x_N)
$$
It is the same if the weights are not counts, but are non-negative and proportional to the counts.
