Hello,

I am having trouble obtaining AIC or pseudo R2 for nonlinear quantile
regression fits. I would like to use one of these measures to compare
non-nested models (each with a unique predictor variable).

For example, I am trying to fit the following gaussian peak model using the
quantreg package:

fit1.nlrq <- nlrq(y ~ a*exp(-((x-b)/c)**2), data=data, start =
list(a=.2,b=25.5,c=1), tau=0.5, trace=T);

(and so on, for multiple tau; I want to compare this model at each tau to a
similar model that has, say, "x1" in place of "x" as its predictor
variable.)

Parameter estimates and predictions for these models look as expected, but
when I try to use AIC(fit1.nlrq) or AIC.nlrq(fit1.nlrq) I get the following
output

numeric(0)
attr(,"edf")
[1] 0

Similarly, logLik(fit1.nlrq)

yields

'log Lik.'  (df=0)


I unfortunately do not understand why there are 0 df for the log
likelihood. Can someone advise?

As an alternative, I could perhaps calculate a pseudo R2. I think this
would be [1 - (deviance of fitted model/ deviance of null model)] but
don't know how to obtain the deviance for the relevant null models.
Any code or advice on this front would also be greatly appreciated.

(Also confused about why I can obtain deviance but not AIC or logLik,
I thought these three values were closely related to one another; I
would be uneasy to calculate AIC by hand from deviance when the
package refuses to do so, until I understand better what is going on.)

If there is a more desirable alternative for comparing among
non-nested, nonlinear, quantile regression models, I would be glad to
hear it.


I am new to R and to R-help and would be happy to provide more details
of my code or output if this would be useful. Many thanks for any
insight.


sessionInfo is as follows:

R version 3.0.0 (2013-04-03)
Platform: x86_64-w64-mingw32/x64 (64-bit)

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United
States.1252
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C
[5] LC_TIME=English_United States.1252

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

other attached packages:
[1] quantreg_4.98 SparseM_1.02

loaded via a namespace (and not attached):
[1] tools_3.0.0



-- 
Elsa Youngsteadt
Department of Entomology
North Carolina State University

        [[alternative HTML version deleted]]

______________________________________________
R-help@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.

Reply via email to