So I have a data set I would like to model using a non-linear method. I know it should be an exponential decay. However I know what the first derivative of the equation should be at two points, x=0 and x=100. Is there anyway to establish this when inputing the model or how would one go about this before the nls statement.... -Thanks, Matt -- View this message in context: http://n4.nabble.com/Non-linear-regression-tp1471736p1471736.html Sent from the R help mailing list archive at Nabble.com.
On Feb 6, 2010, at 10:33 PM, kupz wrote:> > So I have a data set I would like to model using a non-linear > method. I know > it should be an exponential decay. However I know what the first > derivative > of the equation should be at two points, x=0 and x=100. Is there > anyway to > establish this when inputing the model or how would one go about > this before > the nls statement....Given the rather simple relationship between the exponential function and its derivative, why would you need the regression if you already have those two points for dy/dx ( as well as the value of the function at x=0)? Is this homework? -- David Winsemius, MD Heritage Laboratories West Hartford, CT
Agreed, it would be simple to propose the relationship, however the regression is necessary to model the data properly. Unfortunately a simple decay based on those two points does not have the proper shape necessary. This is due to an extreme amount of zero inflation with this fisheries data. On another note, I have a working solution for the problem, I am excluding a portion of the zero data based on some other apriori assumptions.. Thanks for your help though. -- View this message in context: http://n4.nabble.com/Non-linear-regression-tp1471736p1471749.html Sent from the R help mailing list archive at Nabble.com.
It appears my suspicions about this being homework were unfounded. Given the additional problems with excess zeroes, you may want to examine the extremely informative material on analysis of such problems written by Zeileis, Kleiber and Jackman: (easily found in case you have misplaced it, as I had, with a Google search for: "r-project" zero-inflated hurdle models "Regression Models for Count Data in R" http://cran.cnr.berkeley.edu/web/packages/pscl/vignettes/countreg.pdf -- David. On Feb 6, 2010, at 10:56 PM, kupz wrote:> > Agreed, it would be simple to propose the relationship, however the > regression is necessary to model the data properly. Unfortunately a > simple > decay based on those two points does not have the proper shape > necessary. > This is due to an extreme amount of zero inflation with this > fisheries data. > > On another note, I have a working solution for the problem, I am > excluding a > portion of the zero data based on some other apriori assumptions.. > Thanks > for your help though. > -- > View this message in context: http://n4.nabble.com/Non-linear-regression-tp1471736p1471749.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.David Winsemius, MD Heritage Laboratories West Hartford, CT