Tagged Questions
3
votes
0answers
36 views
How to build a model where variance depends on covariate?
I have what I believe is a very simple problem for anyone used to modelling with unequal variances (which I am unfortunately not). I have a dependent variable "totrich" which I want to model as a ...
0
votes
1answer
40 views
Basic questions concerning the interpretation of results from summary(lm(…~…)) in R [duplicate]
set.seed(11)
a = runif (12)
b = rep(c(1,2,3),4)
summary(lm(a~b))$coeff
summary(lm(a~b-1))$coeff
What does a p.value for the intercept means ?
What differences ...
-3
votes
1answer
65 views
Calculating the linear model with R
I need to calculate the linear model in R, i did the following:
summary(model)
But what if I wanted to calculate only the first point? A bit stuck with this one... Many thanks!
Here is the code ...
1
vote
2answers
60 views
Line of best fit (Linear regression) over vertical line
I want to get a line of the best fit which is a line that passes as close as possible to a set of points defined by coordinates point_i = (X_i, Y_i).
When I apply linear regression, I have a special ...
1
vote
0answers
18 views
Calculating error bars for Excel Linear Regression [duplicate]
I've ben sent a forecast of sales from a consultancy. It uses Excel's LINEST function, taking 4 factors that seem to have affected sales in the past, and used them to make a prediction.
How do I go ...
0
votes
0answers
70 views
Correct structuring of random effects?
I have produced a mixed effects model as follows;
lmer(TotalPayoff~Type+Game+PgvnD*Asym+(1|Subject)+(1|Pairing),REML=FALSE,data=table)-
each pairing contains 2 subjects and each Subject is ...
3
votes
1answer
69 views
Statistic For The Curvature or Non-Linearity Of Data Set
I'm trying to estimate the curvature/structural complexity of datasets, or the amount by which it is non-linear. The datasets are mostly very linear but with instances of very arbitrarily structured ...
3
votes
2answers
78 views
Noisy linear relationship: Can the functional form be known?
Let's say I know the relation between x and y is linear yet noisy. Given a noisy (x,y) ...
1
vote
1answer
104 views
Solved Assumptions of Linear Regression [duplicate]
I am a bit confused with this.
Independence - The response variables are independent. I only have a single response variable so OK? Or observations are independent of each other? E.g Auto Correlated ...
8
votes
2answers
297 views
Where do the assumptions for linear regression come from?
I'v already known that there are several assumpations when using linear regression model. But I cannot understand why some of them exists. They are:
independent errors
normal distribution of errors
...
0
votes
1answer
89 views
Dropping a variable from a multiple linear regression model, causes another to become non-significant [duplicate]
Suppose we have a regression model that measures college Grade Point Averages. The variables that we are using are hsize (the size of the graduating class in ...
0
votes
1answer
103 views
Regression on means of log-transformed variables
Suppose that I want to study the relationship between two variables $Y$ and $X$ using the linear model $Y \sim X$. Unfortunately, both $Y$ and $X$ are not normally distributed, say they are both ...
0
votes
1answer
37 views
Fitting models in R with time restriction on coefficients
How should I define a model formula in "R", when one (or more) exact linear restrictions binding the coefficients is available.
Equation: y = b1*x1 + b2*x1
where y = b1*x1 for t < t1 and y = ...
0
votes
0answers
76 views
Details of Bayesian linear regression
In Bayesian Linear Regression, we have a data set with {$x_{i}$, $t_{i}$} where $x_{i}$ are input vectors and $t_{i}$ are their resulting observations. We want to find a vector $\bf{w}$ in order to ...
0
votes
0answers
13 views
Y v level for different additives; how to handle zero level
I want to model the effect of Level (continuous) of different Additives (categorical) on Y (continuous) by fitting a linear model, so my data is going to look like this:
...
0
votes
2answers
84 views
Do we need Overlap/Common Support in case of a parametric regression?
If I want to make a causal statement based on selection on observables. One typically assumes "Common Support" (/"Overlap") - which means that for any value of the confounding variables X a unit i can ...
5
votes
3answers
293 views
Perform linear regression, but force solution to go through some particular data points
I know how to perform a linear regression on a set of points. That is, I know how to fit a polynomial of my choice, to a given data set, (in the LSE sense). However, what I do not know, is how to ...
3
votes
1answer
131 views
Why does the rank of the design matrix X equal the rank of X'X?
Why does the rank of the design matrix $\boldsymbol X$ equal the rank of $\boldsymbol{X'X}$? Is this true in all circumstances?
If X is not linearly independent, what would the rank of X'X be?
0
votes
0answers
33 views
Estimable function of OLS parameters can be shown by inner product with Null space?
I am in a advanced linear models class, and we are currently covering estimable functions. The criterion that we have for an estimable function is that for any $a^T\beta$ there exists an unbiased ...
0
votes
0answers
47 views
Which models should be compared when using the regression formulation of multi-way ANOVA?
I dithered about whether to post this on Stack Overflow or here, but I think the question is more ideological than practical, so please forgive if there's too much technical detail!
I'm trying to ...
2
votes
1answer
109 views
Should I include an interaction term for a covariate if I expect it to be correlated with one or more of the variables?
I'm fitting a linear model where the response variable is a measure of physical performance-- running speed for example-- and the predictor variables are sex and drug treatment, with an interaction ...
3
votes
2answers
159 views
Troublesome residual plot from linear mixed model
I have fitted the following linear mixed model based on the results of an economic game:
lmer(TotalScore~perOOgivenP+Game+(1|Subject),REML=T,data=mdl1table)->m1
...
0
votes
1answer
70 views
Reducing the dimensionality of a problem
My particular application needs me to build a linear model with a strong correlation structure amongst the independent variables. The dimensions of the problem are high, for instance 1million X 200. ...
4
votes
1answer
107 views
Why arrange variables by causality in bivariate regression?
Suppose we have variables $(X,Y)$ and we have theory tell us that $X$ $\overset{\text{cause}}{\implies} Y$. Perhaps they're time-series variables and it would be common to see something like this:
...
1
vote
0answers
107 views
What are the conditions where we can regress non-stationary variables?
Obviously there are certain spots where it's okay to include a non-stationary predictor variable in a linear regression model. For example, a dummy variable interacted with a stationary variable must ...
16
votes
3answers
513 views
Fast linear regression robust to outliers
I am dealing with linear data with outliers, some of which are at more the 5 standard deviations away from the estimated regression line. I'm looking for a linear regression technique that reduces the ...
0
votes
2answers
533 views
How to derive the least square estimator for multiple linear regression?
In the simple linear regression case $y=\beta_0+\beta_1x$, you can derive the least square estimator $\hat\beta_1=\frac{\sum(x_i-\bar x)y}{\sum(x_i-\bar x)^2}$ such that you don't have to know ...
2
votes
0answers
60 views
Linear regression for samples of varying sizes
I have a data set of code patches and the bugs they produce. I'm using ordinary least squares to find a line which predicts bugs based on some attributes about the patch, such as the department which ...
0
votes
0answers
37 views
Cell Means Model Property
Could anybody demonstrate or direct me to a readily available proof of the following:
For the cell means model:
$$ y_{ij} = \mu_{i} + \epsilon_{ij},\ \text{ for }\ i = 1, \ldots, r\ \text{ and }\ j ...
3
votes
2answers
99 views
Unable to figure out right transformation
I have obtained some data about how complexity of Java open source projects varies with time. I want to fit a curve to the data, however I am unable to figure out the right kind of transformation. I ...
1
vote
1answer
98 views
Modeling Outliers of Normal Distribtuion
I am using a linear model to predict under-nutrition in children under 5. The common metric discussed is stunting (a binary outcome) which is defined as being more than two standard deviations away ...
1
vote
0answers
112 views
Variance decomposition in linear regression model
Consider the linear model $y = \mathbf{X}\mathbf{\beta} + \epsilon$.
The residual variance-covariance matrix is given by $\text{Var}(\epsilon)$.
Greene's textbook* states that:
$$Var(\epsilon) = ...
0
votes
1answer
36 views
What is it that's expected from the operation
I've got a regression model and I've got 12 observations. So, I could and I did create the matrix. I also calculated the OLS estimator. But my professor's question is to find X and Y. I'm new to stats ...
0
votes
0answers
61 views
Should I normalize for internal standard by taking residuals or by including the standard in the model?
I have some mass-spectroscopy data from several dozen samples, with the abundance of 60 compounds reported for each sample. Four internal standards were run with each sample, and their abundances are ...
1
vote
0answers
45 views
Derivative of $H$ with respect to $W$ when performing generalized linear squares
I am trying to solve a generalized linear squares model with the following form:
$\hat{Y}= X(X'\Omega^{-1}WX)^{-1}X'\Omega^{-1}WY $
$ H= X(X'\Omega^{-1}WX)^{-1}X'\Omega^{-1}W $
$ \Omega$ is the ...
1
vote
3answers
494 views
How to evaluate results of linear regression
I have a linear regression problem. In short, I have a dataset, I divided it into two subsets. One subset is used to find the linear regression (training subset), another is used to evaluate it ...
1
vote
2answers
3k views
What is the “root mse” in stata?
I have a question that has been confusing me ever since I took econometrics last year. What does the "root MSE" mean in stata output when you regress a OLS model?
I know that it translates into "root ...
1
vote
1answer
49 views
Linear contrast OLS - Simultaneous
I fit the following linear model using OLS, where $X_{5}$ and $X_{6}$ are both dummy variables and the rest are continuous:
$Y=\beta_{0} + \beta_{1}X_{1}+ \beta_{2}X_{2} + \beta_{3}X_{3} + ...
1
vote
1answer
116 views
Trend of a few time points
Suppose we are given a matrix of many rows (different genes for example) and few columns (different time points) and we want to identify the top rows (genes) that are following a trend, like ...
2
votes
1answer
401 views
When do we use the Durbin-Watson test?
Isn't this test for the determination of auto-correlation of residuals only necessary when time is some sort of a factor in the observed variables?
As it is I had a data-set that had one dependent ...
3
votes
5answers
276 views
Conversion between units of measurement
I have two different measuring instruments, A and B, both measure the same physical quantity but with different unit of measures: $u_A$ and $u_B$.
A is a reference instrument.
I measured a reference ...
5
votes
2answers
258 views
Why does log likelihood function for a model use SSE/n and not SSE/df?
I'm trying to find out how log-likelihood function works for linear regression. I found the formula here and here. Making some experiments with it (see code below), I was quite surprised that the ...
0
votes
0answers
66 views
Deciding which covarates should be log-transformed, before model is done?
I understand that a good way to see if the covariate should be transformed is to do a linear model and plot the residuals. if there is a pattern, a log-transformation may be needed.
but.. I am right ...
4
votes
3answers
252 views
Simple introduction to linear models in R
It was hard for me to understand linear models in R. There are a lot of documents for the case, but many of them are technical manuals rather than teaching the concept.
I found this article really ...
0
votes
2answers
361 views
Implementation and Interpretation of Fixed versus Random Effects
I am reading an article which uses a simple least squares model to measure the effect of a prevention campaign on methamphetamine use (http://www.ncbi.nlm.nih.gov/pubmed/20638737). In its second ...
3
votes
3answers
1k views
Does lm() use partial correlation - R Squared Change?
I come from an SPSS background and am attempting to move to R for it's superior flexibility and data manipulation abilities. I have some concerns however as to ...
3
votes
2answers
350 views
Why does $\overline{y} = \hat \beta_{0} + \hat \beta_{1} \overline{x}$ in simple linear regression?
Today, once again, I observed that the dependent variable was predicted to be its mean when the independent variable was set to its mean in simple linear regression.
Let $(\hat{y},\hat{x})$ be ...
1
vote
2answers
193 views
How do I estimate a differences in differences model when the dependent variable has many zeros?
Is there any way to run an OLS difference in differences model when the dependent variable (investment) has lots of observations which are truly zero?
I don“t know how to add clarifications. My ...
1
vote
2answers
292 views
What terms should I include in a linear regression model?
Consider the following OLS output. My question is: If you have to define a linear equation from the regression, do you then only include significant variables? If so, the equation according to the ...
2
votes
1answer
169 views
Attempting to define linear weights for Goals scored in the English Premiership
I'm very keen on sports and am just starting to understand how I can start to apply maths to sports related problems and issues. I'm keen to get some pointers in the right direction for the linear ...


