The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [linear-model]

Refers to any model where a random variable is related to one or more random variables by a function that is linear in a finite number of parameters.

1,580 questions
Filter by
Sorted by
Tagged with
21 views

81 views

Given $Y_{i} = \beta_{0} + \beta_{1}x_{i} + \epsilon_{i}$, prove $\beta_{0}$ and $\beta_{1}$ are uncorrelated iff $\overline{x} = 0$

Let $Y_{i} = \beta_{0} + \beta_{1}x_{i} + \epsilon_{i}$ $(i = 1,2,\ldots,n)$, where $\textbf{E}[\epsilon] = 0$ and $\textbf{Var}[\epsilon] = \sigma^{2}\textbf{I}_{n}$. Find the least square estimates ...
138 views

Feature selection using PCA for linear regression

I am using PCA to the training data set to do feature selection before applying linear regression to build a classifier model. In this scenario, would it be useful to use ridge regression to ensure ...
79 views

64 views

Is it possible for regression model to predict patterns separately from data has multiple patterns?

I want to predict sold number of each drink(hot and cold) without clustering. I have data which contains sold number of hot and cold drinks. I trained it with linear model in scikit, and I thought I ...
31 views

What minimization problem has this solution

Consider the following basic minimization problem \begin{equation} {\displaystyle \min _{\beta\in R^{n}}{\frac {1}{n}}\|Y-X\beta\|_{R^{n}}^{2}},\end{equation} with solution \begin{equation} {\beta^*=(...
844 views

What does it mean when I add a new variable to my linear model and the R^2 stays the same?

I'm inclined to think that the new variable is not correlated to the response. But could the new variable be correlated to another variable in the model?
8 views

Generic expression used to compute output feature value map

Is there a generic expression used to compute output feature value map given an mxm input feature map and an nxn filter? ...
2k views

glm.fit: fitted probabilities numerically 0 or 1 occurred however culprit feature is numeric

I've been receiving the warning message in the title and have reviewed posts such as e.g. this one. I would like to understand how this feature has perfect separation with the target variable, since ...
15 views

For linear least square regression, what is the relationship between the optimal solution and the empirical solution with finite samples

Consider a linear system $y_i=Wx_i+v_i$, where $x_i\in R^{d\times1} \sim N(0,\Sigma_x)$, $v_i\in R^{p\times1} \sim N(0,\Sigma_v)$, $y_i\in R^{p\times1}$ and $W\in R^{p\times d}$. Now we consider a ...
168 views

p value in backward elimination regression

I need some help with the backward elimination output from Minitab below. Can p values A, B, C, D be equal to 0.745? Or the p value should be smaller than 0.745?
26 views

Fitting a linear model using lm and a variable as factor [closed]

I am new to R and I'm confused by lin_mod <- lm(temp~as.factor(activ), data=beav2) specifically as.factor(activ). Why do ...
29 views

Interaction term and sample selection

I have a dependent variable Y which is continuous. I want to study the impact of X on Y using OLS in a linear model, but I suspect the impact of X is more important for observations with a high value ...
11 views

Independent variables with an important share of zeros

In a linear panel data model, is it an issue to have explanatory variables with an important share of zeros (e.g. 40% of observations are zeros)? Can the coefficients of an OLS regression be biased?
16 views

Can visualization help to identify a dataset is linearly separable with polynomial features?

This data set cannot be linearly separable. If the polynomial and interaction features $X_1^2, X_2^2, X_1 \times X_2$ are used, can the data set linearly separable? I wanted to know there is any way ...
36 views

Why do we use quadratic form for random vectors? [closed]

I am studying linear regression. I have studied this in the past, but this is my first time exposing myself to the matrix form of multiple linear regression. My matrix algebra/linear algebra skills ...
18 views

How to interpret regression coefficients when each predictor variable contains different categories

Overview: I have conducted two types of statistical analysis using both linear regression and multiple regression. Overall, there were two observation periods, and the idea is to gauge if the rate ...
38 views

Visualising Generalised linear models

I read about linear regression where we assume, the response is linear and the noise $\epsilon$, follows $N(0, \sigma^2)$ (Gaussian noise model), this leads us to conclude $E[Y|X] = b^*x$ and that the ...
38 views

Linear Regression - holding predictor fixed at its mean

I am trying to create a linear model to predict House Price ($y$). The predictors in the dataset are Area (continuous) & Location (factor: West, Midwest, South, Northeast). I am asked to assess ...
225 views

Learning algorithm vs Model in Machine Learning [duplicate]

In ML, I learned that we have a model and a learning algorithm. The learning algorithm is used to train the model with training data, does that sound correct? If the model is trained using linear ...
27 views

How to compare two increasing trends to determine if rate of increase is statistically different?

My problem is that I have two groups and I am tracking their procedure cost over 6 years. I know that treatment CAS is significantly more than CEA, however I am trying to find out if the rate of ...
31 views

In Linear regression is it possible to have same sign coefficients for dummies coming from the same variable?

So I have a categorical variable color which can take the values white, black, red. I created dummy variables for each of those ...
111 views

TV Attribution: Fit linear model with additive and multiplicative terms

I am currently experimenting with a TV attribution approach proposed by Google: Liu, Y., Schwarzkopf, Y., & Koehler, J. (2017). TV Impact on Online Searches. They propose comparing website ...
164 views

compare Bayesian linear regression vs standard linear regression

1st question, I recently learnt bayesian linear regression, but I'm confused that in what situation we should use bayesian linear regression, and when to use standard linear regression? What is the ...
18 views

What do we use variance of the error term for in regression analysis?

So I get that, for simple linear regression where Y = B_0 + B_1(x) + E, Var(Y|x) = Var(E). Variance of the mean response involves it, as does variance of future responses, but is this ever actually ...
52 views

Use linear projection without constant to obtain the linear projection with constant

We know that the linear projection of $y$ on $x_0$ $x_1$, $x_2$, . . . $x_K$ always exists and is unique: $$L(y|x)= \gamma_0 x_0 + \gamma_1 x_1 + ... + \gamma_k x_k = x\gamma$$ where \$x = (x_0, x_1, ...
49 views

How can the prior distribution of bayes regression be estimated by empirical bayes?

Neither in Efron's book Large-scale Inference:Empirical Bayes Methods for Estimation, Testing and Prediction nor by Internet search, did I find a prior distribution estimation method of Bayes ...
17 views

Explained variance of incremental feature?

Suppose I have two features, and I know the explained variance of feature A for feature B. I build a linear model on feature A only, and I have a the explained variance of my target using this model. ...
55 views

How to run linear regression with constraints in R? [duplicate]

If I have the following data n<-1000 x1<-rnorm(n,1,1) x2<-rnorm(n,2,2) x3<-rnorm(n,3,3) e<-rnorm(n) y<-3+0.5*x1+0.2*x2+0.3*x3+e I want to fit a ...
26 views

How to infer the bounds on the R-squared value given the relationship between individual features?

Let say you have three variables X1, X2, and Y, all normally distributed, zero mean, unit variance. When you build a simple linear regression using: ...
59 views

How to statistically analyze the relationship of right skewed data

I struggle to analyze these continuous data: The last four plots show the diagnostic plots on my model (model <- lm(data 1 ~ data 2). My aim is to investigate the relationship between data 1 and ...