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
Make your voice heard. Take the 2019 Developer Survey now

Questions tagged [regression]

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

0
votes
0answers
8 views

How to identify Post Treatment Bias?

I have a question about post-treatment bias. I'll use the following example: Let's say I created a multivariate regression model for how many points a basketball player will score at a given night. ...
0
votes
1answer
28 views

Is it possible to find Normalized Root Mean Square Error (NRMSE) of Root Mean Square Error (RMSE) in R?

I have code in R that calculates the RMSE from a Linear Regression model: ...
0
votes
1answer
15 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
27 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
1answer
15 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
2answers
28 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
2answers
27 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
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 ...
1
vote
2answers
49 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 ...
2
votes
0answers
19 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
0answers
14 views

Regression in R [on hold]

I run a script, but R give me a message: ...
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
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: ...
0
votes
0answers
6 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 ...
2
votes
1answer
89 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 ...
3
votes
1answer
127 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
5answers
90 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
16 views

Comparing OLS regression coefficients with SUR in SAS

I have the following code in Stata that I'm looking for the equivalent in SAS. Stata code: ...
1
vote
0answers
40 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 ...
0
votes
0answers
14 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
0answers
10 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
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
22 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 ...
0
votes
1answer
41 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 ...
0
votes
0answers
9 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
13 views

Variance inflation factors for time series

R code: I got an error by using vif function. ...
1
vote
1answer
36 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
1answer
33 views

R: What's the right way to add an interaction term in lm()? [closed]

I'm working with the Carseats data. I'm making a model to predict the sales of Carseats and I'd like to make an interaction term with Price and Competitor Price. Is it as simple as ...
0
votes
0answers
15 views

How would I figure out - TSS of Y, Yi and XiYi from the following information?

I came across an analogous question when revising and have no clue how to approach it. The Given information is ΣXi= 20, ΣYi=40 Σ(Xi-x̅)²= 40, Σ(Xi-x̅)(Yi-nȳ)=20 and n=20. The question requires ...
2
votes
0answers
18 views

Interpreting the estimate of an ordered factor in regression

I have an output from a lm() object that has ordered factors. ...
0
votes
0answers
16 views

Plot a regression equation with mean standard error [closed]

I would like to plot values from the image from a model regression, with R. eqn = function(x){ZZZ} curve(eqn, from=0, to=50, n=100)
1
vote
1answer
20 views

Is there an upper bound on number of logistic regression responses that yield infinite estimates

Suppose a logistic regression problem has N observations of {0, 1} and that there are p parameters. Also assume the design matrix, X, is full rank with p < N. We know that there will be certain ...
0
votes
0answers
10 views

Variable as confounding if it influences other factors in opposite directions?

I examine the relationship between population density (PD) and the insurance density (ID) taking into account different market exploitations (ME) of an insurance company in municipalities. The ...
0
votes
1answer
30 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 ...
3
votes
4answers
86 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 ...
1
vote
0answers
8 views

Including baseline measure as control variable for DV and IVs when testing the effect of change on change

I am attempting to run an OLS regression: A cooking intervention resulted in increases in vegetable intake compared to control after 12weeks. There were no differences in motivation between control ...
0
votes
0answers
10 views

Machine Learning Model Selection for discrete inputs and continuous outputs [closed]

If you have a lot of categorical inputs and a continuous output, what type of machine learning/regression model are suited for that? Thanks!
2
votes
2answers
69 views

What's the point of polynomial regression?

I understand that, ostensibly, polynomial regression is useful for extending the linearity assumption in least squares regression. It can model nonlinear relationships between a predictor and response....
1
vote
0answers
13 views

p-value of Covariate differs between Regression and ANCOVA

I'm using SPSS to run a regression analysis in order to predict navigational performance (continuous dependent variable) from self-assessment scores (continuous predictor), sex and age group (both ...
0
votes
0answers
19 views

Fitting 2-dimensional data with LASSO?

I have a problem where I need to fit two-dimensional data. The matrix is of size 10x1000, where the rows correspond to discretely measured time points, and the columns correspond to measured spectra ...
1
vote
0answers
26 views

Validating a model built on multiple regressions

I have a program that models suspended sediment concentrations (SSC) using turbidity as a predictor and lab derived sediment concentrations as the response. The relationship between the two can ...
1
vote
0answers
32 views

Which is the right way to handle imbalanced data in a regression problem?

I'm working on a regression problem with imbalanced data, and I would like to know if I'm weighting the errors correctly. I'll try to illustrate the concept with a simple example. Imagine I'm ...
0
votes
0answers
18 views

What is the consequence from building polynomial regression with multiple ind. variables?

I'm exploring polynomial regression. I understand how to execute it for cases with one independent variable. What about cases with multiple independent variables? I'm working with the boston housing ...
0
votes
0answers
9 views

How to understand “controls” in matching versus regression

I'm trying to understand matching in comparison to regression, especially how using 'controls' in regression changes in matching. The part I don't understand is about the distribution of covariates ...
1
vote
1answer
47 views

How do I use principal components as predictors in linear regression?

I followed the instructions from this open Stanford lecture on PCR. I have a couple of questions, but first I'll post the code with my comments. ...
0
votes
1answer
34 views

What are the diagnostic measures for linear regressions?

I am working with the BostonHousing dataset. I have created a number of models and I'd like to select amongst them. ...
0
votes
1answer
19 views

Regressing a response on predictors at a lower level of aggregation: combined election and survey data

Combining two secondary datasets, we are interested in finding out the effect of political outcome variables (e.g. mayor's party and percentage of vote) at a low administrative level (e.g. township) ...
0
votes
1answer
44 views

R: What does train() do when it calculates ridge regression?

I am running ridge regression on the Boston dataset. There are many write-ups online for how to do ridge regression. I will write up the two methods and then pose my question Initialize with the ...
1
vote
0answers
13 views

Different model result with log-transformed vs. original dependent variable in linear mixed model [duplicate]

I fit my data with linear mix model using y and log-transformed y like below: ...