The Stack Overflow podcast is back! Listen to an interview with our new CEO.

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]

186 questions
Filter by
Sorted by
Tagged with
23 views

FGLS vs OLS tradeoff

Hi, Can someone tell me what is the tradeoff between using OLS and FGLS? I know the conditions under which FGLS is more efficient than OLS. But what about robustness? It is usually said that the ...
7 views

how to choose variance covariate in GLS?

I learn the gls recently, and confuse about how to choose the variance covariate in variance structure. I use the lm() to fit all the explantory variables(continuous variable), and ncvTest() to find ...
45 views

Relationship between SSE with GLS and OLS

I have been trying to derive if there is any relationship between the sum of squared residuals (SSE) from a model estimated with GLS, and the same model estimated with OLS. Professor Chung-Ming Kuan, ...
21 views

How to read Autocorrelations in GLS models?

I am playing with some marketing data. My response variable is market share and predictors are ...
22 views

Inference on Error Covariance Matrix in SUR/GLS?

Suppose I have panel data $\{y_{it},X_{it}\}_{i=1...N,t=1...T}$ and the following linear (seemingly unrelated regression) model: $y_{it} = \beta_i X_{it} + u_{it}$ where the errors are correlated ...
147 views

Interpreting the output from a gls model [closed]

I am quite new to R and coding so please forgive the lack of in depth information I may provide. I am also new at using linear models, particularly with large data sets. I have used the gls function ...
41 views

How to understand the vertical bar (pipe) in R formulas [closed]

I came upon this because I wanted to emulate Welch's t-test using gls. I found the answer here: https://stats.stackexchange.com/a/144480/141304 and it says to add ...
110 views

Generalized Least Squares using Moore Penrose pseudo inverse

I'm using GLS to fit a model where some independent variables are strongly correlated. Therefore my covariance matrix is singular. I have found that Moore-Penrose pseudo inverse can be used to find an ...
22 views

How to consider repeated measures and correlation between factors in a tree way ANOVA?

I'm new to statistics and I don't understand the differences between the different functions used for linear models. I need help for choosing which function to use and how to write it to consider all ...
55 views

Accounting for spatial autocorrelation in model - A simulation

My question, in short, is: I was trying to demonstrate that accounting for spatial autocorrelation reduces the overestimation of significance of a non-autocorrelated fixed effect. The result, ...
38 views

Using pairwise comparision on gls object [closed]

I have one factor (tree genotype) and I analyse its influence on soil content. I used gls to aply weights on my data because it's a better fitted model. Here is an exemple of my data with one ...
77 views

Analysis of variance with not normally distributed residuals : how important is normality?

