New answers tagged

0

If we write the model as $y= \beta X + \varepsilon$, then we have $$SSR = \|\hat{\beta}X - y\|^2$$ If we have the same number of regressors as the number of observations, we have that $X$ is a square non-singular matrix, under the standard assumptions. Since $$\hat{\beta} = (X'X)^{-1}X'y$$ we have that $$\hat{\beta}X = (X'X)^{-1}X'Xy=y$$ plugging in yields $$...


2

(since I can't add a comment I will repost a answer I posted here) There is a simple proof that requires only linear algebra. First notice that if you take $\beta=(\beta_0,\beta_1,\ldots,\beta_{nāˆ’1})^T$ and the matrix $X=[\mathbb 1,x_1,x_2,\ldots,x_{nāˆ’1}]$, where $\mathbb 1=(1,1,\ldots,1)^T$ and $x_i=(x_{i1},\ldots,x_{i(nāˆ’1)})^T$, you can write the model ...


1

It is easier to expand the brackets first \begin{align} \mbox{RSS}(b) =& (y-Xb)'(y-Xb) = y'y - y'Xb-b'X'y+b'X'Xb\\ =& y'y-2b'X'y+b'X'Xb \end{align} then \begin{align} \frac{\partial}{\partial b}\mbox{RSS}(\hat{b}) = -2X'y+2X'X\hat{b} = 0 \end{align} by rearranging the equation you get $$ X'X\hat{b}=X'y. $$ Assuming no (complete) ...


0

1) You are confusing the notation of R programming language with the mathematical meaning. Viz, the theoretical model is $$ \log(y_t) = b_0 + b_1\log(y_{t-1}) + b_2\log(y_{t-12}) + b_3x_1 + e_t, $$ and in R notation is written as $$ \log(y_t) \sim \log(y_{t-1}) + log(y_{t-12}) + x_1. $$ Hence, $2.312$ is simply the OLS estimator of the intercept term $b_0$. ...


1

You probably meant that a $\textit{pair}$ of independent variables are highly correlated ($0.9$). Basically, although technically it's fine, this may indicate that both variables measure (almost) the same factor. Hence, generally speaking, bring the same information to the model, as such may cause redundancy. The fact that both variables are significant may ...


0

You need to find $\nabla f=\begin{bmatrix} \frac{\partial f}{\partial x} \\ \frac{\partial f}{\partial y} \end{bmatrix}$ and $\nabla^2 f = \begin{bmatrix} \frac{\partial^2 f}{\partial x^2} & \frac{\partial^2 f}{\partial y \partial x} \\ \frac{\partial^2 f}{\partial x \partial y} & \frac{\partial^2 f}{\partial y^2} \end{bmatrix}$. Then $\mathbf{x}_1=\...


0

Let $s(x)$ be the family of simple regression models in $x_{i1}$ and let $m(x)$ be the family of linear regression models in $x_{i1},x_{i2}$. If we fit each model to the same data, $X$, by minimizing the sum of squared errors (SSE), then let $s^*(x)$ be the SSE-optimal fit model in $s(x)$. Similarly, let $m^*(x)$ be the optimal fit for the family of models $...


1

Probabilities are restricted to being in the interval $[0,1]$, which means they can lead to unacceptable results if used in extrapolating linear regression, which can suggest answers in the range $(-\infty, +\infty)$ Meanwhile, suppose you want to say that doubling the probability of some outcome from $1\%$ to $2\%$ is roughly as substantial an effect as ...


0

The standard assumptions on the noise/error term are $\epsilon \sim \mathcal{N} (0, \sigma^2)$. Hence, as was mentioned by @Ian in the comment, $$ E\hat{\epsilon}_i = E(y_i - \hat{y}_i) = E(y_i) - E(\hat{\beta} x_i)=\beta x_i - \beta x_i=0. $$


0

\begin{align} \sum(Y_i - \bar{Y})^2 &= \sum[(Y_i - \hat{Y}_i)+( \hat{Y}_i-\bar{Y})]^2\\ &=\sum(Y_i - \hat{Y}_i)^2 + \sum(\hat{Y}_i - \bar{Y})(Y_i - \hat{Y}_i) + \sum(\hat{Y}_i - \bar{Y})^2\\ & =\sum(Y_i - \hat{Y})^2+\sum(\hat{Y}_i - \bar{Y})^2 \end{align} because $$ \sum(\hat{Y}_i - \bar{Y})(Y_i - \hat{...


1

You know all the values $F_i = F(x_i)$, $f_i = f(x_i)$ and $g_i=g(x_i)$ in the model $F_i = Af_i + Bg_i$ so we can find an estimate for $A$ and $B$ by least-squares fitting. That is we try to find the values of $A,B$ that minimize the sum of squared errors $$S =\sum_i (F_i - A f_i - Bg_i)^2$$ The relevant equations / the way to derive them can be found on ...


0

Assuming that you have $n$ data points $(s_i,d_i,t_i,h_i)$ and the model $$h = \beta_s e^{s^2} + \beta_d d\sin(-\beta_t t) + \beta_0 $$ you already notice that the model is nonlinear; closed form formulae are not possible to obtain and only numerical methods could be used. Nonlinear regression being required, you need to start with "reasonable" estimates and ...


0

Partial answer: So the problem maybe formulated as $$ \begin{align} \text{minimize}& & f(\mathbf{x}) &= \sum_{i=1}^n (x_i - y_i)^2 \\ \text{subject to}& & x_{j+1} - x_j &\geq \varepsilon, j = 1, 2, \ldots, n-1 \\ & & x_1 &\geq 0 \\ & & x_n & \leq 1 \\ \end{align}$$ As you have mentioned, for the feasibility ...


0

1) Let $y^*=y/c$, $c\neq 0$. The OLS estimator is given by $\hat{\beta} = (X'X)^{-1}X'y$. Given that the design matrix $X$ remains the same, the "new" coefficients vector is $$ \hat{\beta}^*= (X'X)^{-1}X'y^*=\frac{1}{c}(X'X)^{-1}X'y=\frac{\hat{\beta}}{c}. $$ 2) Recall that $R^2 = \frac{\sum(\hat{y_i} - \bar{y})^2}{\sum(y_i - \bar{y})^2}$. Note that $\hat{y}=...


1

Actually, $\hat{\beta}_0$ isn't constant - it depends on the $y_i$ (which follow a normal distribution). Note that in most cases, this variance would be likely computed for a prediction interval since you're working with a new $x$-value. Using properties of variances and covariances, $$\begin{align} \newcommand{\Var}[1]{\text{Var}\left(#1\right)}\newcommand{...


0

As yumero commented, there is no problem from an algebraic point of view. However, from a regression point of view, this is problematic since what is measured is $y$ and not $\frac y x$. I would definitely suggest that you set the regression as $$y= \alpha x+\beta x^2+\varepsilon$$ which is just a multilinear regression without intercept. For sure, if the ...


0

Logistic regression is indeed one possible way to model your data. It expresses the probability for the event of interest as a function of some independent variables $X$, that can be either categorical (in particular, dichotomous) or continuous. So, $$ P(Y=1|X)=\frac{1}{1+e^{-\beta'x}}, $$ such that if $X_1 \in \{1,0\}$, lets say $1$ stands for female and $...


0

Probably, it means that you have to calculate a correlation matrix. I.e., for $X_1, X_2, X_3$ you have to calculate $R_{3\times3}$ symmetric matrix, where the $ij$ entry is the Pearson's correlation coefficients between $X_i$ and $X_j$, namely $\rho_ij=\hat{Cov}(X_i, X_j)/(\hat{\sigma}_{X_i}\hat{\sigma}_{X_j})$, and the main diagonal is $1$.



Top 50 recent answers are included