# Questions tagged [least-squares]

Refers to a general estimation technique that selects the parameter value to minimize the squared difference between two quantities, such as the observed value of a variable, and the expected value of that observation conditioned on the parameter value. Gaussian linear models are fit by least squares and least squares is the idea underlying the use of mean-squared-error (MSE) as a way of evaluating an estimator.

1,629 questions
12 views

### Normal Distribution Stata Help [on hold]

I am running the following regression in Stata ...
17 views

### Error in drawing normal distribution from Stata [on hold]

I have to draw a normal distribution for an OLS estimator I am using the command drawnorm betaest, n(10000) means(beta_mean) sds(betasq) However, it is giving me the error no; data in memory ...
2k views

### Prove that OLS estimator of the intercept has minimum variance

Let $$y_i=B_0+B_1X_i+\varepsilon_i$$ where $\varepsilon_i\sim N(0,\sigma^2)$. Find the least squares estimator of $B_0$ and show that it is unbiased and has minimum variance. I will not write in ...
13 views

### Upwardly biased forecast results due to period of high demand: how to deal with this?

I'm currently working on a call-center forecasting project with some data limitations. Currently it is still a learning-project, and I started with simple OLS regressions. For the months 2016-12 to ...
24 views

17 views

### how to prove B1 as a consistent estimator in panel data

$Yi=a+ B_1*X_i+ B_2*Z_i+\epsilon_i$, and suppose that $Zi$ is unobservable and not correlated with $X_i$. Is the OLS estimator of $B_1$ consistent by regressing $Y_i$ on a constant a and $X_i$? I ...
8 views

### How can I implement this Robust PCA equation in a more efficient way?

I recently learned in class the Principle Component Analysis method aims to approximate a matrix X to a multiplication of two matrices Z*W. If X is a n x d matrix, Z is a n x k matrix and W is a k x d ...
1k views

### When are the asymptotic variance of OLS and 2SLS equal?

Assume the model $\ y = X\beta + u \$ with $\ W \$ is a $\ n\times l \$ so called matrix of instruments. The following assumptions hold. There is a law of large numbers (LLN) for 1.,2.,3. and 4....
91 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 ...
9 views

### Regression using previous years results

Is it possible to make a linear model non auto regressive using previous years observation's. For example I have a student score, and I have 3 contributing variables (subject scores e.g. science......
22 views

22 views

### Loss function for KNN Regressor

What is the Loss function for KNN Regressor? Would it be similar to OLS? If so what would be the main difference?
11 views

### OLS Multicolleniarity

I have a pretty simple task to estimate ols multiple regression. I need a measure of multicolleniarity. Is condition number a good measure and what criteria exists fot its value?
36 views

### Question Regarding Zero Conditional Mean

Hi I am a beginner to econometrics! I have been dealing with bivariate regression. We use the formula $y = \beta_0 + \beta_1 x$. I am told that if $E(u\mid x) \ne 0$ then the estimate of the slope ...
20 views

### Difference among MLE, GMM and OLS [on hold]

I want to know what exactly the differences among OLS, GMM and MLE estimators and why statisticians prefer more to implement GMM while econometricians are more likely to use OLS or GMM. Since it is ...
59 views

### auto-correlation and OLS regression

I was trying to find the OLS estimator for the model: $Y$ = $\beta_0$ + $\beta_1X_{1t}$ + $\beta_2X_{2t}$ +.......+ $\beta_5X_{5t}$ + $e$ t = 1,2,3 ......, 50 time ordered observations X is a full ...
36 views

### A very basic question on ENDOGENEITY

In the regression model $Y$ = $\beta_0$ + $\beta_1X_1$ + $\beta_2X_2$ +.......+ $\beta_kX_k$ + $\epsilon$ where $\epsilon$ = $\delta_0X_2$ + $\lambda$ Will this also be the case of endogeneity ...
193 views

6 views

### Least square estimate for post-stratification sampling

I figured out via the normal linear regression method that Beta0 hat = ybar - Beta1 hat xbar. But I am not sure how to find out the least square estimate for Chat. Is anyone able to help me? Thanks!! ...
2k views

### Other unbiased estimators than the BLUE (OLS solution) for linear models

For a linear model the OLS solution provides the best linear unbiased estimator for the parameters. Of course we can trade in a bias for lower variance, e.g. ridge regression. But my question is ...
23 views

### Time as an independent variable in multiple regression

Can we chose time (t) as one of the independent variables in multiple (OLS) regression?
216 views

### impact of exchange rate and interest rate on stock market

I've conducted ols regression analysis on stock market index KLCI (dependent) and 2 other independent variables that includes exchange rate (ER) and interest rate (IR). And the result shows that i ...
25 views

### 2-step linear regression

Very simple problem: First model: I run a linear regression of $Y$ on $X$ and $Z$. Second model: I regress $Y$ on $X$ only, compute the residuals, and regress these residuals on $Z$. Why do I ...
235 views

### Full-Rank design matrix from overdetermined linear model

I'm trying to create a full-rank design matrix X for a randomized block design model starting from something like the example from page 3/8 of this paper . It's been suggested that I can go about ...
29 views

### Least squares regression coefficient with minimal information

If I only have a correlation matrix of 4 variables and the sample size, is it possible to predict 1 variables from the other 3 while using information about sample size? I’m trying to use lm but my ...
132 views

### Learning hat matrix

I'm stuck learning the hat matrix and wondered if someone could help with a question. If I have the model $$Y_i =\beta_0+\beta_1X_i+\epsilon_i,i = 1,2,3 \dots n,$$ how can I calculate the hat matrix ...
54 views

### OLS estimation of intercept in AR($p$) in R

I investigate the performance of the OLS estimator of an AR($3$) model given by $$X_t=\mu+\phi_1X_{t-1}+\phi_2X_{t-2}+\phi_3X_{t-3}+\varepsilon_t$$ for $t\in\mathbb Z$ using the following code: <...
19 views

### relation between OLS regressions using different data transformations

I have a $(n \times d)$ panel $y$ of $n$ different variables , and a $(n \times d)$ panel $x$ of their forecasts. $d=$ time length of data $n=$ cross section width/ no. of variables I run a pooled (...
9 views

### Autocorrelated independent variable (how to treat)

I have some response variable $Y$ that I am trying to model with OLS. There is a single independent variable $X_{t,N}=Y_t-Y_{t-N}$ for some $N$. However, when I do such a simple regression, I obtain ...
21 views

### OLS Characteristics - Proof

I am trying to figure out the mathematical proof of one of the OLS characteristics in simple linear regression. One stage, or more accurately, one term is not working out. The term coloured in red is ...
742 views

### AR.OLS isn't matching to an OLS on the autoregressive lags, Why?

I am using R and running ar.ols() on some data. And trying to compare to a more "manual" method of computing an AR model by doing lm() using the autoregressive lags as my independent variables. ...
12 views

### Why does the computational time of maximum likelihood estimators depend only on the number of UNIQUE observations?

The following paper says that the computational time of least squares, maximum likelihood, and M-estimators in general depend only on the number of UNIQUE observations. Intuitively it makes sense to ...
For a least-squares reduction to find expected values for $a,b,c,d, ...$ from a number of equations like: $a + b = n_1$ $a + c = n_2$ $b + d = n_3$ $c + d = n_4$ ... My question relates to ...