Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [regression]

Techniques for analyzing the relationship between one (or more) "dependent" variables and "independent" variables.

0
votes
0answers
4 views

How to calculate accuracy of Linear Regression graph in R?

What is the function to calculate the accuracy of the Prediction linear regression model against the Actual model? ...
0
votes
1answer
6 views
1
vote
2answers
21 views

Show reg y on x in $y_{it} = \beta x_{it} + \theta_{i} + \epsilon_{it} \equiv y_{it} - \bar{y_{I}} = \beta(x_{it} - \bar{x_{I}}) + \epsilon_{it}$

So I'm trying to show that regressing y on x in this case (fixed effects model): $y_{it} = \beta x_{it} + \theta_{i} + \epsilon_{it}$ is the same as this regression: $y_{it} - \bar{y_{l}} = \beta(x_{...
0
votes
0answers
4 views

pymc3: acceptance probabilities and divergencies after tuning

I coded two models in pymc3, which I thought are quite simple. Logistic Regression The first is a logistic regression in an experiment that models correct and wrong answers for specific tasks in a ...
0
votes
1answer
13 views

Constructing 3-way ANOVA when design is not fully factorial

I have conducted an experiment measuring individual sizes as a function of two categorical variables (A and B), each with three levels (1, 2, 3). The combination A3:B3 is a control group. This ...
1
vote
2answers
315 views

Likelihood ratio test on a single model

If i were To perform a likelihood ratio test where I compare two models A and B I would basically try to find out which of these models are the better one of these models fits the data best. But if i ...
1
vote
1answer
24 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 ...
1
vote
2answers
38 views

Do these standardized residuals show heteroskedasticity?

I'm practising in the individuation of heteroskedasticity from the standardized residuals. I know that, if the time series is homoskedastic, the spread of the residuals should be constant and random ...
0
votes
1answer
53 views

proof of the r.m.s Error of regression formula

can anyone give me the proof that the RMS error for the regression of y on x will always be the square root of 1 minus the correlation of y on x, times the SD of y? I know the intuition behind it. ...
0
votes
2answers
296 views

R question about regression and cross-validation (different p-values for each)

I have an R question. I'm wondering why there is a difference in p-values in the original regression analysis using lm versus in the k-fold cross-validation using the DAAG package. So, first I run ...
4
votes
3answers
3k views

Why do we use conditional expectation vs regular expectation in regression?

What is the significance of using conditional expectation $E(Y \mid X=x)$ in regression and not just use the regular expectation $E(Y)$. What will be the consequence if we use $E(Y)$ instead? Can we ...
1
vote
1answer
12 views

Why is the conditional expectation the best predictor but only if we have the joint distribution?

If we want to predict one variable $Y$ based on another $X$, the best predictor is apparently $\mathbb{E}[Y \mid X = x]$. However, this apparently assumes two things: The distribution is symmetric. ...
0
votes
0answers
6 views

SPSS cox proportional hazard model adjusting for age

I'm using SPSS to run cox proportional hazard model. I've five different groups and I need unadjusted and adjusted (for age) HR for all of them separately. My first group is a reference group. I've ...
1
vote
1answer
34 views

How do you select the best from a number of linear models?

I'm learning linear regression with the Carseats data set. I went through the data, cleaned it, encoded the dummy variables and checked for collinearity. The dataset has 400 observations on Carseat ...
0
votes
0answers
2 views

GWAS genotype/phenotype datasets for supervised learning model testing [on hold]

I'd like to play around with several ML models and test their predictive power using some good datasets. I need datasets of genotype (a set of SNPs) and phenotype (some trait). If possible, I'd ...
0
votes
1answer
36 views

Derivation of Formula for linear regression with data points forming a circle

Suppose we have one dimensional data with following conditions.1. The value of this single feature lies in the closed interval [-a,a].2. The associated target value with each data also lies in the ...
24
votes
4answers
17k views

