Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: "twoway function" (& closure on "test 2")
From
Nick Cox <[email protected]>
To
[email protected]
Subject
Re: st: "twoway function" (& closure on "test 2")
Date
Wed, 11 May 2011 11:06:01 +0100
Allan seems to want StataCorp to be responsible for documenting what
happens when you don't use a command as intended but decide to branch
out on your own.
That is, none of his examples make references to x.
Interesting principle. I think StataCorp have better things to do in this case.
Nick
On Wed, May 11, 2011 at 10:57 AM, Allan Reese (Cefas)
<[email protected]> wrote:
> As a health & safety champion, I have to demur from Nick Cox's attitude
> to IT pratfalls.
>
> From: Nick Cox Subject: Re: st: plotting a regression function with
> time-dummies indicating structural breaks
>
> - -twoway function- has been around since Stata 8 (2003). Its use of x
> regardless of whatever x might be in the data is documented. Its
> capacity for small surprises when you want to use some or all of your
> data as well is less surprising on brief examination. I agree that
> there is a case for considering a tweak of the documentation here, but
> I see no evidence that -twoway function- does not work as intended.
> --------
>
> In the first place, I'm not sure I understand how, or if, y=function(x
> z) was intended to operate. It is documented that y and x are
> interpreted as dummy variables and not affected by "y" or "x" being in
> the current dataset. The documentation does not say how z will be used
> when it is in the dataset, and it appears to be controlled by the number
> of calculated points (default 300) and number of observations in the
> dataset. Eg, using the auto data,
> twoway function y=mpg /* plots over 74/300 of the "x" range */
> twoway function y1=mpg, n(37) range(0 .5) || function y2=mpg, n(74)
> /* doesn't quite match */
> twoway function y1=mpg, n(37) range(0 `=36.5/74') clcol(blue) ||
> function y2=mpg, n(74) clpattern(_) /* kludge! */
>
> The H&S approach to hazards is hierarchical: (1) can the hazard be
> removed? (2) can it be circumvented or mitigated? (3) protect and warn
> people who might meet it.
>
> Computers are deterministic machines, and I don't appreciate small
> surprises. Over to the Corp...
>
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/