Stack Exchange Network

Stack Exchange network consists of 175 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.

-1
votes
0answers
14 views

Can a coefficient technically operate as a test statistic?

This is somewhat pedantic, but a debate I've had is whether a regression coefficient can technically operate as a test statistic. It's not being claimed that this is the normal setup or a better way ...
-1
votes
0answers
5 views

Code for creating a Bayesian linear regression model [on hold]

I need codes in either C++, Java or python to create a Bayesian linear regression from the scratch, not implementation in form of already created package, but something I can use to create a package, ...
0
votes
0answers
6 views

Get estimates about 'variable importance' across a large number of variables and combinations

My client would like to know which, of many different kinds of product dimensions, are most important for perceived quality. Some of the dimensions are as follows: price, material, country of origin, ...
0
votes
0answers
3 views

Using random forest to generate interaction terms for linear regression

What I want to do is: Setting random forest's each tree to be very shallow, probably 2 levels, or 3. Then I will create 100 trees. After that, I will use each tree's result as a predictor, and then ...
0
votes
0answers
8 views

Two group clustering in residuals - not sure how to fix

My only really significant finding in this study has strange residuals - two clusters. It's a study of the treatment effect of education on psychological capital pre vs. post-test, so I'm assuming the ...
0
votes
0answers
8 views

Formating input for LSTM (using Keras)

I am working on a problem that predicts temperature and velocity profile along the length of a chamber based on its input values. I want to build a model which works as follows: Feed to network: <...
0
votes
0answers
6 views

partial plots or added variable plots

Suppose we have the following regression model: y = b0 + b1*X1 + b2*X2 + error1 (1) The partial regression plot or added variable plot of x1 is (i.m.h.o.) constructed as follows: regress y on ...
0
votes
0answers
11 views

How to create a ROC curve for a model which has log of odds as response?

