Questions tagged [linear]

For statistical topics which involve the assumption of linearity, for example, linear regression or linear mixed models, or for the discussion of linear algebra as applied to statistics.

Filter by
Sorted by
Tagged with
1
vote
1answer
16 views

How to find Linear regression independent variables for future dates

I am new to the forum and Machine learning world. I have been through multiple linear regression tutorials where the example is stock prices. The dependent variable is closing price and independent ...
0
votes
1answer
42 views

Determining if linear regression is appropriate

I am designing an experiment, and I want to know if using a hypothesis test on the linear regression model to analyze my data is appropriate. The experiment will have five independent variable values ...
2
votes
2answers
57 views

Linear model with both additive and multiplicative effects

In linear regression, the independent variables have an additive effect on the response (level-level regression): $y=\beta_0+\beta_1x+\epsilon$ In a log-level regression, the independent variables ...
0
votes
1answer
24 views

Multiple linear regression approach: difference in set-up and dataset split

Firstly, I am new to modelling linear regression models. I want to build a linear regression model to predict building energy use based on building parameters. I'm having a dataset of 100000 buildings ...
0
votes
2answers
47 views

Why is $Y=\beta_0 x^{\beta_1} e$ a linear model?

Why is $Y=\beta_0 x^{\beta_1} e$ a linear model? When we apply the transform, it becomes $lnY = ln\beta_0+\beta_1 lnx +lne$, and why is it still linear when the $\beta_0$ part is under ln?
0
votes
0answers
15 views

Deriving vectorized form of linear regression

We first have the weights of a D dimensional vector $w$ and a D dimensional predictor vector $x$, which are all indexed by $j$. There are $N$ observations, all D dimensional. $t$ is our targets, i.e, ...
1
vote
1answer
28 views

Variance of OLS estimates proof

I recently came across this question on stats stack exchange where a user asked for the proof that the T statistic has a t distribution. The question assumes a linear model of the form; $$Y=X\beta+\...
0
votes
1answer
19 views

Shape of derivative with respect to vector

I'm confused about the shape of the derivative with respect to vector. In the book MATHEMATICS FOR MACHINE LEARNING page 150: For formula 5.56a, x1 to xn are horizontal. For another pdf "...
0
votes
1answer
31 views

Can you use the residuals of a first regression model as a new term to improve the model?

In the house price prediction example of Practical Statistics for Data Scientists (by Bruce, Bruce, and Gedeck; p. 168), the median residual for each zip code is taken and binned. The authors note ...
4
votes
1answer
84 views

Is there a more intuitive term for a “Linear model”?

A model is linear if it is linear in the parameters. Therefore, a linear model can describe a curve, if a function (such as raising to a power, but not necessarily) is performed on one of the ...
0
votes
0answers
16 views

simple linear regression forecast in matlab

How could I do a linear regression forecasting in Matlab, please? I am not asking for the code itself, but for some guidelines on how can I structure the problem and what to use. I have three ...
2
votes
1answer
50 views

Can this be written as a linear model?

$$y_i=\frac{(x_{0i}\beta_0+x_{1i})+\log(\beta_1^2 x_{2i})}{x_{3i}}+e_i\quad,\,i=1,\ldots,n,\,x_{pj}>0$$ I am wondering if this can be written as a linear model, I didn't think so because of the ...
1
vote
1answer
27 views

Meaning of slopes of $1$ and $0$ in a linear regression equation

I have data for the height of certain trees in 1996 (dependent variable) and their height in 1990 (explanatory variable). The question: Is the value of $1$ included in the confidence interval for the ...
1
vote
1answer
18 views

Goodness of fit test for LASSO

How would you do a goodness of fit test for Lasso regression? Im guessing that the $R^2$ value, as for linear regression, wont work anymore. Why is that?
0
votes
1answer
18 views

multiple curve fitting on scatter plot [duplicate]

I have the following problem: Let's assume we have a dataset with X and Y values. If we plot them on a scatter plot it would look somehow like the following graph: If we have a look at this, we see ...
15
votes
4answers
2k views

What is the best programmatic way for determining whether two variables are linearly or non-linearly or not even related

What is the best programmatic way for determining whether two predictor variables are linearly or non-linearly or not even related, maybe using any of the packages scipy/statsmodels or anything else ...
0
votes
0answers
4 views

ESL; Linear Regression and Nearest Neighbours doubt

