Dear all,
I want to test the equality of coefficients in quantile regression model using loop. The code as follows
Code:
clear
sysuse auto
sqreg price weight length foreign, quantile(.25 .5 .75) reps(100)
local qlist "q25 q50 q75"

local shortloop "weight length"
foreach k of local qlist{
foreach fshort of local shortloop{
    local expshort 0 
    ds `fshort'
    local pp `r(varlist)'
    *di "`pp'"
    foreach v of local pp {
    local expshort `expshort' + [`k']`v'  
}
display "`expshort'"
test `expshort' /*simple example for demo*/
}
}
The above code doesn't work as the following error

Code:
0 + [q25]weight
0 not found
r(111);
How to remove the section "0 + " from "0 + [q25]weight"?

Thanks very much!

Best regards,
wanhai you