# Tagged Questions

"Generalized least squares (GLS) is a technique for estimating the unknown parameters in a linear regression model. The GLS is applied when the variances of the observations are unequal (heteroscedasticity), or when there is a certain degree of correlation between the observations." [Wikipedia]

134 views

### Weighted least square weights definition: R lm function vs. $\mathbf W \mathbf A\mathbf x=\mathbf W \mathbf b$

Could anyone tell me why I am getting different results from R weighted least squares and manual solution by matrix operation? Specifically, I am trying to ...
15 views

### What kind of model should I use: dependent variable is proportion and test variables are dummy variables?

My dependent variable is percentage (0%~100%). My tests variables are two dummy variables. It seems that I cannot use regression directly. I read several materials, but they have different suggestions....
19 views

### Generalized Instrumental Variable Estimator (GIVE)

In some literature it is possible to find the Generalized Instrumental Variable Estimator (GIVE), but this is not always well-specified. Is this estimator equivalent to an estimator found using the ...
12 views

### when variances are unequal between groups. (Welch ANOVA in r)

I want to know why the results are different between oneway.test() and gls() I assume the variance are different across ...
38 views

### Model selection in PGLS?

I am using Phylogenetic General Least Squares in the R package 'caper'. I have 4 predictor variables and I would like to know which are correlated with my response variable, while taking the ...
37 views

### Is AIC a valid criterion for the selection of variance structures in GLS?

In generalized least squares, I’ve specified a weights function that accounts for heterogeneity in residual variance that exist along the range of a covariate. The validation graphs (residuals ...
131 views

### Proving that the estimators of coefficients and variance in GLS model are independent

I have come across this question in a textbook: I have a linear model $Y=Xb+u$ with for instance autocorrelation, in order to introduce GLS $Y^*=X^*b+u^*$ (with $Z^* = \Omega^{-1/2}Z$). Then an ...
15 views

### Degrees of freedom of a multiple comparission using estimability and lsmeans

I have a doubt about the degrees of freedom of a multiple comparission test. My data have the following structure: One data for each day, for 14 days, in each year season (auttum, winter, spring and ...
84 views

### Example of OLS vs GLS with AR1 residuals for teaching in R

I'm looking for an example to show my class. We are covering OLS vs GLS with autocorrelated errors -- I've got the class to the point where they understand (some of them) why the the standard errors ...
33 views

### Estimating the residual variance by using a varFunc in nlme

I'm using a linear model to predict a dependent variable (the score to a test) starting by the age of a person. As shown in the figure below, the variability decreases when the age increases (data are ...
57 views

### Fitting heteroscedastic models using gls function

Consider the following heteroscedastic model: $$y_i = f(x_i, \beta) + g(x_i, \theta)\varepsilon_i, i = 1, \ldots, n, \tag{1}$$ where $f(\cdot, \beta)$ is the regression function and $g(\cdot, \theta)$ ...
74 views

### What to do if time series data remains autocorrelated?

Data: I have 92 years of monthly climate data. One of my variables is a drought index (SPEI) ranging from -2 (dry) to 2 (wet). All the data can be found here. Data Structure: ...
53 views

### Econometric. OLS vs GLS

I would like to know exactly what is the difference between OLS and GLS and how GMM enter in it. Thanks.
64 views

### Equivalence of the OLS and GLS estimates

I am looking at a handful of problems where I am trying to fit a linear model using generalized least squares (GLS) where the covariance matrix of the error term is relatively "nice". I was wondering ...
169 views

### Why I got different variance-covariance matrices for different subjects from getVarCov function from R nlme package?

I fit a linear model using generalized least squares with gls {nlme} function in R. Then I use a ...
14 views

### GLS estimator of a VAR process

I'm studiying how to derive the GLS estimator of a VAR process. I have studied the basics well, but I don't get the last passage here: Why the product can be rewritten as a quadratic form? Intuitively ...
278 views

### Comparing OLS versus WLS residual standard error, is the smaller the better?

For a linear regression model I tried on a dataset, when I fitted OLS, the output is as follows: ...
78 views

### GLS Prais-Winsten correction with endogeneity

I have to estimate a number of regressions where a lot of autcorrelation is present. Now, for historical reasons, this autocorrelation is resolved using an iterative Prais-Winsten estimation (a ...
182 views

### How to estimate a nonlinear equation system in R?

I have trouble finding the right packages and methods to estimate a system of three nonlinear equations with cross-equation restrictions using R. I want to estimate the parameters of a CES production ...
50 views

### Difference-in-Differences Approach to Measure Treatment Effect on Relation between Two Variables

I'm familiar with standard Diff-in-Diff models, such as $$Y_{it} = b_0 + b_1 \text{post}_t + b_2 \text{treat}_i + b_3(\text{post}_t\times \text{treat}_i) + u_{it}$$ where $\text{post}_t$ is a dummy ...
24 views

### Autocorrelation consequences

If our model has autocorrelation, and we continue to use OLS, will the confidence interval be greater or lesser, as compared to the case when we use GLS in this model?
110 views

### Residual Sum of Squares from Generalized Least Squares (GLS) always 0?

Standard set-up: $$Y=X\beta+e$$ where $e\sim N(0,\Sigma)$ We know that the GLS estimate of $\beta$ is $\hat{\beta}=(X'\Sigma^{-1}X)^{-1}X'\Sigma^{-1}Y$ The (generalized) residual sum of square is ...
25 views

41 views

### strange coeficient estimates in GLS with ranked variables

Somebody could explain me why the estimated coefficients of a multiple regression through GLS seem not to pass through the majority of observations? Here is a example: ...
This question regards the problem of Generalized Least Squares. Vectors and matrices will be denoted in bold. Premises. Let $N,K$ be given integers, with $K \gg N > 1$. The transpose of matrix \$\...