I've been trying to self work my way through ESL but seem to have run up against the following issue right off the bat. I understand that the authors are trying to introduce the idea that the way that ...
0
votes
1answer
23 views

Preprocessing a data set for linear regression

I'm currently a student in a machine learning course studying for an upcoming exam. Here's a question I've been given for practice: You have a very large dataset of employees and you'd like to ...
0
votes
1answer
20 views

Relationship of x regress y and y regress x on the slope

Consider a linear regression model y on x and x on y. We have $Y = a'X + a$ where $a' = \frac{cov(X,Y)}{Var(X)}$. Equivalently, we have $X = b'Y+b$ where $b' = \frac{cov(X,Y)}{Var(Y)}$. I am ...
1
vote
1answer
26 views

Equivalent Variance-Stabilizing Function

I've been reading the book "Generalized Linear Models with Examples in R" by Dunn and Smyth. In chapter 5, they claim: Variance-stabilizing transformations h(y) used with linear regression ...
0
votes
0answers
13 views

standard error of sums of estimates of a linear model

Say I have a linear model with X1 a continuous variable and X2 a categorical variable: y = b0 + b1X1 + b2X2 Is there a way to find the standard error of b1 + b2 from the independent standard errors of ...
1
vote
2answers
52 views

Regression and the CEF

