Please, I have a problem with nonlinear quantile regression. My data shows a large variability and the quantile regression seemed perfect to relate two given variables. I got to run the linear quantile regression analysis and to build the graph in the R (with quantreg package). However, the up part of my data dispersion seems a positive exponential curve, while the down part seems a negative exponential curve. The median part seems linear (maybe non-significant). I think that I needs to run a non-linear quantile regression for this dataset (including a tau = 0.1, 0.25, 0.5, 0.75 and 0.90 ). The problem is: I read very much many manuals about Quantile regression and the operational use of R, but I did not get to put parametrs in R to run this non-linear analysis. Might the function in R be the following? nlrq(formula, data=parent.frame(), start, tau=0.5, control, trace=FALSE,method="L-BFGS-B") What's the formula I could put here for my data?? How I put my file in this function? Might it be as [scan(file=read.dat" ]?? But where? At last, one confirmation: Can I run log X log analysis in nlrq?? Please, I need very much any response, as I don't know what make in this moment... Thank you very much, Humberto Marotta phD Student from Federal University of Rio de Janeiro [[alternative HTML version deleted]]
Hello, You use nlrq() pretty much the same as nls(). Look at ?nls and you will find there many examples on how to use it. The easiest way is to use with a "self-start model". Do apropos("^ss") to get the list of self-starting models defined, and look at their respective help pages to see if one would fit your needs. Best, Philippe Grosjean Humberto Marotta wrote:> Please, > > I have a problem with nonlinear quantile regression. > > My data shows a large variability and the quantile regression seemed perfect > to relate two given variables. I got to run the linear quantile regression > analysis and to build the graph in the R (with quantreg package). However, the > up part of my data dispersion seems a positive exponential curve, while the > down part seems a negative exponential curve. The median part seems linear > (maybe non-significant). I think that I needs to run a non-linear quantile > regression for this dataset (including a tau = 0.1, 0.25, 0.5, 0.75 and 0.90 > ). > > The problem is: I read very much many manuals about Quantile regression and > the operational use of R, but I did not get to put parametrs in R to run > this non-linear analysis. > > Might the function in R be the following? > nlrq(formula, data=parent.frame(), start, tau=0.5, control, > trace=FALSE,method="L-BFGS-B") > > What's the formula I could put here for my data?? How I put my file in this > function? Might it be as [scan(file=read.dat" ]?? But where? > > At last, one confirmation: Can I run log X log analysis in nlrq?? > > Please, I need very much any response, as I don't know what make in this > moment... > > Thank you very much, > Humberto Marotta > > phD Student from Federal University of Rio de Janeiro > > [[alternative HTML version deleted]] > > ______________________________________________ > 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. >
On Tue, 2008-01-01 at 15:16 +0100, Humberto Marotta wrote:> Please, > > I have a problem with nonlinear quantile regression. > > My data shows a large variability and the quantile regression seemed perfect > to relate two given variables. I got to run the linear quantile regression > analysis and to build the graph in the R (with quantreg package). However, the > up part of my data dispersion seems a positive exponential curve, while the > down part seems a negative exponential curve. The median part seems linear > (maybe non-significant). I think that I needs to run a non-linear quantile > regression for this dataset (including a tau = 0.1, 0.25, 0.5, 0.75 and 0.90 > ). > > The problem is: I read very much many manuals about Quantile regression and > the operational use of R, but I did not get to put parametrs in R to run > this non-linear analysis. > > Might the function in R be the following? > nlrq(formula, data=parent.frame(), start, tau=0.5, control, > trace=FALSE,method="L-BFGS-B") > > What's the formula I could put here for my data?? How I put my file in this > function? Might it be as [scan(file=read.dat" ]?? But where?Well first you must put your data in a data frame sou you need type base<-scan(file="read.dat") Second is necessary look your data to understand the relations about your variables, I suggest: attach(base) plot(independent variable, dependent variable) So based in this plot you choose de formula of your data> > At last, one confirmation: Can I run log X log analysis in nlrq?? > > Please, I need very much any response, as I don't know what make in this > moment... > > Thank you very much, > Humberto Marotta > > phD Student from Federal University of Rio de Janeiro >-- Bernardo Rangel Tura, M.D,MPH,Ph.D National Institute of Cardiology Brazil