Marie-Line GLAESENER
2014-May-19 12:55 UTC
[R] Spatial Quantile Regression: Extracting residuals
Dear R users, Could anyone tell me if there is a way to obtain the residuals from a model fitted by qregspiv(y ~ x,wmat=wmat,inst=NULL,tau=.5,rhomat = seq(-1,1,.01),printsariv=T,silent=F, nboot=300,data=) in McSpatial, using the Chernozhukov and Hansen (2006) method. Many thanks in advance and kind regards, Marie-Line Ph.D. Candidate Institute of Geography and Spatial Planning UNIVERSITÉ DU LUXEMBOURG CAMPUS WALFERDANGE Route de Diekirch / BP 2 L-7201 Walferdange Luxembourg marie-line.glaesener@uni.lu<mailto:marie-line.glaesener@uni.lu> www.geo.ipse.uni.lu<http://www.geo.ipse.uni.lu/> [[alternative HTML version deleted]]
Marie-Line GLAESENER <Marie-Line.Glaesener <at> uni.lu> writes:> > Dear R users, > > Could anyone tell me if there is a way to obtain the residuals from amodel fitted by> > qregspiv(y ~ x,wmat=wmat,inst=NULL,tau=.5,rhomat seq(-1,1,.01),printsariv=T,silent=F, nboot=300,data=) > > in McSpatial, using the Chernozhukov and Hansen (2006) method.This is a very specialised question, and even on the more appropriate list R-sig-geo might not be answered. Writing to the package maintainer is one possibility, but as you see from: library(McSpatial) example(qregspiv) fit <- qregspiv(form, wmat=wmat, data=mdata, rhomat=seq(-1,1,0.01), nboot=300, tau=0.5) str(fit) shows only: num [1:4, 1:4] 7.35 0.288 0.343 0.05 1.993 ... - attr(*, "dimnames")=List of 2 ..$ : chr [1:4] "(Intercept)" "lnland" "lnbldg" "WY" ..$ : chr [1:4] "Coef." "Std. Err." "Z-Values" "Pr(>|z|)" so that apart from the coefficient values and their distribution summaries, nothing else is returned. This means that you will have to put qregspiv into debug() mode, and manipulate those internal objects that you need, but which are not returned. Hope this helps, Roger> > Many thanks in advance and kind regards, > > Marie-Line > > Ph.D. Candidate > Institute of Geography and Spatial Planning > > UNIVERSIT? DU LUXEMBOURG > CAMPUS WALFERDANGE > Route de Diekirch / BP 2 > L-7201 Walferdange > Luxembourg > marie-line.glaesener <at> uni.lu<mailto:marie-line.glaesener <at> uni.lu> > www.geo.ipse.uni.lu<http://www.geo.ipse.uni.lu/> > > > > > Dear R users, > > Could anyone tell me if there is a way to obtain the residuals from amodel fitted by> > qregspiv(y ~ x,wmat=wmat,inst=NULL,tau=.5,rhomat seq(-1,1,.01),printsariv=T,silent=F, nboot=300,data=) > > in McSpatial, using the Chernozhukov and Hansen (2006) method. > > Many thanks in advance and kind regards, > > Marie-Line > > Ph.D. Candidate > Institute of Geography and Spatial Planning > > UNIVERSIT? DU LUXEMBOURG > CAMPUS WALFERDANGE > Route de Diekirch / BP 2 > L-7201 Walferdange > Luxembourg > marie-line.glaesener <at> uni.lu<mailto:marie-line.glaesener <at> uni.lu> > www.geo.ipse.uni.lu<http://www.geo.ipse.uni.lu/> > > [[alternative HTML version deleted]] > >