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
10 views

Regression in R [on hold]

I run a script, but R give me a message: ...
0
votes
1answer
8 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
21 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
4 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 ...
1
vote
2answers
74 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
47 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
4answers
37 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
0answers
11 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
11 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
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
1answer
25 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
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 ...
0
votes
0answers
8 views

Recommended references for R-squared and/or adjusted R-squared

I need some solid references that discuss the meaning and interpretation of R-squared and adjusted R-squared in linear regression. For example, I want to learn more about when a low adjusted R-squared ...
0
votes
1answer
30 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
7 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

Variance inflation factors for time series

R code: I got an error by using vif function. ...
0
votes
0answers
21 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
32 views

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

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
14 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
16 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 [on hold]

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
18 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
8 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
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 ...
2
votes
2answers
42 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 [on hold]

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
64 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
15 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
25 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 ...
0
votes
0answers
42 views

customized loss function

I am trying to solve a regression problem. Problem statement: Imagine that I have to predict for how long a machine will be out of order given its status when it breaks. Imagine also that you want to ...
1
vote
0answers
29 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
7 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 ...
0
votes
0answers
32 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
33 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
35 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: ...
2
votes
2answers
56 views

Does sampling from a large dataset lead to correct inferences?

Say we have some population, and we obtain a "representative" random sample of that population, $(y_i, x_i)_{i = 1}^n$, where $n$ is very large (millions) and $x_i = (x_{i1}, x_{i2}, ... x_{ip})'$ is ...
0
votes
0answers
7 views

Using a Linear Plateau Model

I want to see on which day injury healing plateaus using the following data (example): ...
0
votes
0answers
13 views

Bootstrapped linear regression with unbalanced factors

I am investigating the relationship between Valence ratings (continuous response variable) and Condition (4-level factor) as ...
0
votes
1answer
33 views

I am making a logistic regression model. Should I test for multicollinearity in dependent features if my predicting feature in categorical?

I have a doubt, will multicollinearity affect my Logistic Regression model as my predicting(output) feature is categorical? (because correlation will make sense only for 2 continuous features and not ...
0
votes
0answers
9 views

Least squares and identificability condition

Let a discrete-time system (which is minimal) with input $u \in \mathbb{R}^m$ and state $x \in \mathbb{R}^n$ be $ x_{k+1} = [x^T_k \quad u^T_k]\begin{bmatrix} A^T \\ B^T \end{bmatrix} + v^T_k $ ...
0
votes
1answer
13 views

How to report results from Leave One Out Method

I have a question regarding Leave One Out Cross Validation (LOOCV): When I use the method, I will have several regression outputs, one for each individual in my sample. How is this usually reported? ...
0
votes
0answers
21 views

Prediction and Causation in regression

Several months ago I encountered this article To Explain or to Predict of Shamueli (2010). This article pointed out that the focus of regression can be on causation/explanation or prediction but, at ...
0
votes
0answers
12 views

Piece wise Polynomial Regression [duplicate]

It's wide known that for polynomial interpolation Chebyshev sites (as knots) are almost optimal, we can show that using those the Lebesgue constant is near to the lower bound. Is that claim also ...
1
vote
1answer
42 views

How to to get normal distributed neural network output [on hold]

I am trying to build a neural network that predicts a pair of latitude / longitude coordinates following a previous pair of latitude and longitude (highly simplified). The latitudes and longitudes ...