# Tagged Questions

51 views

### How can I remove a variable from a linear regression?

Let's say I have the following multivariable linear regression: y = A x + b, x being a vector of many variables. Is it possible to remove a specific variable x with non-null coefficient in a way the ...
23 views

### Residual plot for simple linear regression

I'm trying to analyze a part of European Social Survey data. The outcome has to be treated as continuous, however it can take only discrete values from 1 to 6. The predictor variable is age. I fitted ...
53 views

### Differences in power in regression versus mean of a ratio

I've been futzing around with the following example, and feel that there must be a good explanation or reference that I am blindly missing. Supposer you have a linear relationship between two ...
105 views

### Linear/Non-linear Regression - SPSS

Hopefully somebody will be able to shed some light on my SPSS problems! I have been given 65 values. 57 of these data values are quarterly results and 8 are the holdback data to be used. I have to ...
49 views

### symmetry of linear regression

Consider the following linear regressions on two sets of data x and y (of same length) y=ax x=by As you know, the usual optimisation by OLS is usually not giving (at all!) b=1/a This is because ...
137 views

### Inequality of elements of hat matrix

We have a linear model \begin{align} Y=X\beta + \varepsilon \end{align} where $X$ is $n \times p$ ($n > p$) matrix of full rank. All assumptions of linear model hold. I have to prove inequality ...
47 views

### Does full subset selection regression model building suffer from the same handicaps as stepwise regression?

Let's assume $p$ potential predictor variables $X_1,...,X_p$ and a single dependent variable $Y$. Now I evaluate the performance of all possible linear models considering all possible combinations of ...
78 views

### Does stand-alone dummy variables in linear regression models make sense?

Dummy (or binary) variables ($X_2$) can be used in linear regression models to help explaining a possible group effect that a continuous predictor variable ($X_1$) might present in explaining the ...
107 views

### Fit a regression line by using MATLAB

I have the following data ...
98 views

### Linear regression with independent variables with varying proportions

I am looking to do a linear regression on two independent variables that will be present in varying proportions. For example trying to do a linear regression on $Y$ which is payment behavior (payback ...
145 views

### Best way to visually present relationships from a multivariate linear model

I have a linear model with about 6 predictors and I'm going to be presenting the estimates, f values, p values, etc. However, I was wondering what would be the best visual plot to represent the ...
39 views

### Show that the cross-product term $\hat y'r$ from $y'y$ is 0 [duplicate]

Show that the cross-product term \hat $y'r$ from $y'y$ is 0. I see that $y'y = ( \hat y + r)'( \hat y + r) = \hat y' \hat y + \hat y'r + r' \hat y + r'r$ But not sure what identity can be used here ...
54 views

### Determine linear relationship between input and output with multiple input variables

Say that your input variables are in $\mathbb{R}^2$ with a univariate output variable. Say that you want to determine whether the output variable is a linear combination of the input variables. If ...
42 views

### Comparing means for 2 sets of (paired?) data

N patients with N samples from site A and N from site B (before and after treatment). In both sites we find 1-4 microbes, which are tested for antimicrobial susceptibility to obtain MIC values. I ...
74 views

### Using exploratory data analysis

I am trying to use exploratory data analysis to decide which model to use with my data for prediction either linear regression/neural networks etc, basically I am focusing on linear and non linear ...
141 views

### Jeffreys prior for linear regression model

Consider the linear regression model $${\bf y} = {\bf X}\beta + {\bf e},$$ where ${\bf y}$ is an $n\times 1$ vector, $\beta$ is a $p\times 1$ vector, ${\bf e}$ is an $n\times 1$ vector. Assume also ...
51 views

### Confusion related to linear regression

I learned a linear regression model with some input xs and output ys. My ys are always positive. However, now when I test the model on my test data, I get negative values for ys. I know I can either ...
221 views

### Regression with correlated explanatory variables

I have variables of the following kind (coded in R): ...
189 views

### Python packages for numerical data imputation [closed]

I am working with multivariate numerical data with a lot of missing values (so dropping all entries or columns with missing data is not an option). Is there a Python package for data imputation? I ...
44 views

### What are typically encountered condition numbers in social science?

As part of my thesis, I'm proving (or attempting to prove...) a few asymptotic results. Because these results depend on the condition number, I'd like to have some idea about the typical sizes of a ...
146 views

### How to test whether linear models fit separately to two groups are better than a single model applied to both groups?

My question is how to tell if two regressions explain the data better than one. Let me be more concrete with an example (which I'm making up as I go, it's not meant to be plausible). Say I'm ...
124 views

### Difference between effect size (partial $R^2$) and coefficients

I am working with spoken language data and use linear models do determine the relationship between different phonological processes in my data. Background Measures of the regularity of syllable ...
118 views

### What extra properties does assuming errors are iid have compared to assuming errors are uncorrelated and common variance

In linear regression model, the means of the errors are assumed to be zero. Furthermore, we can assume either that the errors are uncorrelated and have the same variance, or even that the errors are ...
87 views

### Assumptions in general linear model and in multivariate linear regression model?

I am reading Wikipedia and some notes I found online, and still not very clear about their definitions. Both the general linear model and the multivariate linear regression model assume  Y = X\beta ...
72 views

### Conceptual explanation of regression coefficient?

I understand, mathematically, how to get the estimates of coefficients in ordinary least squares. What I am struggling with is coming up with a conceptual, geometric explanation for the correlation ...
80 views

### Using percentiles as predictors - good idea?

I am thinking about a problem which is to predict log(spend) of a customer using linear regression. I am considering what features to use as input and wondering if it would be OK to use the ...
118 views

### Log likelihood improves with addition of a nonsignificant variable

In this question I asked about changes to AIC when adding a variable. It turns out to be partly due to the way SAS figures AIC. However, I now have two models where the log likelihood improves a lot: ...
276 views

### (Why) do overfitted models tend to have large coefficients?

I imagine that the larger a coefficient on a variable is, the more ability the model has to "swing" in that dimension, providing an increased opportunity to fit noise. Although I think I've got a ...
83 views

### Linear regression simulation

I would really appreciate if someone could help me with this question. I want to simulate $n$ datasets in R with eight predictors where $β=(3,1.5, 0, 0, 2, 0, 0, 0)$ and the pairwise correlation ...
120 views

### F test and t test in linear regression model

F test and t test are performed in regression models. In linear model output in R, we get fitted values and expected values of response variable. Suppose I have height as explanatory variable and ...
93 views

### Fraction of variance unexplained and R-squared in linear and non-linear regression

I have a non-linear model of the following form: $y = a*x^b$ I can fit it using logarithms and a linear model or directly with a non-linear model. First approach, logarithms and linear model: ...
87 views

70 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 ...
506 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 ...
19 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 ...
82 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 ...