Roger:
Doh! Just realized I had that error in the code -- raw_data is the same as
mydata, so it should be:
mydata <- read.csv("singular.csv")
plot(mydata$predictor,mydata$response)
# A big cloud of points, nothing too weird
summary(mydata)
# No NAs:
# X response predictor
# Min. : 1 Min. : 0.0 Min. : 0.000
# 1st Qu.:12726 1st Qu.: 851.2 1st Qu.: 0.000
# Median :25452 Median : 2737.0 Median : 0.000
# Mean :25452 Mean : 3478.0 Mean : 5.532
# 3rd Qu.:38178 3rd Qu.: 5111.6 3rd Qu.: 5.652
# Max. :50903 Max. :26677.8 Max. :69.342
fit_spl <- rq(response ~ bs(predictor,df=15),tau=1,data=mydata)
# Error in rq.fit.br(x, y, tau = tau, ...) : Singular design matrix
--j
On Fri, Apr 19, 2013 at 8:15 AM, Koenker, Roger W <[email protected]>wrote:
> Jonathan,
>
> This is not what we call a reproducible example... what is raw_data? Does
> it have something to do with mydata?
> what is i?
>
> Roger
>
> url: www.econ.uiuc.edu/~roger Roger Koenker
> email [email protected] Department of Economics
> vox: 217-333-4558 University of Illinois
> fax: 217-244-6678 Urbana, IL 61801
>
> On Apr 16, 2013, at 2:58 PM, Greenberg, Jonathan wrote:
>
> > Quantreggers:
> >
> > I'm trying to run rq() on a dataset I posted at:
> >
> https://docs.google.com/file/d/0B8Kij67bij_ASUpfcmJ4LTFEUUk/edit?usp=sharing
> > (it's a 1500kb csv file named "singular.csv") and am getting the
> following error:
> >
> > mydata <- read.csv("singular.csv")
> > fit_spl <- rq(raw_data[,1] ~ bs(raw_data[,i],df=15),tau=1)
> > > Error in rq.fit.br(x, y, tau = tau, ...) : Singular design matrix
> >
> > Any ideas what might be causing this or, more importantly, suggestions
> for how to solve this? I'm just trying to fit a smoothed hull to the top
> of the data cloud (hence the large df).
> >
> > Thanks!
> >
> > --jonathan
> >
> >
> > --
> > Jonathan A. Greenberg, PhD
> > Assistant Professor
> > Global Environmental Analysis and Remote Sensing (GEARS) Laboratory
> > Department of Geography and Geographic Information Science
> > University of Illinois at Urbana-Champaign
> > 607 South Mathews Avenue, MC 150
> > Urbana, IL 61801
> > Phone: 217-300-1924
> > http://www.geog.illinois.edu/~jgrn/
> > AIM: jgrn307, MSN: [email protected], Gchat: jgrn307, Skype: jgrn3007
>
>
--
Jonathan A. Greenberg, PhD
Assistant Professor
Global Environmental Analysis and Remote Sensing (GEARS) Laboratory
Department of Geography and Geographic Information Science
University of Illinois at Urbana-Champaign
607 South Mathews Avenue, MC 150
Urbana, IL 61801
Phone: 217-300-1924
http://www.geog.illinois.edu/~jgrn/
AIM: jgrn307, MSN: [email protected], Gchat: jgrn307, Skype: jgrn3007
[[alternative HTML version deleted]]
______________________________________________
[email protected] 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.