Dear all,

 

I am a new user in r and I am facing some problems with the quantile regression 
specification. I have two matrix (mresultb and mresultx) with nrow=1000 and 
ncol=nsim, where I specify (let's say) nsim=10. Hence, the columns in my matrix 
represents each simulation of a determined variable. I need to regress each 
column of mresultb on mresultx. My codes are the following:

 

set.seed(180185)
nsim <- 10
mresultx <- matrix(-99, nrow=1000, ncol=nsim)
mresultb <- matrix(-99, nrow=1000, ncol=nsim)
for (i in 1:nsim){
# make a matrix with 5 cols of N random uniform values
N <- 200
I <- 5
u <- replicate( 5, runif(N, 0, 1) )
# fit matrix u in another matrix of 1 column 
mu <- matrix(u, nrow=1000, ncol=1)
# make auction-specific covariate
x <- runif(N, 0, 1)
mx <- matrix(rep(x,5), nrow=1000, ncol=1)
b0 <- matrix(rep(c(1),1000), nrow=1000, ncol=1)
#function for private cost
c <- b0+b0*mx+mu
#bidding strategy
b <- mx+((I+1)/I)+((I-1)/I)*mu  
mresultb[,i] <- b
mresultx[,i] <- mx
qf05 <- rq(formula = mresultb[,i] ~ mresultx[,i], tau=0.5)
M <- coef(qf05)
} 


But I just can see the quantile regression coefficients for 1 simulation, not 
for each i. 

Maybe this is a stupid question, but i am not so familiar with this software 
yet.

 

Thanks in advance!

 

Julia  
                                          
        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org 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.

Reply via email to