Displaying 20 results from an estimated 40000 matches similar to: "simple fit"
2007 Aug 28
1
FW: How to fit an linear model withou intercept
Hi Mark,
I don't know wether you recived a sufficient reply or not, so here are
my comments to your problem.
Supressing the constant term in a regression model will probably lead to
a violation of the classical assumptions for this model.
From the OLS normal equations (in matrix notation)
(1) (X'X)b=X'y
and the definition of the OLS residuals
(2) e = y-Xb
you get - by
2010 Aug 23
4
Draw a perpendicular line?
Hi,
I am trying to draw a perpendicular line from a point to two points.
Mathematically I know how to do it, but to program it, I encounter some
problem and hope can get help. Thanks.
I have points, A, B and C. I calculate the slope and intercept for line
drawn between A and B.
I am trying to check whether I can draw a perpendicular line from C to line
AB and get the x,y value for the point D
2011 Aug 15
2
Extracting information from lm results (multiple model runs)
Just to inform:
I posted that before in R-sig-ecology but as it might be interesting also for other useRs, I post it also to the general r-user list:
Hello Alexandre,
thank you very much. I also found another way to extract summarizing information from lm results over e.g. 1000 repeated model runs:
results2 <- t(as.data.frame(results))
summary(results2)
Although some questions popped up in
2010 Jan 08
2
how to get perfect fit of lm if response is constant
Hello.
Consider the response-variable of data.frame df is constant, so analytically
perfect fit of a linear model is expected. Fitting a regression line using
lm result in residuals, slope and std.errors not exactly zero, which is
acceptable in some way, but errorneous. But if you use summary.lm it shows
inacceptable error propagation in the calculation of the t value and the
corresponding
2007 Nov 28
2
fit linear regression with multiple predictor and constrained intercept
Hi group,
I have this type of data
x(predictor), y(response), factor (grouping x into many groups, with 6-20
obs/group)
I want to fit a linear regression with one common intercept. 'factor'
should only modify the slopes, not the intercept. The intercept is expected
to be >0.
If I use
y~ x + factor, I get a different intercept for each factor level, but one
slope only
if I use
y~ x *
2009 Jul 20
1
package lmodel2: p-value RMA fitting?
Hi *,
is there a way to obtain some kind of p-value for a model fitted with RMA
using the lmodel2 package?
I know that p-values are discussed and criticized a lot and as you can image
from my question I'm not
very much of a statistican (only writing my bachelor thesis).
As fare as I understood the confidence interval statistic correctly, a
coefficient is regarded as statistically
significant
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}}
2005 Jan 23
4
survreg: fitting different location parameters
Hi R-Help!
My question: I have lifetime/failure data of machines with different
stress levels and i think an weibull/extreme value distribution would
fit this data. So I did:
model1 <- survreg(Surv(lfailure)~stress,data=steel,dist="extreme")
(where lfailure=log(failure))
Now I would like to do a likelihood ratio test to test the hypothesis
H0: location parameters of the
2006 Jan 25
2
Question about fitting power
Hi R users
I'm trying to fit a model y=ax^b.
I know if I made ln(y)=ln(a)+bln(x) this is a linear regression.
But I obtain differente results with nls() and lm()
My commands are: nls(CV ~a*Est^b, data=limiares, start =list(a=100,b=0),
trace = TRUE) for nonlinear regression
and : lm(ln_CV~ln_Est, data=limiares) for linear
regression
Nonlinear
2008 Aug 29
1
nls() fails on a simple exponential fit, when lm() gets it right?
Dear R-help,
Here's a simple example of nonlinear curve fitting where nls seems to get
the answer wrong on a very simple exponential fit (my R version 2.7.2).
Look at this code below for a very basic curve fit using nls to fit to (a)
a logarithmic and (b) an exponential curve. I did the fits using
self-start functions and I compared the results with a more simple fit
using a straight lm()
2012 Oct 21
2
help speeding up simple Theil regression function
Hello,
I am working on a simple non-parametric (Theil) regression function and and
am following Hollander and Wolfe 1999 text. I would like some help making
my function faster. I have compared with pre-packaged version from "MBLM",
which isnt very fast either, but it appears mine is faster with N = 1000
(see results below). I plan on running this function repeatedly, and I
generally
2007 Apr 20
1
nlme trouble
I am not certain how nlme works so I followed an example from the web (
http://www.menne-biomed.de/gastempt/gastempt1.html). I was able to
successfully reproduce the example. However, when I modified my the example
to use my data and with my formula, I get a set of errors having to do with
the log() function. I get 10 of them (all exactly the same) and there are 10
levels in my factor variable.
2023 Aug 20
2
Issues when trying to fit a nonlinear regression model
Dear Bert,
Thank you so much for your kind and valuable feedback. I tried finding the
starting values using the approach you mentioned, then did the following to
fit the nonlinear regression model:
nlregmod2 <- nls(y ~ theta1 - theta2*exp(-theta3*x),
start =
list(theta1 = 0.37,
theta2 = exp(-1.8),
theta3 =
2003 Jul 08
2
NLME Fitted Values
Dear List:
I am having difficulties with the fitted values at different levels of a multilevel model. My data set is a series of student test scores over time with a total of 7,280 observations, 1,720 students nested witin 60 schools. The data set is not balanced.
The model was fit using
eg.model.1<-lme(math~year, random=~year|schoolid/childid, data=single).
When I call the random
2008 Jul 17
1
Newbie's question about lm
Hello,
I would like to fit data with the following formula :
y=V*(1+alpha*(x-25))
where y and x are my data, V is a constant and alpha is the slope I'm
looking for.
How to translate this into R-language ?
At the moment, I only know : lm(y ~ x)
Sorry for such a basic question. I thought I could find the solution in a
post but I have to confess that, up to know, I'm not able to understand
2004 Apr 27
3
se.fit in predict.glm
Hi Folks,
I'm seeking confirmation of something which is probably true
but which I have not managed to find in the documentation.
I have a binary response y={0.1} and a variable x and have
fitted a probit response to the data with
f <- glm( y~x, family=binomial(link=probit) )
and then, with a specified set of x-value X I have used the
predict.glm function as
p <- predict( f, X,
2023 Aug 20
1
Issues when trying to fit a nonlinear regression model
Oh, sorry; I changed signs in the model, fitting
theta0 + theta1*exp(theta2*x)
So for theta0 - theta1*exp(-theta2*x) use theta1= -.exp(-1.8) and theta2 =
+.055 as starting values.
-- Bert
On Sun, Aug 20, 2023 at 11:50?AM Paul Bernal <paulbernal07 at gmail.com> wrote:
> Dear Bert,
>
> Thank you so much for your kind and valuable feedback. I tried finding the
> starting
2011 Nov 29
3
Negative exponential fit
We need help....
We are doing a project for a statistical class in and we are looking at
world record times in different running events over time. We are trying to
fit the data with a negative exponential but we just cant seem to get a
function that works properly.
we have on our x-axis the date and on the y-axis the time(in seconds). So as
you can imagine, the times have decreased and appear to
2010 Nov 08
1
Add values of rlm coefficients to xyplot
Hello,
I have a simple xyplot with rlm lines.
I would like to add the a and b coefficients (y=ax+b) of the rlm calculation
in each panel.
I know I can do it 'outside' the xyplot command but I would like to do all
at the same time.
I found some posts with the same question, but no answer.
Is it impossible ?
Thanks in advance for your help.
Ptit Bleu.
x11(15,12)
xyplot(df1$col2 ~
2023 Aug 20
1
Issues when trying to fit a nonlinear regression model
Dear Bert,
Thank you for your extremely valuable feedback. Now, I just want to
understand why the signs for those starting values, given the following:
> #Fiting intermediate model to get starting values
> intermediatemod <- lm(log(y - .37) ~ x, data=mod14data2_random)
> summary(intermediatemod)
Call:
lm(formula = log(y - 0.37) ~ x, data = mod14data2_random)
Residuals:
Min