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

182 questions
Filter by
Sorted by
Tagged with
42 views

### Interpreting the output from a gls model [on hold]

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 ...
27 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 ...
90 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 ...
18 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 ...
27 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, ...
19 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 ...
69 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 (...
10 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 ...
30 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 ...
18 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 ...
17 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 ...
70 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 ...
33 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 ...
16 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 ...
92 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 ...
26 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, ...
53 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 ...
22 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: <...
170 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 ...
26 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 ...
25 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 ...
184 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 ...
60 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 ...
28 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...
72 views

129 views

### Why do we have to estimate the autocorrelation coefficient when using GLS?

Suppose we have a linear regression model with autocorrelated error terms and we know it is AR(1) by for example investigating both the ACF and the PACF plot (I know there are probably more ...