[R] quantile regression with complex survey data

Donia Smaali Bouhlila sma.ali at fsjegj.rnu.tn
Tue Sep 16 23:39:28 CEST 2014

Dear r Users,
I am new in r. I am trying to estimate regression quantiles in complex 
surveys.I used these commands.

bootdesign <-  as.svrepdesign(mydesign,type="auto",replicates=150)

  However, I don't get the results of the estimated coefficients.In 
addition, I don't know how to calculate pseudo R squared.

When I type summary (fit) , I get the following results:

summary (fit)
    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.
-33.340  -6.358  12.200  38.800  17.510 645.700

For the pseudo R squared , I read the post [R] Pseudo R for Quant Reg 
showing how to compute it:

rho <- function(u,tau=.5)u*(tau - (u < 0))
	V <- sum(rho(f$resid, f$tau))

when I type

  > rho <- function(u,tau=.5)u*(tau - (u < 0))
V <- sum(rho(fit$resid, fit$tau))

I get the following message
Error in fit$resid : $ operator is invalid for atomic vectors

Any help please

Dr. Donia Smaali Bouhlila
Department of Economics
Faculté des Sciences Economiques et de Gestion de Tunis

More information about the R-help mailing list