sorry for the weird thread title.
So here's what I write. It is a nested loop to find out whether some change in a variable bla corresponds approximately to a change in the variable bla for another observation within the same group:
forvalues group = 1/2 {
su position if group== `group' , meanonly
forvalues from = 1/`r(max)' {
forvalues to = 1/`r(max)' {
bysort group: replace from_to = "`from'+"to"+`to'" if d_bla[`_from'] < upperbound[`_to'] & d_bla[`_from'] > lowerbound[`_to'] & group==`group'
}
}
}
and I get the following error:
d_bla not found
r(111);
however, the variable exists. can anybody tell me what the error is?
I know this will not be the most efficient way of programming, it's just the first solution I came up with...
thank you very much!
So here's what I write. It is a nested loop to find out whether some change in a variable bla corresponds approximately to a change in the variable bla for another observation within the same group:
forvalues group = 1/2 {
su position if group== `group' , meanonly
forvalues from = 1/`r(max)' {
forvalues to = 1/`r(max)' {
bysort group: replace from_to = "`from'+"to"+`to'" if d_bla[`_from'] < upperbound[`_to'] & d_bla[`_from'] > lowerbound[`_to'] & group==`group'
}
}
}
and I get the following error:
d_bla not found
r(111);
however, the variable exists. can anybody tell me what the error is?
I know this will not be the most efficient way of programming, it's just the first solution I came up with...
thank you very much!
Comment