For a given regression problem of quantitative data replication with fixed effects (see, for example, below), can we conclude lqmm() exactly (or at least close) to the output signal from rqpd() ?
See the example below and the following conclusions / comments. Am I right in my conclusions?
library(lqmm) library(rqpd) 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 <- rep(1:n,rep(m,n)) + u # fit <- rqpd(y ~ x | s, panel(lambda = 5)) data1<-data.frame(y,x,s) fit.lqmm<- lqmm(fixed=y~x , random=~1, group=s, iota=.5,nK=2000, type="normal", rule=1, covariance="pdIdent", data=data1) coef(fit.lqmm) ss1<-raneff.lqmm(fit.lqmm) sig2<-cov.lqmm(fit.lqmm) sig2 fit.rqpd <- rqpd(y ~ x | s, panel(lambda = 1/2*1/sig2,taus=.5, method="pfe", tauw=1)) coef(fit.rqpd) # comparing estimated fixed effects ss2<-coef(fit.rqpd)[3:length(coef(fit.rqpd))] plot(as.matrix(ss1),as.numeric(ss2))
Conclusions / Comments
- We expect that with a certain choice, lambda
rqpd() should match lqmm() . I think it should be when lambda=1/(2 cov.lqmm) . Right?- I'm talking about close coincidence and not exact, because
rqpd based on L1 regularization for a fixed lambda, while I think (??) lqmm based on L2 regularization, but for a specific lambda that is the result of the procedure in Geraci and Bottai ( 2007).
- From the very beginning, this does not happen, at least when nK is small, i.e. nK = 7. But as nK increases to say 100 or 1000, these two procedures “seem” close
- So, it seems that the appropriate use of
lqmm will at least depend on a good (possibly large enough) choice of nK. - I studied the use of
lqmm() , because here the penalty parameter is selected systematically, whereas in rqpd() it must be set. However, since I cannot match lqmm() with rqpd for a specific lambda choice, I'm not sure I understand what lqmm does.
source share