linear-regression Questions
1
Solved
I'm summing the predicted values from a linear model with multiple predictors, as in the example below, and want to calculate the combined variance, standard error and possibly confidence intervals...
Shaman asked 5/9, 2016 at 21:25
5
Solved
I am trying to do fixed effects linear regression with R. My data looks like
dte yr id v1 v2
. . . . .
. . . . .
. . . . .
I then decided to simply do this by making yr a factor and use lm:
...
Goggler asked 26/4, 2012 at 3:33
1
Solved
In order to correct heteroskedasticity in error terms, I am running the following weighted least squares regression in R :
#Call:
#lm(formula = a ~ q + q2 + b + c, data = mydata, weights = weighti...
Hardfavored asked 4/9, 2016 at 10:17
1
Solved
I am trying to extend the lwr() function of the package McSptial, which fits weigthed regressions as non-parametric estimation. In the core of the lwr() function, it inverts a matrix using solve() ...
Easterner asked 13/12, 2013 at 8:33
1
Solved
I am new to R and I want to improve the following script with an *apply function (I have read about apply, but I couldn't manage to use it). I want to use lm function on multiple independent variab...
Alongside asked 1/9, 2016 at 4:3
1
Solved
My understanding of orthogonal polynomials is that they take the form
y(x) = a1 + a2(x - c1) + a3(x - c2)(x - c3) + a4(x - c4)(x - c5)(x - c6)... up to the number of terms desired
where a1, a2 et...
Aguedaaguero asked 19/8, 2016 at 4:33
3
I have this code:
library(biglm)
library(ff)
myData <- read.csv.ffdf(file = "myFile.csv")
testData <- read.csv(file = "test.csv")
form <- dependent ~ .
model <- biglm(form, data=myDat...
Surah asked 1/7, 2016 at 17:31
1
Solved
I am building a quadratic model with lm in R:
y <- data[[1]]
x <- data[[2]]
x2 <- x^2
quadratic.model = lm(y ~ x + x2)
Now I want to display both the predicted values and the actual v...
Plane asked 1/8, 2016 at 13:32
1
Solved
In Ridge Regression, we are solving Ax=b with L2 Regularization. The direct calculation is given by:
x = (ATA + alpha * I)-1ATb
I have looked at the scikit-learn code and they do implement the...
Runlet asked 25/7, 2016 at 8:15
1
Solved
I was planning to use sklearn linear_model to plot a graph of linear regression result, and statsmodels.api to get a detail summary of the learning result. However, the two packages produce very di...
Bloodstock asked 19/7, 2016 at 6:59
1
Solved
Consider the following table :
DB <- data.frame(
Y =rnorm(6),
X1=c(T, T, F, T, F, F),
X2=c(T, F, T, F, T, T)
)
Y X1 X2
1 1.8376852 TRUE TRUE
2 -2.1173739 TRUE FALSE
3 1.3054450 FALSE TRUE
4...
Vedi asked 30/6, 2016 at 17:23
2
Solved
I ran a regression:
CopierDataRegression <- lm(V1~V2, data=CopierData1)
and my task was to obtain a
90% confidence interval for the mean response given V2=6 and
90% prediction interval whe...
Unitarianism asked 29/6, 2016 at 20:30
1
Solved
I'm trying to train a very simple linear regression model.
My code is:
from scipy import stats
xs = [[ 0, 1, 153]
[ 1, 2, 0]
[ 2, 3, 125]
[ 3, 1, 93]
[ 2, 24, 5851]
[ 3, 1, 524]
[ 4, 1, 0...
Harbison asked 23/6, 2016 at 8:12
2
Solved
I always thought that the lm function was extremely fast in R, but as this example would suggest, the closed solution computed using the solve function is way faster.
data<-data.frame(y=rnorm(1...
Possie asked 12/4, 2016 at 11:24
1
Solved
For the simple example below, you can see that there are certain points that are identified in the ensuing plots. How can I extract the row numbers identified in these plots, especially the Normal ...
Balbur asked 18/6, 2016 at 13:4
1
Solved
I cant work out how to get the regression line equation, r^2 and p value of the linear regression I have plotted using the function geom_smooth.
This is my code:
g <- ggplot(data=data.male, a...
Stour asked 21/5, 2016 at 16:57
1
Solved
I am trying to create a scatterplot in ggplot2 with one regression line even though colour is dependent on the 'Survey Type' variable. I would ideally also like to specify which survey type is whic...
Trawick asked 20/5, 2016 at 14:1
1
Solved
val tvalues: Array[Double] = Array(1.866393526974307, 2.864048126935307, 4.032486069215076, 7.876169953355888, 4.875333799256043, 14.316322626848278)
val pvalues: Array[Double] = Array(0.0640200564...
Fates asked 11/5, 2016 at 5:3
1
Solved
I know that it's possible to export models as PMML with Spark-MLlib, but what about Spark-ML?
Is it possible to convert LinearRegressionModel from org.apache.spark.ml.regression to a LinearRegress...
Circumpolar asked 18/4, 2016 at 8:37
2
Solved
Is there a statsmodels or other Python equivalent for R's step functionality for selecting a formula-based model using AIC?
Housekeeper asked 15/3, 2014 at 19:26
2
Solved
Where there are many columns in data frame and you want to just leave out one or two columns and include everything else in the multiple regression, How can we accomplish that without writing out a...
Jacquard asked 1/4, 2016 at 16:23
3
Solved
This might be a somewhat simple question but I can not seem to get it working.
I want to find the x intercept given two points.
Lets say I have these two points:
(5,3) and (3,4)
I would like to f...
Spatial asked 23/3, 2016 at 16:24
1
Solved
I´m using the same data but different python libraries to calculate the coefficient of determination R^2. Using stats library and sklearn yield different results.
What is the reason behind this b...
Unwarranted asked 22/3, 2016 at 11:47
1
Solved
I started with simple implementation of single variable linear gradient descent but don't know to extend it to multivariate stochastic gradient descent algorithm ?
Single variable linear regressio...
Noncontributory asked 16/3, 2016 at 9:20
2
I would like to calculate multiple linear regression with python.
I found this code for simple linear regression
import numpy as np
from matplotlib.pyplot import *
x = np.array([1, 2, 3, 4, 5])
...
Amund asked 16/7, 2013 at 14:21
© 2022 - 2024 — McMap. All rights reserved.