"Thanks, Peter. The script as sent fails with the message
'realtbill' is not the name of a variable"
My bad -- realtbill is in the full data set
"And indeed, that name is undefined. I substituted "tbill" (the name of a
series
in your data file) for "realtbill" and the script runs OK. The inline or
non-function version of the script gives a "teststat" value of -4.9584.
If I modify the script to run the function instead of the inline code
it also gives -4.9584.
I edited the script a little to make toggling between function and inline
a bit easier, and I've attached my version."
So you didn't get the error on the smpl command? I'm puzzled (though grateful that
it works now!) -- I was working with the full data set so realtbill was in there, and the
error was definitely being generated within the function. I'll try to reproduce it,
but in the meantime thanks much.
PS