Re: [R] smooth.spline error while fitting bacterial growth curves with grofit

2015-05-18 Thread Bert Gunter
Your question is OFFTOPIC for this list. Post on a statistics list like stats.stackexchange.com . But both your proposals are wrong, though depending on your data and purpose, they may be adequate. I suggest you consult wit a local statistician on the use of mixed effects models for repeated measu

Re: [R] smooth.spline error while fitting bacterial growth curves with grofit

2015-05-17 Thread Jeffrey David Johnson
Thanks, I think you're right. I removed the strains whose final OD was below 0.2 since all the ones that clearly grew are above that, and grofit produces fewer errors on the remaining 6. The error still happens occasionally, but if I stick to 1000 bootstraps instead of 1 it's not often. Of cour

Re: [R] smooth.spline error while fitting bacterial growth curves with grofit

2015-05-17 Thread Bert Gunter
1. Very likely, you have insufficient data in some of your growth curves to do the fits using gcv. If you remove the curves where the bacteria didn't grow, things should work. Alternatively, there may well be ways of expressing the model that would allow pooling across cultures that didn't grow. (

[R] smooth.spline error while fitting bacterial growth curves with grofit

2015-05-17 Thread Jeffrey David Johnson
I'm trying to use the grofit package to compare growth rates between bacterial cultures, but I've come across a couple glitches/things I don't understand. I'm not sure if they're related to the package or to a problem with my growth data, which is messy. Some strains don't follow a proper logarithm

Re: [R] smooth.spline gives different results from sreg ?

2013-07-27 Thread Duncan Murdoch
On 13-07-27 2:50 PM, Jean-Luc Dupouey wrote: Dear R-helpers, I compared various programs for cubic spline smoothing, and it appeared that smooth.spline ( stats version 3.0.1) seems to behave surprisingly. For enough long series and low values of lambda (or spar), the results of smooth.spline see

[R] smooth.spline gives different results from sreg ?

2013-07-27 Thread Jean-Luc Dupouey
Dear R-helpers, I compared various programs for cubic spline smoothing, and it appeared that smooth.spline ( stats version 3.0.1) seems to behave surprisingly. For enough long series and low values of lambda (or spar), the results of smooth.spline seem to be different from those of sreg ( packa

Re: [R] smooth.spline() unique 'x' values error

2012-02-15 Thread Prof Brian Ripley
On 15/02/2012 15:00, Nicholas Reich wrote: Hello. I'm getting an unexpected result when running smooth.spline(). Here is a simple example that replicates the error I'm getting: aa<- c(1, 2, 3, 8, 8, 8, 8, 8, 8, 8, 8, 8, 12, 13, 14) bb<- 1:length(aa) plot(aa, bb) smooth.spline(aa, bb) Error i

[R] smooth.spline() unique 'x' values error

2012-02-15 Thread Nicholas Reich
Hello. I'm getting an unexpected result when running smooth.spline(). Here is a simple example that replicates the error I'm getting: > aa <- c(1, 2, 3, 8, 8, 8, 8, 8, 8, 8, 8, 8, 12, 13, 14) > bb <- 1:length(aa) > plot(aa, bb) > smooth.spline(aa, bb) Error in smooth.spline(aa, bb) : need at l

[R] smooth.spline() fucntion

2009-06-10 Thread array chip
Hi, all, I found that the smooth.spline() function produces different results between R and S-Plus. I was trying to play different parameters of the function without any success. The script of the function contains Fortran code, so it seems impossible to port the code from S-Plus to R (or I may

Re: [R] smooth.spline

2008-07-20 Thread rkevinburton
Actually that was my next question. From the books that I have I see a "natural spline" and a clamped spline. I am assuming that "natural" (Umerical Analysis, Burden, et. all.) cooresponds to 'R''s "natural" method. I am not clear on what a clamped spline cooresponds to (fmm or perodic). Or what

Re: [R] smooth.spline

2008-07-20 Thread Spencer Graves
Duncan Murdoch wrote: On 20/07/2008 11:11 AM, Spencer Graves wrote: Are you aware that there are many different kinds of splines? With "spline" and "splinefun", you can use method = "fmm" (Forsyth, Malcolm and Moler), "natural", or "periodic". I'm not familiar with "fmm", but it see

Re: [R] smooth.spline

2008-07-20 Thread Duncan Murdoch
On 20/07/2008 11:11 AM, Spencer Graves wrote: Are you aware that there are many different kinds of splines? With "spline" and "splinefun", you can use method = "fmm" (Forsyth, Malcolm and Moler), "natural", or "periodic". I'm not familiar with "fmm", but it seems to be adequately explai

Re: [R] smooth.spline

2008-07-20 Thread Spencer Graves
Are you aware that there are many different kinds of splines? With "spline" and "splinefun", you can use method = "fmm" (Forsyth, Malcolm and Moler), "natural", or "periodic". I'm not familiar with "fmm", but it seems to be adequately explained by the "Manual spline evaluation" you quote

Re: [R] smooth.spline

2008-07-19 Thread hadley wickham
On Fri, Jul 18, 2008 at 10:15 PM, Roland Rau <[EMAIL PROTECTED]> wrote: > Spencer Graves wrote: >> >> I found the first chapter of Paul Dierckx (1993) Curve and Surface Fitting >> with Splines (Oxford U. Pr.). Beyond that, I've learned a lot from the >> 'fda' package and the two companion volumes

Re: [R] smooth.spline

2008-07-19 Thread rkevinburton
Fair enough. FOr a spline interpolation I can do the following: > n <- 9 > x <- 1:n > y <- rnorm(n) > plot(x, y, main = paste("spline[fun](.) through", n, "points")) > lines(spline(x, y)) Then look at the coefficients generated as: > f <- splinefun(x, y) > ls(envir = environment(f)) [1] "ties" "

Re: [R] smooth.spline

2008-07-18 Thread Spencer Graves
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. I do NOT know how to do what you want, but with a self-contained example, I suspect many people on this list -- probably including me -- co

Re: [R] smooth.spline

2008-07-18 Thread Roland Rau
Spencer Graves wrote: I found the first chapter of Paul Dierckx (1993) Curve and Surface Fitting with Splines (Oxford U. Pr.). Beyond that, I've learned a lot from the 'fda' package and the two companion volumes by Ramsay and Silverman (2006) Functional Data Analysis, 2nd ed. and (2002) Applie

Re: [R] smooth.spline

2008-07-17 Thread Spencer Graves
I believe that a short answer to your question is that the "smooth" is a linear combination of B-spline basis functions, and the coefficients are the weights assigned to the different B-splines in that basis. Before offering a much longer answer, I would want to know what problem yo

[R] smooth.spline

2008-07-17 Thread rkevinburton
I like what smooth.spline does but I am unclear on the output. I can see from the documentation that there are fit.coef but I am unclear what those coeficients are applied to.With spline I understand the "noraml" coefficients applied to a cubic polynomial. But these coefficients I am not sure ho