Re: [R] Calculating NOEL using R and logistic regression - Toxicology

2012-04-02 Thread vito.muggeo
dear Danielle, The NOEL is a threshold value or breakpoint in the range of dose. Have a look to the package segmented to estimate a GLM with unknown breakpoints. The code (untested) should be something like library(segmented) o-glm(y~1, family=binomial) os-segmented(o, ~dose, psi=starting_psi)

Re: [R] Help with segmented package

2012-03-01 Thread vito.muggeo
dear Phil, plot.segmented() accepts vectorized 'col', 'lty' and 'lwd' arguments. Then, par(mfrow=c(1,2)) plot(o.seg,col=2:3,lty=2:3,lwd=c(1,2)) plot(z,y) plot(o.seg,col=2:3,lty=1,linkinv=T,add=T,lwd=2) hope this helps you, vito On Thu, 1 Mar 2012 08:57:39 -0800 (PST), Filoche wrote Hi

Re: [R] B-spline/smooth.basis derivative matrices

2012-02-25 Thread vito.muggeo
dear s, If you are willing to use B-splines placing p knots, say, (rather than smoothing splines placing n knots), you could have a look to the functions splineDesign() or spline.des() (argument derivs) in the package splines. vito On Fri, 24 Feb 2012 12:28:58 -0800 (PST), Vassily Shvets

Re: [R] piecewise regression

2011-01-14 Thread vito.muggeo
dear all, The package segmented allows to estimate piecewise linear relationships (*connected* lines, i.e. a gradual change in the slope) with several breakpoints (known or unknown) within (generalized) linear models.. The package also includes some functions for plotting and testing.. Have a

Re: [R] Population abundance, change point

2010-11-17 Thread vito.muggeo
dear Nick, I do not know your data, however it seems to me that the pattern of relative abundance of salamanders should not exhibit a sudden change, but rather a gradual change. If this is the case, have a look to the segmented package and references therin. In particular have a look to the