Re: [R] Confidence Intervals on Standard Curve

2011-02-20 Thread Ben Ward
On 20/02/2011 18:52, David Winsemius wrote: On Feb 20, 2011, at 1:27 PM, Ben Ward wrote: However, the Y ~ X + Y^2 Produces the best fitting line - it is pretty much on the data points - I'm trying to make a standard curve, with which to take readings from a spectrophotometer off of. Rather

Re: [R] Confidence Intervals on Standard Curve

2011-02-20 Thread David Winsemius
On Feb 20, 2011, at 1:27 PM, Ben Ward wrote: However, the Y ~ X + Y^2 Produces the best fitting line - it is pretty much on the data points - I'm trying to make a standard curve, with which to take readings from a spectrophotometer off of. Rather than what I would normally use models fo

Re: [R] Confidence Intervals on Standard Curve

2011-02-20 Thread Ben Ward
It is, I tried a glm with a poisson distribution, as was suggested to me previously, but the Residual Deviance was too high - the book I'm reading says it suggests overdispersion because it's way above the Residual degrees of freedom: glm(formula = Approximate.Counts ~ X..Light.Transmission, f

Re: [R] Confidence Intervals on Standard Curve

2011-02-20 Thread nzcoops
model <- lm(Approximate.Counts~X..Light.Transmission + I(Approximate.Counts^2), data=Standards) Might not be addressing the problem, don't you have Y ~ X + Y^2 here? That's a violation of the assumptions of an lm isn't it? Also for plotting CI on a curve look into ggplot2::geom_ribbon, it's muc

Re: [R] Confidence Intervals on Standard Curve

2011-02-19 Thread Ben Ward
Hi David, I had use log(x)inside the lm call and used predict, although I didn't know about logs of data making a multiplacative model exp(log(x)+log(y)) = x*y. I'll have a look at the poisson model. and see what I manage to produce. Looking at the internet the Cumulative distribution functio

Re: [R] Confidence Intervals on Standard Curve

2011-02-19 Thread David Winsemius
On Feb 19, 2011, at 1:08 PM, Ben Ward wrote: Hi Graham, Thanks, that does explain lots. I've been playing with making log's of data in models to make the relationship linear, which it does, which suggests to me that lm() is the right way to go, however, after if try to predict after y valu

Re: [R] Confidence Intervals on Standard Curve

2011-02-19 Thread Ben Ward
Hi Graham, Thanks, that does explain lots. I've been playing with making log's of data in models to make the relationship linear, which it does, which suggests to me that lm() is the right way to go, however, after if try to predict after y values after about 60% on the x axis for light trans

Re: [R] Confidence Intervals on Standard Curve

2011-02-19 Thread Ben Ward
I've just realised the couple of graphs I put on here have been stripped off. If anyone has to see them and can't see my problem from code, I can send them directly to anyone who thinks they can help but wants to see them. Thanks, Ben W. On 18/02/2011 23:29, Ben Ward wrote: Hi, I wonder if an

[R] Confidence Intervals on Standard Curve

2011-02-18 Thread Ben Ward
Hi, I wonder if anyone could advise me with this: I've been trying to make a standard curve in R with lm() of some standards from a spectrophotometer, so as I can express the curve as a formula, and so obtain values from my treated samples by plugging in readings into the formula, instead of t