Questions tagged [multiple-regression]

a linear regression to determine one dependent variable based on several others

Multiple regression is an extension of simple linear regression. It is used when we want to predict the value of a variable based on the value of two or more other variables. The variable we want to predict is called the dependent variable.

Multiple Regression

24 questions
4
votes
2 answers

R Multiple Regression Loop and Extract Coefficients

I have to perform multiple linear regression for many vectors of dependent variables on the same matrix of independent variables. For example, I want to create 3 models such that: lm( d ~ a + b + c ) lm( e ~ a + b + c ) lm( f ~ a + b + c ) from the…
3
votes
1 answer

Is brute force the best option for multiple regression using Python?

In the linear model = 0 + 1 × i + 2 × j + 3 × k + , what values for ,j,k ∈ [1,100] results in the model with the highest R-Squared? The data set consists of 100 independent variables and one dependent variable. Each variable has 50…
2
votes
1 answer

Generate HTML from stats model summary

I have the following code to model a regression and print the summary to a log file #Finding the model fit using the multiple regression fit = smf.ols(self.formula_string, data=df_train).fit() fit_parameters = str(fit.params) …
Chakra
  • 2,525
  • 8
  • 43
  • 82
2
votes
0 answers

Multiple Regression - cannot allocate vector of size 4.7gb

First of all I wanna say that I have no clue about R and coding itself. I just have to do a regression with clustered standard errors for my bachelor thesis and I can't do that in Excel. I managed to do the linear regression with clustered standard…
2
votes
1 answer

Summary of regression in scikit_learn

If I perform a linear regression in R, I get a nice summary of the resulting model, $R^2$, p-values for different features, etc. If I do the same in scikit_learn, I get nothing of this. Are there any ways to print summary of the model there?
Konstantin Solomatov
  • 10,252
  • 8
  • 58
  • 88
2
votes
1 answer

poLCA - Latent Class Analysis - How long should analysis take?

This is the script I am working on: library(poLCA) f <- cbind(bq70, bq72_1, bq72_2, bq72_3, bq72_4, bq72_5, bq72_6, bq72_7, bq73a_1, bq73a_2, bq73a_3, bq73a_4) ~ zq88 + zq89 + dm_zq101_2 + dm_zq101_3 + dm_zq101_4 + …
Steven
  • 21
  • 2
2
votes
1 answer

Map function in R for multiple regression

My goal is to run a multiple regression on each dependent variable in a list, using all of the independent variables in another list. I then would like to store the best model for each dependent variable by AIC. I have written the below function…
Trevor McCormick
  • 366
  • 1
  • 3
  • 12
2
votes
1 answer

Calculate 'R Square' and 'P-Value' for multiple linear regression in TSQL

We just have few built-in functions in SQL Server to do sophisticated statistical analysis but I need to calculate multiple linear regression in TSQL. Based on this post (Multiple Linear Regression function in SQL Server), I could be able to get…
sqluser
  • 5,502
  • 7
  • 36
  • 50
1
vote
1 answer

Match gridlines to axis ticks in 3D regression plot (persp and rockchalk)

I am trying to match my gridlines to my axis ticks in this plot so the numbers are uniform across the axis and easy to read between. Does anyone have any idea how to do this? As i am using two different packages (persp and rockchalk) at the same…
user2443444
  • 65
  • 1
  • 1
  • 5
1
vote
1 answer

better results from simple linear regression than multivariate/multiple reg

I have an existing model that predicts house prices, that uses simple linear regression. As an input I have date and output is price. I wanted to improve overall results so I have added one more feature. New feature is distance from the estimated…
miro
  • 809
  • 10
  • 25
1
vote
2 answers

Find R-squared for Multiple Regression

If the question has 10 variables Find that model that gives you largest adjusted R-squared value by using exactly two variables. fit(i,j)=lm(y~xi+xj,data=data) where xi and xj can be any given variable between x1,x2,...,x10 For example, I want to…
1
vote
0 answers

Unable to run multiple regression analysis in R due to excessive number in NA's in y

I'm quite new to R and am trying to run a number of separate multiple regression analyses on a dataset with some 250 rows. I've successfully done a few of these on columns with a small number of NA's, however it's refusing to work on columns with…
StBebe
  • 11
  • 1
  • 3
1
vote
0 answers

Calculating Response Variable after generating the formula in multiple regression in R

My Code on R-Fiddle I have taken a sample dataset consisting Responsibility , Trainees supervising and salary where salary can be generated from Responsibility and Trainee values , I have generated the model formula using multiple regression .…
Partha Roy
  • 1,575
  • 15
  • 16
1
vote
2 answers

Loops for covariates: making SPSS choose covariates according to predictor in linear regression

In my data set, I have several independent variables (here named "predictor1", "predictor2" etc.) and several dependent variables ("outcomeA", "outcomeB" etc). Furthermore, I have several covariates ("covariate1", "covariate2", etc.). I want to do…
Sara S.
  • 23
  • 4
1
vote
1 answer

Regress function for Excel VBA

Using the regress function in excel and I am having trouble getting the output to post in the spot i want. Excel keeps creating a new workbook in which to place the results. What am I doing wrong? How do I target a space in my current workbook to…
Stuart Allan
  • 163
  • 2
  • 10
1
2