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.

3
votes
1answer
94 views

Computing BIC for SUR model

Consider the following m regression equation system: $$r^i = X^i \beta^i + \epsilon^i \;\;\; \text{for} \;i=1,2,3,..,T$$ where $r^i$ is a $(T\times 1)$ vector of the T observations of the dependent ...
0
votes
1answer
17 views

Bayesian regression - prior dist for variables

In a multiple Bayesian linear regression model, do all variables (dependent and predictors) get prior distributions? If so, can one mix non-informative and substantive priors in the model? Thanks!
6
votes
2answers
519 views

How to subset alternatives in nested multinomial logistic regression?

I am trying to predict whether or not captains in a particular groundfish fishery choose to fish on any given day and what variables may influence that decision. Originally I had planned on using ...
1
vote
3answers
23 views

Question Regarding Zero Conditional Mean

Hi I am a beginner to econometrics! I have been dealing with bivariate regression. We use the formula $y = \beta_0 + \beta_1 x$. I am told that if $E(u\mid x) \ne 0$ then the estimate of the slope ...
0
votes
1answer
183 views

RSS of simple linear regression onto principal components

Is the RSS in a simple linear regression onto the largest principal component always less than or equal to the RSS of a simple regression onto the rest of the smaller principal components? I feel that ...
1
vote
1answer
183 views

Finding optimal values of parameters using observations

I have a problem that at first seemed super easy to solve but right now I am not sure how to crunch it. I have data with multiple observations (about 30) of certain process. Process can be modulated ...
1
vote
1answer
184 views

How to estimate the confidence of a regression prediction for neural network

For a classification task, the output neurons give a continuous output of [0 1], which itself can be treated as confidence, ie, a value closer to 1 means highly confident and closer to 0 means not ...
0
votes
0answers
6 views

Can we predict the monthly sales amount of the coming month without knowing the values of the independent variables of the coming month

I have a data set where the monthly sales of TMT bars and various other explanatory variables are present from April 2014-March 2018. I need to predict the monthly sales of the coming/next month. ...
1
vote
0answers
15 views

How to choose “family” in Generalized Additive Model (GAM)

When modelling a GAM model using mgcv in R, we need to define the family = . I tried some families (e.g., Gaussian, Gamma), R ...
0
votes
0answers
10 views

Multi-year and multi-location correlation or regression?

I have fire activity data (i.e. number of fires) and a series of factors (e.g. precipitation, tree cover loss, distance to nearest forest, etc...) that can potentially explain it. I have all this data ...
0
votes
0answers
18 views

Sampling distributions for the slope coefficient

I have a question in my exam, which I do not know exactly the answer, Can you please guide me? Q: Do you believe the sampling distributions for the slope coefficients are at least approximately ...
2
votes
1answer
214 views

Bayes optimal decision for logistic regression: Self-study exercise

We want to find the Bayes optimal decision for logistic regression. That means that the goal is to find the actions, which minimize our expected loss (also often called expected cost or risk). Here ...
1
vote
2answers
46 views

What is a 'true' model?

A short question, but I am somehow unable to find any concrete answer. I suppose it means that the model is as good as it can be? Containing all relevant variables and hence not suffering from any ...
0
votes
0answers
28 views

Posterior distribution of Bayesian Parameters

