[R] Zero-dose constraint in modeling dose-response curves with gam
Simon Wood
s.wood at bath.ac.uk
Fri Mar 7 09:24:22 CET 2014
Looking back at my post (Mar 26, 2013; 7:28am Re: [R] Use pcls in "mgcv"
package to achieve constrained cubic spline), it seems to me that you
could use the same trick, but omit the `-1' from the model formula. i.e.
you set up a bunch of smooths constrained to pass through zero at zero,
but leave the overall intercept to be estimated. That way the overall
intercept is the common mean response at zero dose...
best,
Simon
ps. you set up the model matrix for each smooth as if it were going to
be used to smooth the measurements for all products at once, but then
zero the rows corresponding to measurements that come from products that
the smooth does not apply to.
On 06/03/14 21:08, Bleary wrote:
> I wish to compare several "products" in terms of their dose-response
> functions as estimated by smooths via the gam function. Included in the
> experimental evaluations are zero-dose ("blank") measurements. I want to set
> up the gam estimation so that the fitted smooths for the several products
> converge to a common value at zero dose equal to the estimated response for
> the blank. I've read Simon Wood's post of Mar 26, 2013; 7:28am providing an
> example of constraining a spline to pass through a particular point - but I
> don't want to specify the response value there, I want to estimate it. Can
> this be done with gam? If so, please point me to the relevant locations in
> the gam or mgcv documentation or in Simon Wood's book on how to do this, or
> if possible provide example R code. Thanks! -Bleary
>
>
>
> --
> View this message in context: http://r.789695.n4.nabble.com/Zero-dose-constraint-in-modeling-dose-response-curves-with-gam-tp4686367.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
--
Simon Wood, Mathematical Science, University of Bath BA2 7AY UK
+44 (0)1225 386603 http://people.bath.ac.uk/sw283
More information about the R-help
mailing list