I recently read in this page (https://www.timlrx.com/2018/02/26/notes-on-regression-approximation-of-the-conditional-expectation-function/#fn1) that: "Regression offers a way of approximating ...
0
votes
0answers
11 views

Homoeodascity and Lineaity [duplicate]

Have my linearity and Homoscedasticity assumptions been met?
1
vote
1answer
94 views

Why significant predictors are different for two highly correlated dependent variables?

I am using linear mixed-effects (LME) models to investigate the longitudinal effects of maternal factors on infant adiposity indices. Infant adiposity was measured at 3-time points (birth, 3 months ...
3
votes
2answers
107 views

Multiple Regression: Two Binary ind. vars. - Can an interaction term be significant, when the main effects are not?

I think this is a simple question, but I'm having difficulty coming up with a test or example for this. Consider lm(A ~ B*C, data=D) where A is continuous; B and C ...
1
vote
1answer
28 views

What are the degrees of freedom for “linear regression t-test” with one binary variable?

Quick, simple question. I read that DF = n-2 when doing "a linear regression t-test" with a continuous independent variable. (Testing that the slope is 0). https://stattrek.com/regression/...
0
votes
1answer
45 views

How can I calculate the mean and variance of a linearly transformed random variable?

Say I have a random variable $x$, with mean $\mu_x=35$ and standard deviation $\sigma_x=10$. I want to linearly transform $x$ to $y$ according to the formula $y=a+bx$ so that $\mu_y=100$ and $\sigma_y=...
1
vote
2answers
45 views

Linearity assumption for Pearson correlation

It's known that values must have a linear relationship to count Pearson correlation between them. I'm wondering if there are any ...
0
votes
0answers
8 views

How to generate binary data that is additive through levels of a factor?

Suppose we define $Y\in \mathbb{R}$ as a function of some random variable $Z$ so that $$ Y(Z)=\alpha Z + \beta X $$ for $Z\sim Bern(p)$ and $X \sim N(0,1)$. Then $$ Y(1) \sim N\left(\alpha, \beta^2\...
2
votes
0answers
23 views

Test for statistically significant difference in means across different conditions

I've never had a formal statistics course, so I hope these questions aren't too basic or using incorrect terminology. I have samples of bivariate data across different scales of 3 kinds, which I ...
1
vote
1answer
35 views

Imputing missing values for linear regression model, using linear regression

I scraped a real estate website and would like to impute missing data on total area (about 40% missing) using linear regression. I achieve the best results using price, number of rooms, bedrooms, ...
1
vote
1answer
21 views

Explaining the effect of adding a dummy variable on a restricted model

So I'm learning basic econometrics. I'm looking at a linear regression model on Stata where I have to qualitatively compare a restricted model, where $y_i = b_1 + b_2 x_i$ and $y_i = b_1 + b_2x_i + ...
1
vote
1answer
29 views

Linear transformation *not* to use to scale mean and SD

I'm working through the Exercises in Regression and Other Stories. Exercise 3.6 on Linear transformations asks you to provide a formula to rescale a variable with mean = 35 and SD = 10 to have mean = ...
4
votes
1answer
54 views

Which linear model?

I encountered the following problem: I have a biomarker measured at baseline and the renal function measured at baseline and Follow-up. 2 continuous variables My question is: does the biomarker ...
2
votes
2answers
47 views

What do exponential of coefficients (like odds ratio in logistic regression) from linear regression indicate?

The long title says it all. For example, I have performed linear regression (OLS) with commonly used iris dataset using following formula: PL ~ SW + Species ...
0
votes
1answer
31 views

Relationship between logistic regression and linear regression

I've encountered a problem where I need to analyze the relationship between a movie's length, a movie's price and it's sale on a video streaming platform. Now I have two choices to quantify sale as my ...
2
votes
1answer
69 views

Do I accept or reject the null hypothesis?

M1 : Y ∼ β0 + β1x1 + β2x2 M2 : Y ∼ β0 + β1x1 anova(M1,M2) shows a p-value of 0.0001, so we prefer M1 at significance level 0.05. Would that be correct? I thought that if .0001<.05, I should reject ...
1
vote
1answer
52 views

How covariance matrix of the error term in linear regression can be NON-singular?

I don't understand linear regression. Assume the classic linear model: $$Y = X \beta + \epsilon,\\ \epsilon \sim \mathbb{N}(0, \sigma^2 I_n), $$ where $Y$ is a vector of length $n$, $X$ is a matrix of ...
5
votes
3answers
88 views

Regression in Causal Inference

I was recently introduced to the topic of causal inference in statistics and I am currently learning about the importance of the backdoor criterion (BDC), as applied to the following DAG. Interest ...
4
votes
1answer
155 views

Is the MSE of a vector a scalar or a matrix? [duplicate]

Suppose $Y = X\beta + \epsilon,$ where $Y$ is $n \times 1$, $X$ is $n \times p$, and $\beta$ is $p \times 1$, and $\epsilon$ is $n \times 1$ with mean 0 and variance $\sigma^2$. The OLS estimator of $\...
1
vote
0answers
18 views

Testing linear hypothesis with Wald test: unintuitive results

I have a question about testing the equivalence of two regression parameters. I know there are a lot of resources about how to test a linear hypothesis but I am confused about my results (and its been ...
2
votes
0answers
22 views

Multiplicity Correction for Coefficient Estimates in Linear Regression [duplicate]

When regressing a dependent variable y on some feature vector x with a standard linear regression, is there any correction in place for multiplicity or is this just not relevant in this case? The ...
2
votes
1answer
28 views

Checking the constant variance assumption for residuals vs fitted plots: What about for the same fitted values?

For a residuals vs fitted plot, we use the fitted values $\hat{Y} = \beta_0 + \beta_1 + \cdots + \beta_p x_p$ on the horizontal axis and the residuals on the vertical axis, and then compare the ...
1
vote
1answer
22 views

SPSS - Automatic Linear Modeling “Importance” Numbers

I have a large set of survey data. I'm looking at trying to find out which variables are the most important to impacting a DV (call it "happiness"). I'm not looking to find a beta number ...
4
votes
1answer
56 views

Assumptions of OLS and linear mixed models

I've only taken a few statistics courses, and so I apologize if any of my questions are rudimentary, however, I'm wondering if someone could explain/direct me to resources regarding the correct ...
2
votes
3answers
69 views

How to test if sum of two coefficients of ols model is greater than zero using R?

The regression model is: y = b0 +b1x1 + b2x2 + b3x3 + e I want to test if b1 + b2 > 0. the R package ...
0
votes
1answer
25 views

Linear model what is $p(x|y_0)$

If I have a linear model of the form: $$x_i = \beta y_i + \alpha + \epsilon_i$$ where $\epsilon_i$ are samples from $\epsilon$, an independent and identically distributed random variable. I can find ...
2
votes
1answer
48 views

Should I remove the trend of this data

I have time-series data. It includes a number of patients with series conditions due to car crashes. After I remove the trend, I found that some number of patients becomes negatives which is ...
1
vote
0answers
49 views

distance between two points (x,y) weighted by location (x)

a new on algebra. I am trying to create an indicator of the distance between two points (x,y) from a (0,1) scale, but I want to create a weight that reduces such distances as the point x is closer to ...
4
votes
2answers
51 views

Linear trend with time-series does not fit the data perfectly. Is that OK?

I am new to a time-series model. I try to improve my knowledge by practising. I understand the stationary for the time-series model. I read many papers and tutorials regarding removing the trends. ...

1
2 3 4 5
20