Agriculture Reference
In-Depth Information
This function calculates the one-tailed Student's t, which requires the
residual degrees of freedom ( n ) and the probability of interest ( p ).
The residual degrees of freedom is from the previous ANOVA scalar
( e(df _ r) ). Because this function calculates the one-tailed Student's
t and we are interested in the two-tailed value, the probability entered
is half of the value we are interested in. Thus, for a 5% (0.05) level,
we enter 0.025. If you are interested in seeing what this value is, enter
display invttail( 12,0.025 )
The value calculated is 2.1788128, which is the critical value for a
two-tailed Student's t. The remainder of this line completes the equa-
tion shown above. The line with the comment left out is
local z = invttail (`y',0.025 )*sqrt (2*`w'/`x')
The critical t value is multiplied ( * ) with the square root ( sqrt() ) of
2 multiplied by the mean square error (MSE) ( `w' ) and divided by
the number of replications ( `x' ). The previous ANOVA does not save
the MSE as a scalar, but does save the square root of this value (Root
MSE) in the scalar e(rmse) . Squaring this value then gives us what
we need ( e(rmse)^2 ), which is 102.920659. By the way, * and ^
are arithmetic operators; to see a list of these, refer to TableĀ 7.1. This
information can be seen within Stata by typing help operators in
the Command window.
TableĀ 7.1
Expression operators used in programming and various commands
ARITHMETIC OPERATORS
LOGICAL OPERATORS
RELATIONAL OPERATORS
SYMBOL
SYMBOL
SYMBOL
+
addition
&
and
>
greater than
-
subtraction
|
or
<
less than
*
multiplication
!
not
> =
greater than or equal to
/
division
~
not
< =
less than or equal to
^
power
==
is equal to
-
negative
! =
not equal
+
string concatenation
~ =
not equal
= equals
Note: A double equal sign (= =) is used for equality testing.
The order of evaluation (from first to last) of all operators is ! (or ~), ^, - (negation), /, *,
- (subtraction), +, ! = (or ~ =), >, <, < =, > =, = =, &, and |.
Search WWH ::




Custom Search