I have a question on plotting ROC curve for my model which has log of odds as the response. For example: model<-lm((ln(y/1-y)~Temp+RH+DmaxT, data=fit) #'y' is a proportion Predicted response was ...
0
votes
0answers
8 views

Intercept in demeaned and rescaled regression model

Suppose I have a linear model; $Y=X\beta+\epsilon$ Where $X$ is $(n \times p)$, with the first column of $X$ being an intercept column (consisting only of ones). Now suppose I construct $\tilde{X}$ ...
2
votes
0answers
8 views

F-test equivalent for residuals from robust regression

I'd like to compare fits for two datasets that have clearly non-normal errors. Is there a way to compare nested models fit with robust regression?
0
votes
0answers
6 views

Comparison of paired count data between two treatment periods with different length of follow-up

I am currently using SAS 9.4 to carry out a retrospective analysis of patients who switched from drug A to drug B. I am interested in assessing the hospitalization counts before and after switch to ...
0
votes
0answers
9 views

Multiple linear regression with dummy variables. Assumptions of t-test

I am running a regression model with multiple variables. One of the variables is a dummy and the rest are continuous. When i get the regression output (t value and P>t) i am wondering what the ...
0
votes
0answers
31 views

Why doesn't my regression line go through the point cloud?

I created a scatterplot from my data set. ...
1
vote
0answers
8 views

Is the resulting function of plotting two variables imply that all other factors are being held constant?

Say, for instance, I plot two relationships (separately): (a) Share of income spent on food vs. household income; and (b) No. of houses in a unit vs. population of a city Then, for both (a) and (b),...
2
votes
0answers
12 views

Finding a beta of a regression from two regressions on distinct samples

I have a lot off observations for 10 years for the same variables but the computer can not run a regression with all observations appended. Is there a way to find the final beta using each beta ...
2
votes
1answer
29 views

Multiple Linear Regressions with Identical Slopes

Is it possible to impose an identical slope during a multiple linear regression? See below I have 3 sets of data with a linear fit y=ax+b. I would like to simultaneously impose the same a (while ...
2
votes
1answer
36 views

Regression for multinomial distribution (negative and positive correlation coefficients)

I have a dependent variable, which is a multinomial distribution resulting from positive and negative correlation coefficients. This is a study from the field of Dendrochronology. Those correlation ...
1
vote
1answer
21 views

What is the constrain in ridge regression?

My class started learning about ridge regression two weeks ago. Before that we learned about Lagrange multipliers and the connection between that and ridge penalty/constrain function. Ridge: ...
1
vote
0answers
16 views

Is there a simple way to conduct a significance test on the equality of coefficients from a logistic regression?

Elsewhere some have proposed a method for conducting a significance test on the equality of slope coefficients using the equation: $Z = \frac{\beta_1-\beta_2}{\sqrt{(SE\beta_1)^2+(SE\beta_2)^2}}$ ...
0
votes
1answer
34 views

Do OLS residuals tell us anything about the distribution of the error term? [duplicate]

I'd like some intuition on a question that has long confused me. Suppose we have a data-generating process $$y_i = x_i' \beta + \varepsilon_i $$ where $\mathbb{E}[\varepsilon_i] = 0$, $\varepsilon_i ...
1
vote
0answers
14 views

Online learning in Bayesian Linear Regression

Bishop's machine learning textbook describes ways to conduct frequentist Linear Regression, and also examines sequential updating (online learning) in this context. The textbook also covers Bayesian ...
0
votes
0answers
9 views

Does the difference in difference techniques assumes the dependent variable has a normal distribution?

I'm trying to estimate the effect of an event. The data I have is number of sales in 7 different periods of time (3 periods before the event, the period that the event happens and 3 periods after the ...
0
votes
0answers
2 views

Conditional logistic regression for polytomous response data [on hold]

I have a retrospective cohort study with matching (1:3) done. Given that I have a continuous response variable and matching was done, getting a suitable regression plan seems a little difficult. ...
1
vote
0answers
6 views

parallel mediation with more than 2 mediators [on hold]

i am an absolute noob when it comes to R programming but, alas, I have a college course I have to attend (and pass) and i am really, coming from social sciences, struggling. we're doing this ...
0
votes
1answer
26 views

Regression when the independent variables are counts by age group

I want to run a regression where the independent variables are counts of number of people in different age buckets (size 10 e.g 25-34, 35-44 etc...) and the objective is to understand the effect of ...
0
votes
1answer
15 views

Linear model and generalized linear model

I have a low-level knowledge of statistics. Hoping there can be somebody who can answer my queries. So, I have these dataset and I want to run a multiple linear regression. Sadly my data and the ...
2
votes
1answer
24 views

Standardize betas in logistic regression

I want to compare beta weights across different logistic regression models (one per subject) and therefore standardize beta weights. I would use t-scores and then test t-scores from different models ...
-1
votes
0answers
29 views

Make one Regression Table for different Regressions [on hold]

I could really use your help. Maybe this topic is explained in another thread, but I'm not completely sure how to call it so I could not find it. I'm doing OLS Regression with different independent ...
0
votes
0answers
11 views

Censoring linearly splined predictor in regression

I'm developing a logistic regression where one of the independent variables has a non-linear relationship to the probability of the event occurring. I have created linear splines based on this ...
1
vote
1answer
19 views

Difference between bivariate exponential family and bivariate elliptical family

I'm studying the elliptical family and I'd like to know the principal differences between the bivariate exponential and elliptical family.
0
votes
0answers
23 views

Regression analysis Interpretation [duplicate]

How do I interpret these results? Specifically, what does this regression analysis show us? How do we determine which values are statistically significant? I don't have problem with the coding. I just ...
1
vote
1answer
36 views

What stats tests can be used to find whether the increase/decrease in counts yearly are difference statistically?

I have read posts about the similar problems in the forum and they are suggesting using regression to see if there is any significant increases/decrease. I have data for 3 years and their counts i.e. ...
2
votes
1answer
15 views

Adjusted R^2 for regression with dummy variables

I'm familiar with R^2 and adj R^2 for penalizing the addition of predictive variables in a regression. I just want to double check that If I have three continuous predictor variables and 30 dummy ...
0
votes
0answers
8 views

What is matrix in year dummies ? Can we regress matrix in year dummy to a dependent variable only to get the residuals? [on hold]

I get confused by this concept I found on journal, It regressing a matrix of year dummy which I do not understand what is it. Does the year matrix dummy means we create a series that represent n-1 ...
0
votes
0answers
11 views

Panel model and the multivariate model

Can I apply the Panel model to a multivariate model with six dependent variables and one independent variable
1
vote
1answer
33 views

Statistics / Regression Question

So I am writing an econ paper and will be using regressions. I have written my intro / lit review / collected relevant data. I have Swiss quarterly and yearly export data by industry from 2009-2018. ...
0
votes
0answers
6 views

Directly Comparing Regression Beta-Weights [on hold]

I have a model where my dependent variable and 3 independent variables are standardized so that they are beta-coefficients. I would like to use these coefficients to predict a new point WITHOUT the ...
2
votes
1answer
17 views

How can I use polynomial distributed lag models for longitudinal categorical exposure?

I have SHS data from 13 time points and i want to describe the relationship between this cumulative exposure and health outcome after the 13th time point. It seems the ...
0
votes
0answers
16 views

Does heteroskedasticity matter when estimating a regression using the entire population?

The F-statistic, t-statistics, p-values and standard errors of the estimated coefficients will all be incorrect in the presence of heteroskedasticity. However, does this even matter if I am working ...
1
vote
0answers
13 views

How to fix this error p<0! while optimizing SVM using PSO? [on hold]

I am trying to optimize SVM paramters for a regression problem using PSO in R. I am getting this weird error. Any suggestion on how to fix this error would be greatly appreciated. Error in svm....
0
votes
1answer
19 views

Is margins simply a probability? (STATA)

I've run a logistic regression on two binary 0,1 variables. One is "seizure yes, no" the other is "sex, male, female". Now if I run a margins command on these variables, I get a number as a result. I ...
0
votes
0answers
21 views

Logistic regression with ordinal independent variable

I want to see whether patients have a higher risk of seizures, the bigger their brain tumor. My dependent variable is therefore "seizure (yes, no)" and my independent variable is "tumor size" ranging ...
0
votes
0answers
13 views

Unbiased Estimator of the Error Third and Fourth Central Moment in Regression Analysis

In linear regression an unbiased estimator of the error ($\epsilon$) variance is given by: $$MS = \dfrac{1}{n-p-1}\sum_{i=1}^{n}\left(y_{i}-\hat{y}_{i}\right)^{2}$$ which is the sum of squares of ...
1
vote
0answers
39 views

Wrong fitted parameters in multivariate linear regression?

I am implementing multivariate linear regression using numpy, pandas and matplotlib. I then ...
1
vote
1answer
21 views

Using predict() on a multiple regression object with specific values set for some of the predictors

final.reg1<-lm(formula=medv~.,data=Bostondat) Here's the Multiple regression model I'm running on the Boston data set. I would like to predict the medv for the case when crim=0.05,rm=8,tax=279,...
0
votes
1answer
10 views

Can I create a composite variable for my two dependent variables?

I am working with two dependent variables that are both measuring a country's level of nuclear security. The first variable is a country's nuclear security index rating (range 1-100). The second ...
0
votes
1answer
13 views

How to calculate correlation for 2 time series where the tick times do not line up

I'm looking to compute intraday correlation for 2 tick by tick intraday commodity price time series. The tick times do not line up across the 2 time series. I'm thinking of converting the time ...
0
votes
0answers
16 views

What is function of Holm-Bonferroni? [duplicate]

I am confused about Holm-Bonferroni. Suppose we want to compare age of female and male students using t tset. We also want to compare length of arm and elbow between male and female students. I ...
0
votes
0answers
13 views

What is the risk of not oversampling randomly? [on hold]

Random Oversampling involves supplementing the training data with multiple copies of some of the minority classes.Instead of duplicating every sample in the minority class, some of them may be ...
0
votes
0answers
15 views

optimism error rate calculation

As posted here in the book Elements of Statistical Learning we drive to the following: $$ w = \frac{2}{N}\sum_1^Ncov(y_i, \hat{y_i}) $$ The derivation is based on the following properties $E_y E_{Y^...