I'm trying to teach myself RATS and I am struggling with a while loop. Borrowing from some code in the Reference Manual, I've gotten to:
Code: Select all
compute countq1=0, i=0, sumq1=0.0
while countq1<17 {
compute i=i+1
if q1dummy(i)>0
compute sumq1=sumq1+lnagg(i),countq1=countq1+q1dummy(i)
}
endwhile
display sumq1 countq1 i
## SX22. Expected Type INTEGER, Got REAL Instead
>>>>countq1+q1dummy(i)<<<<
I assume I need to set my quarter dummy variables to integers. Any help solving this is greatly appreciated. If you see any clear problems/mistakes you'd like to point out, please don't be shy and thanks in advance.