# nlrq R function and constraints to the argument ,non-linear quantile regression

I've got a model to be estimated through the non-linear quantile regression method. The model is specified in such a way that I have 6 coefficients b1,b2,...,b6. I have constraints for my coefficients: b1+b2+...+b6 = 1 , and the coefficients are all positive. my code as follow

`````` nlc <- nls.control(maxiter = 1000)

fit <- nlrq(y~ ( b1 * m1 + b2 * m2 + b3 * m3 + b4 * m4 +b5 * m5 + b6 * m6) - 1.65*sqrt((b1* s11lag1+ b2* s11lag2+ b3* s11lag3+ b4* s11lag4+b5* s11lag5+ b6* s11lag6+b1* s21lag1+ b2* s21lag2+ b3* s21lag3+ b4* s21lag4+b5* s21lag5+ b6* s21lag6)^2 + (b1* s12lag1+ b2* s12lag2+ b3* s12lag3+ b4* s12lag4+b5* s12lag5+ b6* s12lag6+b1* s22lag1+ b2* s22lag2+ b3* s22lag3+ b4* s22lag4+b5* s22lag5+ b6* s22lag6)^2 ),
data = data,control=nlc ,start = c(b1 = 0, b2 = 0, b3 = 0, b4 = 0,b5 = 0, b6 = 0), tau=0.05,
trace=FALSE,method="L-BFGS-B")
``````

I tried to use `lower=c(0,0,0,0,0,0), upper=c(1,1,1,1,1,1)` but I have :

``````Error in nlrq(y ~ (b1 * m1 + b2 * m2 + b3 * m3 + b4 * m4 + b5 * m5 + b6 *  :
unused arguments (lower = c(0, 0, 0, 0, 0, 0), upper = c(1, 1, 1, 1, 1, 1))

``````

how would I add my 2 constraints to my code ?