What is the relationship between regression and linear discriminant analysis (LDA)?

Is there a relationship between regression and linear discriminant analysis (LDA)? What are their similarities and differences? Does it make any difference if there are two classes or more than two ...
2
votes
0answers
16 views

Is my interpretation correct for these residuals plots?

In preparation for my exam, I'm trying to interpret the residuals in order to understand if the time series has been modelled correctly. Otherwise, I have to suggest an improvement. Here is the text: ...
0
votes
5answers
75 views

How do I handle terms with collinearity?

I'm working on a regression model with the Hitters data from the ISLR package. It has ~300 observations and 20 variables. I want to predict a player's salary. I have major problems of collinearity ...
0
votes
1answer
11 views

Composite Variables

I am getting a little confused with the idea of composite variables. If you have a bunch of (hyptertheical) features for house price regression such as #rooms, location, proximity to school, house ...
0
votes
0answers
14 views

Regression in R [on hold]

I run a script, but R give me a message: ...
0
votes
1answer
27 views

How can I make simulated logistic regression model more noisy?

When I want to simulate Y coming from the linear regression model, $$Y_i = X_i ^T \beta + \epsilon_i,$$ I can use code like: ...
3
votes
1answer
303 views

AIC - different values based on different R functions

I am a beginner in the whole forecasting/regression/time-series topic. While reading "Forecasting: principles and practice" from Rob J Hyndman and George Athana­sopou­los i found something strange. <...
0
votes
1answer
301 views

Sum of residuals squared

How can I write the sum of squared residuals as a function of the sample mean and variance of $y$, given that the regression equation is: $y = \beta_0 + \beta_1(x-\bar{x}) + \epsilon$ where $\bar{x}$...
1
vote
1answer
305 views

Proof of correctness of normal equation

I was taking an online course and saw linear regression being by gradient descent The intuition behind why the method would work seemed plausible. I tried understanding normal equation as to why ...
2
votes
2answers
79 views

Is it valid to iterate over every permutation of a regression specification and compute an “average significance?”

I had an idea, and was wondering if it's ever done and, if so, how to do it in an appropriate manner. Let's say I run an OLS model and the results come back significant. There is discussion as to ...
0
votes
0answers
5 views

Pruning out specific nodes within an rpart tree [on hold]

I have generated a simple tree using the rpart() function (shown below), however I would like to be able to stop the second split at 'Petal.Length < 4.9' before it splits by 'Petal.Width', however ...
0
votes
0answers
50 views

Why do we even bother running regression models?

I'm working through regression with Intro to Statistical Learning by Hastie, Witten, James and Tibshirani. They break down regression into stages: data cleaning and processing, model building and ...
0
votes
0answers
4 views

Create an index tracking belief-change “moderation”

Let's say I ask participants to evaluate, on a scale from 0-100 (with 0 representing "completely disagree" and 100 representing "completely agree) the extent to which they believe a number of ...
0
votes
1answer
26 views

Linear Regression For Binary Independent Variables - Interpretation

