Others picked up the point that it
would be better as
if `k' == 1 {
I'd suggest a further improvement:
<commands 1>
forval k = 2/10 {
<commands 2>
}
That way the -if- is rendered unnecessary.
Nick
[email protected]
Dinesh Sharma
> Given below is a forval loop I am working on
>
> forval k=1(1)10{
> if `k'=1{
> commands
> }
> else{
> commands
> }
> }
>
> The if part of the above program is giving error message. I will
> appreciate any suggestions.
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/