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.

Filter by
Sorted by
Tagged with
1
vote
0answers
57 views

How to assess linearity in multiple linear regression?

I have a question about how to check if the relationship between the independent variable, yt , and the explanatory variables t and t^2 is linear? I fitted the linear regression with the AUTO-...
1
vote
1answer
53 views

Multiple linear regression: observations with 2 or more values per factor / categories - a problem?

Is it a problem for linear regression (lm in R) to have observations that have multiple values for a given factor? For example, I have the weekly average sales <...
2
votes
1answer
25 views

Independence between error and regressor

Let the following classical linear regression: $$y_i = x_i \theta + u_i, \quad E(u_i|x_i) \sim N(0, \sigma^2)$$ Can I conclude that $x$ and $u$ are independent? I would like this because I want to ...
1
vote
2answers
44 views

What model(s) are appropriate for unbounded species abundance data with 0's and environmental response variables in R?

I am conducting a research project on the vegetation composition of an abandoned mine site to determine the environmental factors that influence species abundance (cover) and composition. Study ...
0
votes
0answers
28 views

Unbiased estimate of the error variance $\sigma^2$

I don't get the derivation. In the below calculations, all variables are random vectors/matrices where we have $n$ data points and $k$ linear regressors and $p = k + 1$. $$ e^Te = y^t(I-H)y $$ $$ E(...
1
vote
1answer
107 views

residual plot and non linearity

I was taught that linearity assumption in linear model can be checked by using the residuals plot. If there is a pattern then the assumption is most likely violated. Can someone explain the mechanisms ...
34
votes
5answers
3k views

What if my linear regression data contains several co-mingled linear relationships?

Let's say I am studying how daffodils respond to various soil conditions. I have collected data on the pH of the soil versus the mature height of the daffodil. I'm expecting a linear relationship, ...
1
vote
0answers
22 views

Can I Scale my dependent variable by one of the independent ones and still use the independent one as a feature?