I have a dataset where I want to predict inflow (people joining a platform) but my all independent variables are binary categorical (0,1). Whereas I want to predict continuous variable (inflow -- ...
0
votes
0answers
9 views

Strategy & interpretation for investigating possible interaction between continuous & categorical variable

I am working with glm in R. My predictors are one continuous variable (X_conti) and one categorical variable (...
0
votes
0answers
13 views

Help with fitting a panel regression model

How can I fit a panel model in which the outcome of interest, i.e., the dependent variable is at the county level and one of the explanatory variables is at national level? (e.g. The effect of a ...
0
votes
1answer
353 views

Logistic regression with r and stata [on hold]

I ran the same Logistic regression with R and STATA. The regressors include many dummy variables. In R, the code I used is ...
0
votes
1answer
307 views

Regression analysis with non-integer event rates

I am working as part of a team on a large dataset which has been subject to imputation analysis. One of my colleagues has pointed out that the when carrying out regressions that can provide odds ...
1
vote
2answers
67 views
+50

Bayesian inference for non-Gaussian errors

Following from a previously unanswered question, regression tasks involving measurements with normally distributed noise apply Gaussian processes. But are there any recommended approaches for ...
0
votes
0answers
16 views

MultiTaskLasso vs. Lasso with dummies

I am trying to do a Lasso regression, where one of the features is a categorical string e.g. suppose we have Price,Year,Make for a car. One option would be to use one-hot encoding for Make, and do ...
2
votes
1answer
423 views

What should be called a linear regression? [duplicate]

I've always been puzzled by the discrepancy between several possible terminological uses for such a basic thing as "linear regression": A certain number of sources just say it corresponds to the ...
1
vote
1answer
119 views

Joint posterior distribution of $(\mu,\sigma^2)$ in the Normal model

Find the joint posterior of $(\mu, \sigma^2)$ given Normal data. I've found the joint prior of $\mu$ and $\sigma^2$ (where $\displaystyle\sigma^2\sim\chi^{-2}(v_o,v_os_o^2)$ and $\mu|\sigma^2\sim N(\...
12
votes
2answers
1k views

Gradient descent doesn't find solution to ordinary least squares on this dataset?

I have been studying linear regression and tried it on below set {(x,y)}, where x specified the area of house in square-feet, and y specified the price in dollars. This is the first example in Andrew ...
0
votes
1answer
27 views

Lag regression independent variables in dynamic panel: which Explanation of the signs? [Resolved]

In the famous paper " Richard Blundell & Stephen Bond (2000): GMM Estimation with persistent panel data: an application to production functions, Econometric Reviews, 19:3, 321-34" the authors ...
0
votes
0answers
17 views

Machine learning to detect wear on a machine axis

I have a machine that moves with one axis in the same direction (basic position A to end position B). While driving, the torque is measured and recorded every 10 milliseconds. This looks something ...
221
votes
2answers
151k views

Interpretation of R's lm() output

The help pages in R assume I know what those numbers mean, but I don't. I'm trying to really intuitively understand every number here. I will just post the output and comment on what I found out. ...
1
vote
0answers
32 views
+50

Accounting for errors in independent variable through Gaussian process regression

In Gaussian process regression (GPR), one applies a kernel (i.e. covariance function) to describe the similarity between observed and predicted data in the domain. The diagonal of the covariance ...
0
votes
1answer
340 views

How to deal with non-uniform data density in regression?

I have a program that can detect an object in an image. It will either output a confidence in [0, 1], or "no detection" (which can be interpreted as 0 confidence). I have collected a bunch of images ...
0
votes
0answers
8 views

Multivariate Adaptive Regression Splines interpreting hinge coefficients

I am learning MARS using the earth package in R. I read about MARS on page 321 of The Elements of Statistical Learning https://web.stanford.edu/~hastie/Papers/ESLII.pdf and the tutorial here http://...
0
votes
0answers
11 views
24
votes
6answers
11k views

What's the difference between logistic regression and perceptron?

I'm going through Andrew Ng's lecture notes on Machine Learning. The notes introduce us to logistic regression and then to perceptron. While describing Perceptron, the notes say that we just change ...
0
votes
0answers
50 views

Solved : L1 norm approximation for the regression ||Ax-b||_1, using CVXOPT solver [closed]

I'm trying to solve a $\ell_1$ approximation regression problem wherein I'm creating a sketch of the matrix $A$ $(n \times d)$, where $n\gg d$. $b$ = A$\beta$ + $\in$. where $\in$ is coming from $\...
7
votes
2answers
2k views

Can $R^2$ be greater than 1?

The Wikipedia page on R2 says $R^2$ can take on a value greater than 1. I don't see how this is possible. Values of $R^2$ outside the range 0 to 1 can occur where it is used to measure the ...