HI!
I have a problem. This is my code :
forvalues p=1/$nb_p {
forvalues i=1/$nb_p {
if pair[`p',1]=pair[`i',1] {
mata somme2`i'=somme-totob`p'
}
}
}
The error is "=exp not allowed
r(101);"
When I write if `p'=`i' or if pair[`p',1]=pair[`i',1] it fails.. but when I write if `p'!=`i' or if pair[`p',1]!=pair[`i',1] there is no error;..
I don't understand why, I am lost...
Thanks!
Clara
I have a problem. This is my code :
forvalues p=1/$nb_p {
forvalues i=1/$nb_p {
if pair[`p',1]=pair[`i',1] {
mata somme2`i'=somme-totob`p'
}
}
}
The error is "=exp not allowed
r(101);"
When I write if `p'=`i' or if pair[`p',1]=pair[`i',1] it fails.. but when I write if `p'!=`i' or if pair[`p',1]!=pair[`i',1] there is no error;..
I don't understand why, I am lost...
Thanks!
Clara
Comment