linear-regression Questions

3

Solved

While looking for a R related solution I found some inconsistency between R and SPSS (ver. 24) in computing standardized residuals in a simple linear model. It appears that what SPSS calls standar...
Derian asked 15/10, 2016 at 18:6

1

I've been using the makeContrasts function in the Limma package to create contrasts, and I understand how to make simple contrasts, for example comparing each Treatment to a control independently o...
Lucia asked 1/10, 2018 at 22:14

3

Solved

I'm trying to find a model for my data but I get the message "Coefficients: (3 not defined because of singularities)" These occur for winter, large and high_flow I found this: https://stats.stacke...
Flask asked 31/12, 2018 at 15:25

2

Solved

I have a set of data. I have use pandas to convert them in a dummy and categorical variables respectively. So, now I want to know, how to run a multiple linear regression (I am using statsmodels) i...
Appalling asked 7/6, 2018 at 4:34

2

Solved

Suppose I'm fitting some data points by a simple linear regression. Now I'd like to perform several joint linear regressions for several sets of data points. More specifically, I want one parameter...
Earhart asked 11/12, 2018 at 16:44

2

Solved

I tried this but couldn't get it to work for my data: Use Scikit Learn to do linear regression on a time series pandas data frame My data consists of 2 DataFrames. DataFrame_1.shape = (40,5000) a...
Earsplitting asked 13/10, 2015 at 22:53

4

Solved

I know that: unsupervised learning is that of trying to find hidden structure in unlabeled data,otherwise ,we call it supervised learning. regression is also a type of classification ,except that...
Mccarty asked 15/3, 2014 at 3:24

2

Solved

I am running OLS regression using pandas.stats.api.ols using a groupby with the following code: from pandas.stats.api import ols df=pd.read_csv(r'F:\file.csv') result=df.groupby(['FID']).apply(la...
Maxentia asked 1/4, 2016 at 16:7

2

Solved

I am trying to add a linear regression line to my graph, but when it's run, it's not showing up. The code below is simplified. There are usually multiple points on each day. The graph comes out fin...
Morrismorrison asked 22/2, 2016 at 17:49

2

I am trying to fit a linear model and my dataset is normalized where each feature is divided by the maximum possible value. So the values ranges from 0-1. Now i came to know from my previous post L...

1

Solved

I want to use LinearRegression and linregress to caculate Intercept,X_Variable_1,R_Square,Significance_F just like regression analysis in Excel. When I use this code to do it, there is no mistake....
Chobot asked 8/11, 2018 at 0:57

3

This R code throws a warning # Fit regression model to each cluster y <- list() length(y) <- k vars <- list() length(vars) <- k f <- list() length(f) <- k for (i in 1:k) { va...
Performing asked 25/10, 2014 at 1:56

2

Problem with adding a regression line to a 'plotly' scatter plot. I've done the following code: require(plotly) data(airquality) ## Scatter plot ## c <- plot_ly(data = airquality, x = Wind...
Handbreadth asked 26/7, 2016 at 14:48

3

I implemented, for training purpose, a linear regression in python. The problem is that the cost is increasing instead of decreasing. For the data I use the Airfoil Self-Noise Data Set. Data can be...
Haply asked 30/8, 2018 at 9:32

1

Solved

This Q & A arises from How to make group_by and lm fast? where OP was trying to do a simple linear regression per group for a large data frame. In theory, a series of group-by regression y ~ x...
Depolarize asked 24/8, 2018 at 0:40

1

Solved

I have seen pairwise or general paired simple linear regression many times on Stack Overflow. Here is a toy dataset for this kind of problem. set.seed(0) X <- matrix(runif(100), 100, 5, dimname...
Kaine asked 21/8, 2018 at 17:13

2

Solved

This is a sample. df <- tibble( subject = rep(letters[1:7], c(5, 6, 7, 5, 2, 5, 2)), day = c(3:7, 2:7, 1:7, 3:7, 6:7, 3:7, 6:7), x1 = runif(32), x2 = rpois(32, 3), x3 = rnorm(32), x4 = rnorm...
Bunco asked 20/8, 2018 at 2:53

1

Solved

I'm using predict.lm(fit, newdata=newdata, interval="prediction") to get predictions and their prediction intervals (PI) for new observations. Now I would like to aggregate (sum and mean) these pre...
Taction asked 15/8, 2018 at 9:41

1

Solved

I want to use aggregate with this custom function: #linear regression f-n CalculateLinRegrDiff = function (sample){ fit <- lm(value~ date, data = sample) diff(range(fit$fitted)) } dataset2 =...
Pinkerton asked 15/8, 2018 at 10:38

1

I'm implementing Linear Regression in Tensorflow first time. Initially, I tried it using a linear model but after few iterations of training, my parameter shot up to infinity. So, I changed my mode...
Fortaleza asked 23/7, 2018 at 17:31

2

I have 2 arrays which are true_stress and true_strain. I want to do a linear regression to their log10 versions but I keep getting the said error. from sklearn.linear_model import LinearRegression...
Alleyne asked 6/8, 2018 at 10:48

7

Solved

I am fitting a model to factor data and predicting. If the newdata in predict.lm() contains a single factor level that is unknown to the model, all of predict.lm() fails and returns an error. Is t...
Mexico asked 26/11, 2010 at 12:15

3

Solved

I'm trying to find a minimal adequate model using AIC in R. I keep getting the following error: Error in step(model) : number of rows in use has changed: remove missing values? My data: data&l...
Bine asked 5/8, 2012 at 19:38

1

I'm using Scala with Spark 2.0 to train a model with LinearRegression. val lr = new LinearRegression() .setMaxIter(num_iter) .setRegParam(reg) .setStandardization(true) val model = lr.fit(data...

1

I've found Error in contrasts when defining a linear model in R and have followed the suggestions there, but none of my factor variables take on only one value and I am still experiencing the same ...
Penuchle asked 19/5, 2018 at 0:20

© 2022 - 2024 — McMap. All rights reserved.