0

I want to run panel quantile for fixed effect in r using rqpd package. I tried running the examples

set.seed(10)
m <- 3
s <- as.factor(rep(1:n,rep(m,n)))
x <- exp(rnorm(n*m))
u <- x*rnorm(m*n) + (1-x)*rf(m*n,3,3)
a <- rep(rnorm(n),rep(m,n))
y <- rep(1:n,rep(m,n)) + u 
fit <- rqpd(y ~ x | s, panel(lambda = 5))

But i get the error:

Error in validObject(.Object) : invalid class “dsparseModelMatrix” object: superclass "mMatrix" not defined in the environment of the object's class

Kjartan
  • 18,591
  • 15
  • 71
  • 96
vishal21
  • 1
  • 2
  • Example not [reproducible](http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example). –  Jul 23 '14 at 10:22

2 Answers2

0

you are missing to define n for that example. The original works perfectly fine. To run this package I use R version 2.15.3

set.seed(10) m <- 3 n <- 10 s <- as.factor(rep(1:n,rep(m,n))) x <- exp(rnorm(n*m)) u <- x*rnorm(m*n) + (1-x)*rf(m*n,3,3) a <- rep(rnorm(n),rep(m,n)) y <- a + u fit <- rqpd(y ~ x | s, panel(lambda = 5)) sfit <- summary(fit)

-1

Did you install the MatrixModels package? You need that before you can run rqpd.