[R] Non-Linear Quantile Regression

Bernardo Rangel Tura tura at centroin.com.br
Wed Jan 2 09:41:43 CET 2008


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




More information about the R-help mailing list