I do have a problem with the following code:
Code: Select all
for %criterion aic bic hqc
' Specification of page
pageselect {%daily}
%spec = "spline_" + %criterion
' vector with Information criterion from different knot specifications
vector(!Kmax - 1) {%criterion}_knots
for !k=2 to !Kmax
{%criterion}_knots(!k - 1) = {%criterion}_!k
delete {%criterion}_!k
next
' minimum information criterion
scalar min_knots_{%criterion} = @cimin({%criterion}_knots) +1
scalar min_{%criterion}= @cmin({%criterion}_knots)
scalar obs_per_knots_{%criterion} = (!end - !start)/min_knots_{%criterion}
!minknot = min_knots_{%criterion}
next
The error message I get is "vector assigned to scalar" I even understand the error message because the right hand side of the first scalar equation is a 1 by 1 vector. Now, a 1 by one vector is the same as a scalar to me. But unfortunately I do not know how to "explain" this fact to the compiler which is reading through the code...
Has anybody a suggestion for solving this problem?
Thanks in advance