I am confused about how to get the posterior distribution of Bayesian Parameters. I have $t = w_1x + w_0 + \epsilon$ with $\epsilon = N(0, \sigma^2)$ How do I find $p(\textbf{w}|x_1, t_1, ...., x_N, ...
0
votes
0answers
40 views
+50

Logistic regression including instrumental variable (“ivprobit” in R) has coefficients with much reduced significance

I am trying to run a logistic regression including instrumental variables by using "ivprobit" function in R from the package called "ivprobit". If I do not include the instrumental variable, the "glm"...
2
votes
0answers
8k views

How to determine sample size in unknown population size for regression equation

I want to compute a regression equation for predicting tree volume by independent variable dbh (diameter at breast height) at 95 % confidence interval for 5% error. What is the formula for sample ...
0
votes
0answers
14 views

How to know whether a random effect or a cluster effect is necessary for a mixed effect logistic regression?

I have 8 variables in my model out of which I have a group which is definitely not a fixed effect. I tried checking the random effect on the basis of the log-likehood test and it seems significant. I ...
0
votes
0answers
18 views

Incorporating linear combination predictions into multiple regression

Let's say I have a predictor $p_1$ of the form: $\textbf{y} = f(\textbf{x})$ Let's suppose that I found another predictor $p_2$ of the form: $E[y_1 - y_0] = c$ (e.g. I have a predictor of linear ...
2
votes
1answer
195 views

Why data shuffling has such a dramatic effect in K-Neighbours regression?

I am trying to use the K-Neighbouts for regression and I find to my surprise that not shuffling the training data has a huge effect on the quality of the prediction. With shuffling. 98% training data:...
1
vote
0answers
88 views

Including seasonal dummies in regression

I've downloaded some data. Problem is some of them have been seasonally adjusted while the rest have not. I could not find data that have all been seasonally adjusted. Wonder if I run a regression ...
2
votes
2answers
41 views

Validity of pruning algorithm in regression trees

I am reading the book "The elements of Statistical Learning"(pdf available online for free) and in particular I'm trying to better understand the validity of the algorithm presented in section 9.2.2, ...
3
votes
1answer
197 views

Comparing regression slopes

I'm working with psychophysiological data--specifically, tonic electrodermal activity (EDA). Tonic EDA is commonly accepted as an indicator of arousal. Simply put, I sample tonic EDA over time as ...
0
votes
0answers
8 views

RCT statistic help please

I am wondering what statistics to use for the following randomised controlled trial. A between groups design with a control group, group therapy A, and group therapy B. I am measuring pre and post ...
2
votes
4answers
974 views

MSE formula in Neural Network applications

In Neural Network examples that I have seen online - sometimes the Mean Square Error is presented as $$ MSE = \frac{{1}}{2n} \sum_{i}^{n} ( \widehat{y_i} -y_i)^2 \quad (1) $$ and other times $$ ...
0
votes
0answers
7 views

How to calculate One Standard Error rule tuning parameter for prediction error during k-fold CV

I'm trying to wrap my head around exactly how this rule goes into place, so I can use it by hand in other model selection setups. So here's some R code to get it started: ...
5
votes
1answer
114 views

Which gamma regression model to use for extrapolation?

I'm looking for a regression model which would satify these requirements: My target variable follows the exponential distribution, so to my understanding I should use gamma loss function. I have ...
1
vote
1answer
841 views

Do I use dummy encoding or one hot encoding when trying to do regression?

I am trying to do regression for the first time using qualitative and quantitative data using scikit learn. I want to find correlations between user demographic features like age range, country, ...
1
vote
1answer
49 views

Is it good practice to use Linear Least-Squares with SMA?

I have time-series (daily) data and I want to understand the general trend. My current approach is: Calculate the 7-day simple moving average. Add a line of best fit (linear least squares ...
1
vote
0answers
243 views

feature embedding for categorical features

I'm training a model and among the features, I have the language of the users. Right now I have done one-hot encoding on the language feature. But I think it would make more sense to have the language ...
1
vote
1answer
14 views

What does linear regressor output mean? I am using tensorflow estimator in R

I try the code at tensorflow in R tutorial (https://tensorflow.rstudio.com/tfestimators/) but I cannot understand the output what the code produces. Code: ...
0
votes
0answers
22 views

interpretation of parameter estimates [on hold]

pls clear the interpretation of negative coefficient value of independent varibale in respect to dependent variable in the following table. ...
0
votes
0answers
10 views

Impulse response function for MIDAS regression

Consider a MIDAS regression with a single high-frequency regressor $x_{t/m}$ that is observed $m$ times for every observatoin of a low-frequency regressand $y_t$: $$y_t= \sum_{i=1}^p \alpha_i y_{t-i}+...
5
votes
1answer
569 views

AIC and BIC criterion for Model selection, how is it used in this paper?

I'm reading Model selection and inference: Facts and fiction by Leeb & Pötscher (2005) (link), in this paper they look at an example in linear regression: Let $$Y_i = \alpha x_{i1}+\beta x_{i2}+\...
2
votes
1answer
485 views

Reference level in GLM regression

In GLM regression I have always been told to set the reference level of categorical/ordinal/dummy variables to the level with the most exposure (level with most data), because this somehow makes the ...
1
vote
0answers
39 views

Independence of irrelevant alternatives practical example

I have frequently heard descriptions of the IIA problem for logit regression phrased in terms of the famous red bus/blue bus, or some direct metaphor for that thing. However, I was curious as to what ...
0
votes
1answer
17 views

R: Methodologically sound way to determine which interaction effects to include in logistic regression? glmulti()?

I ran a logistic regression (in R using the glm function) and didn't find significance for a variable I expected to be significant (numerous articles have found significance). When I examined my data ...
0
votes
1answer
17 views

Interpreting regression results with decimal percentage variables

I have a regression where both my Y and X variables are measured in percent (so they are decimals values, mostly less than 0). The coefficient from the regression is 0.43. Is it correct to say that a ...
1
vote
1answer
26 views

Neural Networks - Difference between 1 and 2 layers?

I'm currently working on a regression problem, using neural networks to constrain parameters for a complex physical scenario. I am searching the hyperparameter space for the best model and have thus ...
0
votes
1answer
23 views

Interpret the slope coefficient

The slope coefficient for SO2 is quite small (0.33), especially as compared to the other three slopes). Does this suggest that the effect of SO2 is therefore not very important?
1
vote
1answer
22 views

Meaning of residual maker matrix

Suppose that $M_1$ is the residual maker for a unity vector (i.e. a vector made of $n$ 1's). I am told that this matrix, when premultiplying a variable, transforms the variable "into deviations from ...
5
votes
1answer
2k views

which predictive model should I use if column is having string values?

I want to create a predictive model to predict a categorical value (1,0) but the independent variables are also having few string columns (country, location, age) which I feel are important for the ...
0
votes
1answer
201 views

Coding piecewise linear regression with $R$

Suppose that we have, say 10 values of a predictor $x_{1}$ and we want fit a piecewise linear model of the outcome $y$ vs $x$ in the following way: $Y_{i} =\beta_{0}+\beta_{1}x_{i1}+\epsilon _{i}$ for ...
0
votes
0answers
21 views

Can CART models be used to select features for a logistic regression?

Can I use the features selected from the CART(Classification and Regression Trees) model and take those features and then model the logistic regression using those selected features? Then interpret ...
0
votes
0answers
5 views

The consequences of ignoring autocorrelation of errors for the LASSO estimator?

In ordinary linear regression, Y = X$\beta$ + $\epsilon$, if the error is autocorrelated, then the assumptions under the Gauss-Markov theorem are violated. For example, autocorrelation violates the ...
2
votes
2answers
191 views

How to build a predictive model to predict the water consumption? [on hold]

currently I just met a case and Give the context below: I got a 1000 (rows) x 6 (columns) data set. The variables are Date, Hour, average temperature, average humidity, the sum of water consumed in ...
131
votes
5answers
181k views

How exactly does one “control for other variables”?

Here is the article that motivated this question: Does impatience make us fat? I liked this article, and it nicely demonstrates the concept of “controlling for other variables” (IQ, career, income, ...
11
votes
1answer
1k views

What is the difference between controlling for a variable in a regression model vs. controlling for a variable in your study design?

I imagine that controlling for a variable in your study design is more effective at reducing error than controlling for it post-hoc in your regression model. Would someone mind explaining formally ...
0
votes
0answers
31 views

PDF of human population weight distribution

I have a lot of data on human weight coupled with information about gender, age, country and platform (desktop or mobile user). Looking something like this: ...
16
votes
2answers
69k views

How do I interpret Exp(B) in Cox regression?

I'm a medical student trying to understand statistics(!) - so please be gentle! ;) I'm writing an essay containing a fair amount of statistical analysis including survival analysis (Kaplan-Meier, Log-...
14
votes
3answers
282 views

What are the advantages of linear regression over quantile regression?

The linear regression model makes a bunch of assumptions that quantile regression does not and, if the assumptions of linear regression are met, then my intuition (and some very limited experience) is ...