Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 8141

Techniques for analyzing the relationship between one (or more) "dependent" variables and "independent" variables.

9 votes

Linear regression with constrained coefficient

General constrained OLS problem Recall that the OLS problem, subject to linear constraints can be written as $$ \begin{align} \arg\min_{\boldsymbol{\beta}}\boldsymbol{Y}'\boldsymbol{Y} - \boldsymbol{ …
tchakravarty's user avatar
  • 9,042
2 votes

Can I test all possible contrasts in a regression with a categorical explanatory variable?

You don't say what platform you are using. Stata makes this very easy to do using the margins, pwcompare command. For example, webuse nhanes2 logistic highbp sex##agegrp##c.bmi margins agegrp, pwcom …
tchakravarty's user avatar
  • 9,042
1 vote

Response variable bounded by dependent variable

You have a case of data-dependent truncated regression model, which is easily handled by the R package truncreg. …
tchakravarty's user avatar
  • 9,042
2 votes
Accepted

If $cor(X,\epsilon) \approx 0$ in linear regression, can we conclude $X$ is exogenous?

The linear regression model is $$ \boldsymbol{Y} = \mathbf{X}\boldsymbol{\beta} + \boldsymbol{\varepsilon} $$ together with the conditional uncorrelatedness assumption $\mathbb{E}( \mathbf{X}\boldsymbol … Thus this cannot form the basis of a test for the unconditional uncorrelatedness assumption in the linear regression model. …
tchakravarty's user avatar
  • 9,042
1 vote
Accepted

How do you calculate the statistical significance of a correlation between $Y$ and $X$?

Here is a Python function to perform a t-test, as well as a z-test for the significance of the correlation coefficient between two series. import warnings import numpy as np import scipy as sp impo …
tchakravarty's user avatar
  • 9,042
7 votes

How to express a Poisson regression as an equation

The Poisson regression model is $$ \begin{align} \mathbb{E}(Y_i \mid \boldsymbol{X}_i) &\equiv h(\boldsymbol{X}_i) \\ &= \exp(\beta_0 + \sum_{k=1}^K\beta_k X_{ki}) \\ &= \mathbb{V}(Y_i \mid \boldsymbol … There is however, nothing specific to the Poisson regression equation in your question. …
tchakravarty's user avatar
  • 9,042
3 votes
Accepted

Filter function in R throws data missing

The filter function you want to run, from the base package stats -- stats::filter -- is being over-ridden by dplyr::filter, since you are probably also loading dplyr. You can either write stats::filte …
tchakravarty's user avatar
  • 9,042
52 votes
Accepted

How do I interpret a probit model in Stata?

This is so because in the linear regression case, the regression coefficients are the marginal effects. … In the probit regression, there is an additional step of computation required to get the marginal effects once you have computed the probit regression fit. …
tchakravarty's user avatar
  • 9,042
8 votes

Stepwise regression in R with both direction

For example, assume that you are fitting a linear regression model with the upper set of variables $\mathcal{U} = \{X_1, X_2, X_3, X_4, X_5, X_6, X_7\}$, and lower set $\mathcal{L} = \{X_1\}$, and the …
tchakravarty's user avatar
  • 9,042
2 votes
Accepted

How to account for a regressand affecting a regressor?

You probably mean reverse causality. That is a form of endogeneity. For a nice discussion, see page 146 here. Broadly, you deal with it the same way you deal with endogeneity in general, using either …
tchakravarty's user avatar
  • 9,042
5 votes

A summary of econometric methods

There is indeed such a paper, written by some of the most eminent current econometricians. Econometrics: A Bird's Eye View by John Geweke, Joel Horowitz and Hashem Pesaran Don't think that this was …
tchakravarty's user avatar
  • 9,042
5 votes
Accepted

Asymptotic assumptions in OLS

The canonical reference for this kind of thing is White (2001). The model you have is $$ Y_i = \boldsymbol{X}_i'\boldsymbol{\beta}_0 + \varepsilon_i $$ together with the conditional exogeneity condi …
tchakravarty's user avatar
  • 9,042
4 votes
Accepted

Using the Lagrange multiplier statistic in regression

In your case, I am assuming that you are interested in the LM test for linear regression specification, in particular for testing for omitted variables in your model. … An auxiliary regression of the form you are attempting is a convenient way of computing the LM test statistic. …
tchakravarty's user avatar
  • 9,042
6 votes
Accepted

Are variables, which linear combination results in a endogenous variable, endogenous?

To see this recall that endogeneity of a regressor $X_i$ in the simple regression model $$ Y_i = \beta_0 + \beta_1 X_i + \varepsilon_i $$ means that $\mathbb{E}(X_i\varepsilon_i) \neq 0$. …
tchakravarty's user avatar
  • 9,042
3 votes

Showing that the power of a test approaches 1 as the sample size approaches infinity

more generally so that they read $$ \begin{align} \mathfrak{h}_0{}:{}\beta_1 &= \beta^0_1\\ \mathfrak{h}_a{}:{}\beta_1&=\beta_1^a \end{align} $$ Then, using standard machinery, and under the linear regression
tchakravarty's user avatar
  • 9,042

15 30 50 per page