I am using gls and anova to analyse my data. I use gls to aply weights. I have one factor (tree genotype) and I analyse its influence on soil content. Here is an exemple of my data with one variable (...
25 views

why would do (F)GLS and multilevel modeling simultaneously?

To my knowledge, we could develop a multilevel model if we have a data that has a clustered structure in order to adjust for the auto correlation happening within each cluster. Then, we also learn ...
37 views

Missing data and unbalanced data set in 2-factors design

I'm new to statistics and I'm trying to understand what to do with my data! I have two factors : tree genotype (10 levels) and soil type (3 levels). For one genotype I have only 2 replicates in soil1 ...
20 views

Can I take a random sample of my very large data set to overcome non-independence?

I am trying to run a regression model on a very large time series data set (comparing flow noise to vehicle speed, pitch and dive state). Because my samples are taken about every minute (with some ...
19 views

Multivariate Generalized Least Squares

I'd like to use the generalized least squares (GLS) in the multivariate version. I have a response variable $\boldsymbol{Y}$ with dimension $n \times m$, where $n$ indicates the number of observations ...
87 views

Significant lags at ACF and PACF plots in GLM: what should I do?

A glm.nb model I built shows significant lags at lag 1 in both ACF and PACF plots. Please see the images below. There is no way to define random effects (or ...
54 views

Examples of how to report results of a GLS

I am looking for some good examples in the primary literature where a GLS was used. I am pretty new to mixed modelling, and while I got it working, I am struggling at the write up stage. Google ...
19 views

Is there a way to address overdispersion in a gls model?

I have autocorrelated data that show a positive linear increase. When I model them using gls, I think the summary shows overdispersion. When using GLMM etc I'd change error structure, but I don't ...
213 views

Interrupted time series analysis of data with deterministic trend and seasonality

I am trying to evaluate the impact of an intervention on a selected outcome variable using interrupted time series data. I have aggregated a five-year data into monthly values to create a data-set 0f ...
28 views

Is there any benefit of using GLS when the regressors are identical

I am reading Greene, Econometric Analysis, 7th Addition, I am seeking a point of clarrification. "The case of identical regressors is quite common [think a VAR mode].... In this special case, ...
69 views

Estimating a VAR using OLS vs GLS

I have read in several places that I can estimate a VAR model equation by equation using OLS instead of using GLS, if I have the same explanatory variables. Do I need to make any assumptions about ...
26 views

Regression with GLS estimation, RMSE and IC on beta

as I said I need to know the formulas to calculate RMSE and confidence interval on beta in MATLAB, starting from the following estimated model. The model is AR type. Here the MATLAB code: <...
239 views

Proving efficiency of OLS over GLS

I'm trying to prove the efficiency of OLS over GLS when the covariance matrix of the error $\varepsilon$ is mistakenly assumed to be $\sigma^2\Sigma$ instead of $\sigma^2 I$. After deriving the ...
32 views

How to fit a gls model with a known slope

i want to fit a gls model (from nlme package) with a specified slope, so i can get the computed intercept for the best fit. I tried to set the slope with an offset. Althogh it works fine with lm, it ...
29 views

How much of a problem is inference after model selection when few models are manually compared?

tl;dr: I found a better model than the one I first thought of while inspecting the data and performed a few steps of variable selection/model fine-tuning. I assume that this is a (mild) case of ...
285 views

Using pairwise comparison on gls object with heterogeneity of variances?

I'm comparing total yield from fields under 5 different treatments. As you can see, the variance differed between the treatments (diagnostics from lm() fit): So I ...
62 views

Model selection with different fixed effects and different corARMA structures

I analyzed the effect of temperature (4 different areas) on laying date: LDT ~ Aa3+Bb+Cc+Dd. Because of autocorrelation in residuals I used ...
30 views

ANOVA selects a model with autocorrelated residuals

I want to know which temperature dataset (Aa1, Bb, Cc, Dd) is/are the best predictor for laying date (medini). First, I used simple linear regression: median...
103 views

How to obtain the inverse of the variance covariance matrix of GLS (Random Effects Model)

In the standard GLS set up how do you find the inverse of the variance covariance matrix? y _ { i t } = \beta _ { 0 } + x _ { i t } ^ { \prime } \beta + \alpha _ { i } + u _ { i t } \hspace{35pt} u ...
106 views

The feasible generalised least squares residuals

Consider the FGLS estimator. Let $\Psi'\Psi = \Omega^{-1}$ be the weighting matrix using the Cholesky decomposition. Suppose that $\Psi$ is known or already estimated. Consider the transformed ...
790 views

Why does gls model without random effects yield a similar fit to mixed effects model?

I am trying to answer a question from Pinhiero and Bates Mixed Effects Models in S and S-Plus, explaining how random effects fail to confer any benefit over a gls model that has mixed effects. This ...
351 views

Why use OLS when it is assumed there is heteroscedasticity?

So I'm slowly going through the Stock and Watson book and I'm a bit confused on how to deal with the issue of homoscedacity/heteroscedacity. Specifically, it is mentioned that economic theory tells ...
17 views

What are level-2 covariance parameters within Iterative Generalised Least Squares Models to estimate multilevel models?

I am referring to Goldstein & Rasbash (1992): Efficient computational procedures for the estimation of parameters in multilevel models based on iterative generalised least squares. Computational ...
250 views

Estimating the variance of the GLS estimator

Consider the linear regression model where $y = XB + u$. Assume that $\mathrm{E}[u \mid X] = 0$. Assume that $\mathrm{V}[u \mid X] = \sigma^2I$. This is the simple linear model. Now relax the ...
55 views

Can the maximum-likelihood method be derived from something else?

I am an author of a paper, in which we show that the maximum-likelihood (ML) method can be derived a limiting case of an iterated weighted least-squares fit. https://arxiv.org/abs/1807.07911 We, the ...
244 views

GEE and GLS. Are they similar?

First of all there is another question about it here, but it has no answers unfortunately...And also here, but it is more general about mixed models and GEE, while my question is more specific... So, ...
56 views

Correlation between dependent predictor variable and dependent response variable in repeated measures experiment

I would like to determine if there is a significant relationship between a measured continuous variable (predictor variable) and a response variable, which are both measured over time and therefore ...
549 views

Is it possible to fit mixed-models via gls?

Is it possible to fit multivariate Gaussian models implied by mixed-models through generalised least squares in R, by using, for instance, the gls function? For ...
530 views

auto.arima vs corARMA: AR coefficient greater than 1

Using R and the nlme package, I tried to fit a gls model with a corARMA correlation ...
83 views

Can I use chi-square to test goodness-of-fit in a generalized least-squares regression?

I am performing a generalized least squares regression based on a design matrix $X$, a response vector $Y$ and a (non-diagonal) covariance matrix $C$, assuming Gaussian errors. I'm not sure what ...
106 views

Question concerning the weighted least squares

If the weighted least squares estimators are equal to the ordinary (unweighted) least squares estimators when when the errors have common variance $σ^2$ would it mean that the model given by the ...
2k views

Least squares regression with variance-covariance matrix of observations

I'm trying to fit a model of the form $Y=aX+b$ based on a number of $(X,Y)$ observations with non-independent errors in $Y$. I know the variance-covariance matrix of the errors on $Y$. How can I ...
307 views

How to calculate sandwich standard errors for generalized least squares models?

Dependent data can be modeled using covariance structures like compound symmetry, spherical, AR-1, and other. Using generalized least squares, inference can be made on the regression coefficients ...
337 views

Prediction intervals for generalized least squares model with heteroscedastic errors

I wanted to model some data with heteroscedastic errors using a gls model of the form ...
218 views

FA estimation (GLS/WLS/DWLS/ULS) and robustness of these estimators

I have cross-sectional survey data, with over 4000 observations on 41 variables, and there are no missing values. Variables are not normally distributed and assumptions of multinormal distribution are ...
2k views

Generalized least squares results interpretation

I checked my linear regression model (WMAN = Species, WDNE = sea surface temp) and found auto-correlation so instead, I am trying generalized least squares with the following script; ...
458 views

Calculation of standard errors in weighted least squares (WLS)?

I'm searching for the correct calculation for a confidence interval using weighted least squares regression. Let me introduce you to my problem. Guess we have thirteen ordinal classes 1 to 13. For ...