Hello everyone, I am doing nonlinear regression using a same sigmoidal model for different treatments. for each treatment, I got a set of estimated parameters (a1, b1, c1 for treatment 1; a2, b2, c2 for treatment 2; a3, b3, c3 for treatment 3). And I want to compare these parameters for different treatments to see is there any differences? does estimated parameter for treatment i different from other treatments? How can I do this analysis please? Thanks in advance! Regards, Julian
This is a statistical question, and is off topic for this list, which is about R programming. Post to a statistical list, like stats.stackexchange.com, instead. Warning: This is not a simple issue. You should seriously consider getting local advice from someone with the necessary statistical expertise. Gratuitous Question born from personal frustration with such queries(so feel free to ignore): Why are you using (statistical) procedures that you do not understand? Of course the parameters for different treatments are "different"! -- but how and with what importance depends on the context in which you are working. Instead of fooling with cryptic statistical mumbo jumbo that invite misuse -- and which are probably valueless or idiotic anyway -- why don't you make some graphs and consider what they say in terms of the substantive issues at play? (Of course I know the answer -- it is because that is what your academic culture/journals demand. But therein lies the problem: what is demanded is junk). Cheers, Bert Bert Gunter "Data is not information. Information is not knowledge. And knowledge is certainly not wisdom." -- Clifford Stoll On Tue, Aug 25, 2015 at 3:34 PM, Jianling Fan <fanjianling at gmail.com> wrote:> Hello everyone, > > I am doing nonlinear regression using a same sigmoidal model for > different treatments. for each treatment, I got a set of estimated > parameters (a1, b1, c1 for treatment 1; a2, b2, c2 for treatment 2; > a3, b3, c3 for treatment 3). And I want to compare these parameters > for different treatments to see is there any differences? does > estimated parameter for treatment i different from other treatments? > > How can I do this analysis please? > > Thanks in advance! > > Regards, > > Julian > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > 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.
On 26/08/15 10:59, Bert Gunter wrote: <SNIP>> Gratuitous Question born from personal frustration with such > queries(so feel free to ignore): Why are you using (statistical) > procedures that you do not understand? Of course the parameters for > different treatments are "different"! -- but how and with what > importance depends on the context in which you are working. Instead of > fooling with cryptic statistical mumbo jumbo that invite misuse -- and > which are probably valueless or idiotic anyway -- why don't you make > some graphs and consider what they say in terms of the substantive > issues at play? (Of course I know the answer -- it is because that is > what your academic culture/journals demand. But therein lies the > problem: what is demanded is junk).Fortune nomination!!! cheers, Rolf Turner -- Technical Editor ANZJS Department of Statistics University of Auckland Phone: +64-9-373-7599 ext. 88276
On 26 Aug 2015, at 00:34 , Jianling Fan <fanjianling at gmail.com> wrote:> Hello everyone, > > I am doing nonlinear regression using a same sigmoidal model for > different treatments. for each treatment, I got a set of estimated > parameters (a1, b1, c1 for treatment 1; a2, b2, c2 for treatment 2; > a3, b3, c3 for treatment 3). And I want to compare these parameters > for different treatments to see is there any differences? does > estimated parameter for treatment i different from other treatments? > > How can I do this analysis please?Notwithstanding possibly well-founded snide remarks from Bert and Rolf... If we take this as a purely technical question, it might be helpful to notice that you can do stuff like this:> plot(y~x,data=dd) > y1 <- rnorm(10,exp(0.1*x),.1) > y2 <- rnorm(10,exp(0.2*x),.1) > y3 <- rnorm(10,exp(0.3*x),.1) > dd <- data.frame(x=c(x,x,x), y=c(y1,y2,y3), g = factor(rep(1:3, each=10))) > plot(y~x, pch=g, data=dd)> nls(y ~ exp(a[g]*x), data=dd, start=list(a=c(.1,.2,.3)))Nonlinear regression model model: y ~ exp(a[g] * x) data: dd a1 a2 a3 0.1017 0.2011 0.2997 residual sum-of-squares: 0.2578 Number of iterations to convergence: 2 Achieved convergence tolerance: 2.678e-06> m1 <- nls(y ~ exp(a[g]*x), data=dd, start=list(a=c(.1,.2,.3))) > m2 <- nls(y ~ exp(a*x), data=dd, start=list(a=.2)) > anova(m1,m2)Analysis of Variance Table Model 1: y ~ exp(a[g] * x) Model 2: y ~ exp(a * x) Res.Df Res.Sum Sq Df Sum Sq F value Pr(>F) 1 27 0.258 2 29 315.326 -2 -315.07 16498 < 2.2e-16 *** --- Signif. codes: 0 ?***? 0.001 ?**? 0.01 ?*? 0.05 ?.? 0.1 ? ? 1 I.e.: 1) The principle is to formulate your three separate models as a single model for _all_ data, with parameters depending on group, then reduce the model by letting one or more of the parameter sets being a single parameter. 2) The []-notation for group-dependent parameters in nls() is useful and rather easily overlooked. -- Peter Dalgaard, Professor, Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg, Denmark Phone: (+45)38153501 Office: A 4.23 Email: pd.mes at cbs.dk Priv: PDalgd at gmail.com