I would like to predict $y_i$ (my variable at time step $i$) but find some merit in instead taking $y_i$ as percentage difference of a feature at that same step e.g $b_i$. So that I instead use $(y_i-...
0
votes
0answers
13 views

How would the linear model change if duplicating all the data points [duplicate]

If I have N data points and get a linear regression model with coefficients $b_{1}$, $b_{2}$, ..., $b_{m}$, how will the 95% confidence intervals on $b_{i}$ change after duplicating all of the data ...
0
votes
1answer
61 views

Interpreting Structural Equation Model Estimates?

I am hoping someone can clarify how parameter estimates for structural equation models (SEM) are usually interpreted in practice. By that I mean, suppose we have an SEM of the form $$ y = \mu + \...
0
votes
0answers
26 views

Simple Linear Regression and Transformation

Can someone help me out on which transformation might be ideal for the data below? And how do I find the confidence interval for the mean brain activity using SAS?
2
votes
3answers
285 views

Multiple regression with dummy variables and interaction term

We have done a multiple regression analysis to see how gender and experience affect salary. We used a dummy variable for gender and then we also added the interaction variable (female work experience)....
2
votes
0answers
59 views

Models and standard scores

I'd like to use standard scores to describe a variable $y$. If I always measured $y$ in a particular place and time, I'd just take the mean and standard deviation of $y$ and then calculate the ...
0
votes
2answers
47 views

Would machine learning techniques help if the linear and nonlinear relationships is so weak?

I have a cross sectional data set at hand contains four predictors to predict one outcome, I employed bivariate analyses to check whether the relationship between the dependent and independent ...
0
votes
0answers
39 views

Cook's distance - problem with understanding

I have a problem with calculating Cook Distance (I'm trying to understand it). Ok so here is the task and my 'solution'. I'm asking for comment, is it ok, or what do I wrong. We have simple linear ...
1
vote
0answers
56 views

How can I interpret relative and absolute income of both partners in one regression?

Suppose you want to examine the effect of income on the amount of housework for women. Does it make sense to include both relative income (compared to partners income) and absolute income of BOTH ...
3
votes
4answers
139 views

In linear regression, are the noise terms independent of the coefficient estimators?

In the Wikipedia article on the bias-variance tradeoff, the independence of the estimator $\hat f(x)$ and the noise term $\epsilon$ is used in a crucial way in the proof of the decomposition of the ...
0
votes
0answers
35 views

Comparing linear sets of data

I'm trying to validate the use of different sample tubes in a pharma environment. We have an established method with a linear calibration curve and QCs at three concentrations within the curve range. ...
0
votes
0answers
33 views

Regularization of linear regression problem [duplicate]

Consider a vector $a \in R^n$. I want to know how I can find analytically the solution of the following optimization problem: $x^* = argmin_{x \in R^n} f(x)$, where $f(x) = ||x-a||_{2}^2 + \lambda ||x|...
0
votes
1answer
111 views

Cluster-robust standard errors in panel data analysis

In a simple panel data analysis with data on 64 firms over 8 years, I use cluster-robust standard errors (at the firm level) to evaluate significance of coefficients. I observe important differences ...
1
vote
1answer
185 views

How do you deal with “nested” variables in a regression model? in R

A conceptual solution for this scenario has been posted in: How do you deal with "nested" variables in a regression model? Problem is I am having trouble using this solution in R - glm() ...
0
votes
0answers
17 views

When binary predictor = 0, all other predictors = NA - what model structure do I need?

I have a genetics dataset which I want to build a model for. The dependent variable y is case or controls status (binary). The first independent variable x1 is whether or not they have a variant in ...
0
votes
0answers
35 views

Additional Property of Singular Value Decomposition

I am new to SVD so forgive me if the question is trivial. Following is my question. If I have two sets of linear equations, Y1 = T1.X Y2 = T2.X where T1 and T2 are mxn rectangular matrices. Now let'...
0
votes
1answer
73 views

math behind polynomial regression

I am creating a polynomial regression model with Python sci kit learn package, and I was wondering how I can use the predict features in machine learning ...
0
votes
1answer
59 views

Curved regression lines

I had already asked a similar question here, but I'm experiencing the same problem for a different data-set and for a different family of mixed models. My response variable is a binary outcome of ...
1
vote
1answer
57 views

Is this dataset lineary seperable? How can I find it out using (linear) algebra?

I have this dataset: I want to know if it is linearly separable (fully separable). I want to use this rule, but I'm not sure if it's correct: Make $X'$ - matrix with d+1 column of all 1's. Then ...
0
votes
0answers
23 views

Controlling for confounding variables

I have a dataset where some variables need to be controlled for body size and seasonal variation. There is a paper which describes controlling for skeletal size by using the residuals from a linear ...
0
votes
1answer
30 views

Significance of the sum of the main effect and interaction term

Consider a simple linear regression with an interaction term: $Y=b_0 + b_1X +b_2Z+b_3XZ$ where $X$ is continuous and $Z$ is a dummy. I want to find out whether $X$ has a significant impact on $Y$ ...
1
vote
1answer
189 views

Problem with Softmax decision boundary

While reading this paper: sphere face on page 2, it explains that original softmax boundary is given by: $$(W_1 −W_2)x+b_1 −b_2 = 0$$ While trying to obtain the boundary on a toy generated 2D dataset ...
0
votes
0answers
12 views

R: Any benefits of converting factor column to scaled double? [duplicate]

When building a (generalized) linear model, is there any benefit of converting a factor column (i.e. True/False) to a scaled double vector? With booleans, say: ...
0
votes
0answers
25 views

Optimization Technique Needed

I am trying to figure out an optimization technique to below: For context, everything to the left of "New Upcoming Games" is historical data. In my actual dataset I have about 200-300 rows that will ...
1
vote
0answers
29 views

Uniqueness of partial covariance/corrlation if OLS is not unique

Let $X,Y,Z=(Z_1,...,Z_n)$ be random variables. Define the partial covariance between $X$ and $Y$ given $Z$ as: $$\rho_{X,Y \cdot Z} := cov(\hat{X}-X, \hat{Y}-Y)$$ where $\hat{X}$ and $ \hat{Y}$ are ...
1
vote
0answers
421 views

How are confidence intervals calculated for lm in R using predict?

Here, a simple linear model, given x = 98, yields a predicted value of 24.47 with 95% confidence interval [23.97, 24.96]. ...
0
votes
0answers
49 views

Multivariate linear regression - optimizing one coefficient at a time

I have a few questions about solving the multivariate linear regression problem: What is the most popular numerical method used to get the coefficients from multivariate linear regression? I assume ...
3
votes
3answers
97 views

Linear model for positive response variables

Very concise question: if I model a phenomenon which takes only positive values (for example, revenues or production) using the classical OLS, what are the consequences in terms of bias, efficiency ...
0
votes
0answers
33 views

Writing the matrix form of a linear regression model?

I don't know how to write a simple linear regression model in a matrix form.. in our book we are given a table having values of $ x,y,x2,y2,xy.$ . I created a very small example and I attached it as ...
0
votes
0answers
34 views

Linear Regression on Boston Housing Price? [duplicate]

As far my knowledge, Linear Regression assumes that data or columns are normally distributed and doesn’t have multicollinearity amongs the features, But when I apply Shapiro test, it shows that none ...
1
vote
1answer
133 views

Linear Regression Approach For Trends

I'm working on a project with genetics but I think my problem is applicable to general statistics. I want to test frequency (Minor Allele Frequency) of a SNP/variant across 5 age categories to see ...
2
votes
0answers
181 views

Instrumental variable analysis: ivreg (R) vs. naive estimation

Short version of my question: Is it true that the naive, 2-step instrumental variable approach overestimates the standard errors (I expected an underestimation)? Long version: I am working with an ...
0
votes
1answer
38 views

How to fix and understand linearity

The model I have run is a simple multiple linear regression. The model looks like a great fit, but R is telling me otherwise. My question is 3 fold. 1) How do we estimate linearity (not visually) 2) ...
0
votes
0answers
17 views

