# Questions tagged [generalized-least-squares]

"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]

311 questions
Filter by
Sorted by
Tagged with
1 vote
42 views

### Why does accounting for autocorrelated residuals barely help parameter estimation in distributed lag models

This problem has been plaguing me for a long time. Basically, I have a distributed lag model $$y_t=\sum_{i=0}^{p} \beta_i x_{t-i} + u_t.$$ The regression problem is a bit misspecified, so I end up ...
21 views

### Which is the correct regression model for predicting the association of climate with Julian days nested within decades?

Below is a reproducible example: ...
• 23
29 views

### How to derive GEE from GLM?

I am now reading the lecture note from: https://dept.stat.lsa.umich.edu/~kshedden/Courses/Regression_Notes/gee.pdf Why do we have $V_{i}^{-1}(y_{i}-\mu_{i})$? I cannot link the last equation on page ...
• 250
1 vote
64 views

### GLS combined with Random Effect

My data consists of repeated measurements (duration) per individual (ID). The fixed effect is habitat, the goal is to see if duration depends on habitat. However, the variance seems to differ quite a ...
1 vote
18 views

### How to estimate a feasible Generalized Error-in-Variable Model (combine deming regression/TLS and f-generalized least squares)

I have observational data with spatial structure. A hypothetical dataset could be brain mass for 100 species of birds and body mass for those same species. The data has spatial structure because ...
1 vote
15 views

### Is it possible to control for autocorrelation within individuals and families using GLS corCAR1?

I have a sample of twins with repeated measures of BMI. I want to determine whether intake of a nutrient is associated with BMI trajectories. I have been using GLS in the ...
• 11
79 views

### Why does systemfit yield identical results for OLS and WLS?

I am estimating a system of seemingly unrelated regressions (SUR) using the systemfit package in R. Each of the equations has one unique regressor and one common ...
• 68.6k
50 views

### Mixed models: equivalence between residual covariance structure and random effects?

Is there a way to specify the covariance structure of a within-subject repeated measures model (MMRM with no random effects) such that the model is mathematically equivalent to a mixed model with ...
• 225
1 vote
17 views

### Joint Distribution Formulation of a Spatial X, Spatial Y, and Spatial Error Model

Introductory Problem: I have $n$ points in 3-D space, where I know their X and Y coordinates (not Z), and therefore the distances between points in those 2 dimensions. Each of the three dimensions has ...
48 views

### Correlation structure in model residuals

I ran some analysis, and I would feel much more confident with the feedback of the community. I do not provide a MWE (but I would be glad to do so if you feel the need) as I consider this query more ...
34 views

### Calculating the fitted values from a gls() object in R

I have created a gls() object to create a linear model with AR(1) errors. By all indications this model is a good fit for the data and the resulting model appears ...
1 vote
42 views

### Closed Form Solution for MLE parameter defining Linear Combination of two multivariate normal distributions

I have one set of $n$ observations which can be described as a single vector sampled from a multivariate normal distribution of the following form: $$(1-\lambda)\mathbb{I}_n + \lambda \Sigma_{n}$$ ...
1 vote
25 views

### Interpreting GLS in the context of modeling a multivariate distribution

I have some paired observations $(x,y)$ which form some type of distribution. In an attempt to simplify things, I'm trying to fit a distribution of $Y=\beta_0 + \beta_1*X + Error$ (linear regression) ...
1 vote
45 views

### GLS Function - Fitting and Interpretation Issues

I am well aware, that this is a FAQ, but other questions could not provide me answers to my question. Also, I hope this will not be considered a double post, since I have posted this issue with a ...
• 83
51 views

### Normal or Linear relationship?

I'm generating simulated data from a multivariate normal distribution with a variance-covariance matrix and then fitting it by either A) finding the maximum likelihood parameter estimates for the ...
20 views

1 vote
33 views

### Does GEE (Generalized Estimating Equations) need normality of residuals for inference in case of "approx. Gaussian" response?

A quick question. My intention is to analyze some numerical data across several categories (treat this as ANOVA, if you wish, but I'm going to focus on simple effects) that are "just numeric"...
91 views

### Specifying covariance structure for unbalanced data in gls() and lme()

I'm wondering if we could use gls for unbalanced longitudinal data (in the sense that every group has different number of measurements and the measurement ...
383 views

### R: nlme: can we use varIdent or varFixed to model known variances?

Can anyone familiar with nlme kindly explain how does the varIdent, with option fixed actually work? Documentation says: fixed.....
30 views

### Recover Variances From GLS Model (Phylogenetic Least Squares on Evolutionary Tree)

I don't know how to calculate the variance of a variable when all of its observations have an arbitrary correlation structure. I am simulating the evolution of animals as they branch apart into ...
73 views

### GLS when error covariance matrix depends on regression coefficient

My data is a pair of points (x1, y1) & (x2, y2) [Just in case it's relevant, I explain how the data is created at the end]. I know how the data points are correlated. For a GLS (generalized ...
51 views

### Variance at a datapoint?

I have been reading Boyd and Vandenberghe's book on optimisation, and wanted to understand more about weighted least squares in regression which they touch on a bit. This is used when the "...
• 123
44 views

• 1,140
1 vote
314 views

### Error: "corSymm" objects must be a sequence of consecutive integers when running this code

The Applied Longitudinal Analysis, 2nd Edition book as an R code to replicate table in section 5.7. The data for the TLC trial (tlc.dta) can be downloaded here:https://content.sph.harvard.edu/fitzmaur/...
• 137
I want to compare OLS with WLS. Therefore I came up with a polynomial. I evaluated the polynomial at 2000 datapoints and added GWN with a certain, varying, variance $\sigma_i$. Hence, I have the model ...
I've been reading into how to minimize objective functions and I am curious about the following, I have a model $y=X \beta +\epsilon$ where $E[\epsilon|X]=0$ and $Var[\epsilon|X]=\Sigma$ where $\Sigma$...