Don't mention it in public, but I
did not look at the manual; I relied
on what was left behind after your
call to -alpha-.
If we fix that point and use instead
program avcorwithin, rclass
version 8.0
tempname y
alpha bef*, std
scalar `y' = r(rho)
alpha aft*, std
return scalar diff = r(rho) - `y'
end
and
bootstrap "avcorwithin" r(diff), reps(1000)
then I get no error message. I am using
Stata/SE 8.2 with files up to date as
of 31 Oct 2003 (exe) and 5 Nov 2003 (ado).
I manufactured variables -aft1- -aft2- -bef1-
-bef2-.
Nick
[email protected]
Patrick Sturgis
>
> Stata Reference Manual says that in r(rho) alpha 'saves the average
> interitem correlation if std is specified'. I think my
> original problem was
> that I hadn't specified std aftter alpha in the ado file.
> However, I still
> get the same error message about versions even when I use
> your suggested
> code. Thanks for your help,
Nick Cox
> As you know, Stata has a rather
> elaborate system of version control designed
> to maximise the extent to which old programs
> can work with newer versions of Stata,
> which does very occasionally not do what
> users hope.
>
> However, although you are getting a message about
> versions, it could just be a side-effect
> of another mistake in your program. Guessing
> that -avcorwithin2- here is just a modification
> of -avcorwithin- mentioned in your previous
> post, I see an error there: -alpha- does
> not leave behind any result in r(rho).
>
> You might be better off with something more
> this:
>
> program avcorwithin, rclass
> version 8.0
> tempname y
> alpha bef*
> scalar `y' = r(alpha)
> alpha aft*
> return scalar diff = r(alpha) - `y'
> end
>
> bootstrap "avcorwithin" r(diff), reps(1000)
>
> Nick
> [email protected]
>
> Patrick Sturgis
>
> > I am getting the following error message when running a
> > *.ado file written
> > in version 7 in version 8:
> >
> > command -> avcorwithin2
> > error when command executed on original dataset under
> > version 8 control
> >
> > I'd aprreciate it if someone could tell me what this means.
*
* 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/