Regression with weights I have a question regarding weighing observations by importance. 

Suppose I am running the following regression:$$log(y_{it}/y_{it-1})=\alpha+\sum_{i=1}^{N}\gamma_{i}Country_{i}+u_{i}$$ where basically my LHS is GDP growth of country $i$ at time $t$ that I regress on a full set of country dummies (-1).
I want to weigh the observations by the GDP of the country. 
If I am doing this on stata, what weights are appropriate? Frequency weights or probability weights? My intuition is that I have to basically run a weighted least squares regression of the form: $$ \hat{\beta}=(x'Wx)^{-1}(x'Wy)$$

where $W$ is a diagonal matrix with the weights (GDP) on the diagonal. I am at a loss regarding how to implement this on Stata. Thanks!
If you check Stata's help file on regress you should understand how to do it. Particularly pp. 16-7 have specific examples of how to apply weights.

I will edit in order to be more detailed.

gen lnyl1y=ln(y)-l1.ln(y)
xi: reg lnyl1y i.country [w=y]


Notice that if the weighted regression is done by dividing all values for observation $i$ by $\sqrt{w_i}$, then 
$$\tilde{x} = 
\begin{pmatrix} 
\frac{x_{1,1}}{\sqrt{w_1}} &amp; \cdots &amp; \frac{x_{1,k}}{\sqrt{w_1}}\\
\vdots &amp;\ddots &amp;\vdots\\
\frac{x_{n,1}}{\sqrt{w_n}} &amp; \cdots &amp; \frac{x_{n,k}}{\sqrt{w_n}} 
\end{pmatrix} 
$$
Call the diagonal matrix composed of $\sqrt{w_i}$ in the $(i,i)$ element $\sqrt{w}$. Then, the WLS estimator is given by
$$
\hat{\beta}_{WLS}=\left(\tilde{x}'\tilde{x}\right)^{-1}\tilde{x}'\tilde{y}=
\left[(\sqrt{w}x)'\sqrt{w}x\right]^{-1}(\sqrt{w}x)'(\sqrt{w}y)=(x'Wx)^{-1}(xWy)
$$
as $\sqrt{w}'\sqrt{w}=W$ and $\tilde{x}=\sqrt{w}x$ which is exactly the same as multiplying each row of $X$ and $y$ by the sqrt of your weight (analytical weight, here $\sqrt{w}$).

The thing here is to understand how your matrix relates to applying the weights and understanding the connection between your formula and the one which is in the help file. For other ways to calculate weighted regressions in relation with Stata, see e.g. this document