Displaying 20 results from an estimated 5000 matches similar to: "Linear Regression with lm Forcing the Slope to Equal 1"
2011 May 31
2
Forcing a negative slope in linear regression?
Dear forum members,
How can I force a negative slope in a linear regression even though the
slope might be positive?
I will need it for the purpose of determining the trend due reasons other
than biological because the biological (genetic) trend is not positive for
these data.
Thanks. Julia
Example of the data:
[1] 1.254 1.235 1.261 0.952 1.202 1.152 0.801 0.424 0.330 0.251 0.229
2010 Jan 29
2
Vectors with equal sd but different slope
Hi,
what I would need are 2 vector pairs (x,y) and (x1,y1). x and x1 must have
the same sd. y and y1 should also exhibit the same sd's but different ones
as x and x1. Plotting x,y and x1,y1 should produce a plot with 2 vectors
having a different slope. Plotting both vector pairs in one plot with fixed
axes should reveal the different slope.
many thanks
syrvn
--
View this message in
2013 Mar 12
1
Constrain slope in segmented package
Hello,
I'm currently using the segmented package of M.R. Muggeo to fit a
two-slope segmented regression. I would like to constrain a
null-left-slope, but I cannot make it. I followed the explanations of
the package (http://dssm.unipa.it/vmuggeo/segmentedRnews.pdf) to write
the following code :
fit.glm <- glm(y~x)
fit.seg <- segmented(fit.glm, seg.Z=~x,psi=0.3)
fit.glm
2007 Jul 29
1
Piecewise Regression with a known slope
Hey, all. I'm working on a data set with a broken stick linear
regression where I know one of the two slopes. It is a negative
linear function until the line intersects with the x-axis, at which
point it becomes 0. It is not a nonlinear asymptotic function, and,
indeed, using negative exponential or logistic types of fits as an
approximation has tended to lead to an under or
2008 Nov 03
2
Calculating R2 for a unit slope regression
Does anyone know of a literature reference, or a piece of code that can help me calculate the amount of variation explained (R2 value), in a regression constrained to have a slope of 1 and an intercept of 0?
Thanks!
Sebastian
J. Sebastián Tello
Department of Biological Sciences
285 Life Sciences Building
Louisiana State University
Baton Rouge, LA, 70803
(225) 578-4284 (office and lab.)
2007 Aug 14
4
Linear Regression with slope equals 0
Hi there, am trying to run a linear regression with a slope of 0.
I have a dataset as follows
t d
1 303
2 302
3 304
4 306
5 307
6 303
I would like to test the significance that these points would lie on a
horizontal straight line.
The standard regression lm(d~t) doesn't seem to allow the slope to be set.
Any help very welcome.
ed
2007 Nov 08
1
ggplot2 geom_abline slope not working?
I am learning ggplot2, and need your help.
When I try
> p <- ggplot(mtcars, aes(x = wt, y=mpg)) + geom_point()
> p + geom_abline(slope=5)
(from http://had.co.nz/ggplot2/geom_abline.html)
the slope of the abline does not change, but this works:
> p + geom_abline(intercept=20)
In order to have slope work, I have to use
> p + geom_abline(aes(slope=5))
Is it a bug, or is there
2013 Mar 13
1
Determining maximum hourly slope per day
Hello,
I have a challenge!
I have a large dataset with three columns, "date","temp", "location".
"date" is in the format %m/%d/%y %H:%M, with a "temp" recorded every 10
minutes. These temperatures of surface temperatures and so fluctuate during
the day, heating up and then cooling down, so the data is a series of peaks
and troughs. I would like
2004 Oct 19
2
Slope of surface
Hi,
Is there a neat way of working out the slope of a flat surface in R?
Given (x,y,z) co-ordinates of the four corners of a square, is there a
function which will allow me to calculate the "mean" slope of the surface
in a given direction?
Thanks in advance..
Laura
Laura Quinn
Institute of Atmospheric Science
School of Earth and Environment
University of Leeds
Leeds
LS2 9JT
tel: +44
2007 Oct 15
2
Linear regression and slope from 1
Dear R-Users,
I am new to R, so please excuse the ignorance.
I have data:
x (2.14, 2.41, 1.09, 0.17, 8.18)
y (3.81, 5.13, 0.63, 0.75, 6.35)
I would like to use simple linear regression and test 2 things:
1) slope of line of best fit is statistically different from 1
2) y-intercept is statically different from 0
Could anyone provide me with the R terminology to do this?
Thanks so much,
Dan
2013 May 05
1
slope coefficient of a quadratic regression bootstrap
Hello,
I want to know if two quadratic regressions are significantly different.
I was advised to make the test using
step 1 bootstrapping both quadratic regressions and get their slope
coefficients.
(Let's call the slope coefficient *â*^1 and *â*^2)
step 2 use the slope difference *â*^1-*â*^2 and bootstrap the slope
coefficent
step 3 find out the sampling distribution above and
2002 Mar 10
1
multiple pairwise slope comparisons
Hello,
I have a linear model with different slopes for different treatment
groups. I need to pairwise compare the different slope estimates for
the different treatment groups. Is there a package that does pairwise
comparisons of slope coefficients, making the appropriate adjustments in
the P values?
Thanks,
John.
--
==========================================
John Janmaat
Department of
2009 Apr 03
2
Linear model, finding the slope
Hi
for some data I working on I am merely plotting time against temperature for
a variable named filmclip. So for example, I have volunteers who watched
various film clips and have used infared camera to monitor the temperature
on their face at every second of the clip.
The variable names I have used are Normalised ( for the temperature) and
Frame (for the time in seconds).
So I have fitted a
2009 Jul 08
1
linear regression and testing the slope
Dear All,
First of all I would like to say I do not have much knowledge about this
subject, so most of you can find it really easy. I am doing a linear
regression and I want to test if the slope of the curve is 0. R gives the
summary statistics:
Call:
lm(formula = x ~ s)
Residuals:
Min 1Q Median 3Q Max
-0.025096 -0.020316 -0.001203 0.011658 0.044970
Coefficients:
2002 Oct 03
2
lm fitting with a specified slope
Is there an easy way to do a linear model with an a priori known slope?
In essence, I want to minimize the residuals around a line of known slope.
-R
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the
2008 May 16
1
Making slope coefficients ``relative to 0''.
I am interested in whether the slopes in a linear model are different
from 0.
I.e. I would like to obtain the slope estimates, and their standard
errors,
``relative to 0'' for each group, rather than relative to some baseline.
Explicitly I would like to write/represent the model as
y = a_i + b_i*x + E
i = 1, ..., K, where x is a continuous variate and i indexes groups
(levels of a
2010 Oct 22
3
how fit linear model with fixed slope?
I want to fit a linear model with fixed slope e.g. y = x + b
(instead of general: y = a*x + b)
Is it possible to do with lm()?
Regards,
Ryszard
--------------------------------------------------------------------------
Confidentiality Notice: This message is private and may ...{{dropped:11}}
2009 Oct 19
2
How to get slope estimates from a four parameter logistic with SSfpl?
Hi,
I was hoping to get some advice on how to derive estimates of slopes from four parameter logistic models fit with SSfpl.
I fit the model using:
model<-nls(temp~SSfpl(time,a,b,c,d))
summary(model)
I am interested in the values of the lower and upper asymptotes (parameters a and b), but also in the gradient of the line at the inflection point (c) which I assume tells me my rate of
2003 Feb 04
2
testing slope
Hi all,
I try to test a linear slope using offset.
I have:
> m2 <- glm(Y~X*V)
> summary(m2)
Call:
glm(formula = Y ~ X * V)
Deviance Residuals:
Min 1Q Median 3Q Max
-2.01688 -0.56028 0.05224 0.53213 3.60216
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 1.3673 0.8476 1.613 0.119788
X
2010 Jan 22
1
Estimate Slope from Boltzmann Model (package: DRC)
Dear R Community,
I am using the package DRC ( to fit a boltzman model to my data. I
can fit the model and extract the lower limit, upper limit, and ED50
(aka V50), but I cannot figure out how to get the slope of the curve
at ED50. Is there a simple way to do this? I've searched the mailing
list and looked through the package documentation, but could not find
anything. I am new to r, and