Introducing random slopes in models with nested random effects

I'm trying to see how latency to emerge (response variable) is varies with time (trials). Individuals (ID) are nested within colonies. The nesting is such that individuals 1-20 belong to colony 1, 21-...
0
votes
0answers
96 views

Calculate $R^2$, $R^2_{adj}$, and F-statistic from $\text{R}$ model summary

I am given the full model, $M_{\tt f}$, with the regression line $$ {\tt response} = \beta_0 + \beta_1{\tt A} + \beta_2{\tt B} + \beta_2{\tt C} + \beta_4{\tt D} + \beta_5{\tt E} + \beta_6{\tt F} + ...
2
votes
0answers
50 views

unconditional prior distribution of g-prior (Bayesian Linear Regression)

Consider a Gaussian regression model $\boldsymbol{Y} =\boldsymbol{X}\boldsymbol{\beta} + \boldsymbol{\epsilon},\quad \boldsymbol{\epsilon}\sim N( \boldsymbol{0},\sigma^2I)$ I put a Hyper-g Priors (...
1
vote
1answer
43 views

Logarithmic or square root transformation for econometric modeling

I am doing econometric research on firm financial ratios. Using linear panel data modeling, I am going to transform some predictors in order to reduce variance. At this regard, I am uncertain about ...
0
votes
0answers
62 views

Sigma interpretation in Bayesian Linear Model?

I have two question concerning my output of my bayesian linear regression. 1) I have all beta posterior and obviously, having used a prior for Sigma, i have a posterior for Sigma too, but what can i ...
0
votes
0answers
39 views

Solving correlation between explanatory variables using instrumental variables

I am currently stuck on a task where I am interested in estimating the production function for agricultural output as follows: \begin{equation} y_{i} = x_{i}\beta + \alpha_i + \epsilon_{i} \end{...
1
vote
1answer
153 views

Assumptions of linear mixed model not met

I have a repeated measures dataset with which I'm testing if individuals are consistent in their boldness scores (continuous variable) over time (trials). Towards this, I generated linear mixed ...
1
vote
1answer
77 views

GLM standardisation with quadratic terms

I had understood that using linear transformations, such as centering and scaling, of predictor variables in GLMs does not affect the t/z-values, and thus nor the p-values (except for the intercept). ...
0
votes
0answers
42 views

Transforming panel data OLS into cross-sectional data model

I am currently stuck on a task where I am interested in estimating the production function for agricultural output using panel data as follows: \begin{equation} y_{it} = x_{it}\beta + \alpha_i + \...
0
votes
0answers
32 views

Calculation of standard deviations for regression coefficient standardization when intercept is not present

I took the code of function lm.beta::lm.beta in R and wrote it in this way to be more understandable (and commented the lines I'm not interested in): ...