## Stata 15 help for loneway

```
[R] loneway -- Large one-way ANOVA, random effects, and reliability

Syntax

loneway response_var group_var [if] [in] [weight] [, options]

options       Description
-------------------------------------------------------------------------
Main
mean        expected value of F distribution; default is 1
median      median of F distribution; default is 1
exact       exact confidence intervals (groups must be equal with no
weights)
level(#)    set confidence level; default is level(95)
-------------------------------------------------------------------------
by is allowed; see [D] by.
aweights are allowed; see weight.

Statistics > Linear models and related > ANOVA/MANOVA > Large one-way
ANOVA

Description

loneway fits one-way analysis-of-variance (ANOVA) models.  loneway
relaxes the restriction imposed by oneway that factors must have fewer
than 376 levels.  The command additionally reports the intraclass
correlation, its standard error, and confidence interval; the estimated
reliability of the group-averaged mean; the standard deviation of the
group effect; and the standard deviation of the within-group effect.

Options

+------+
----+ Main +-------------------------------------------------------------

mean specifies that the expected value of the F distribution with k-1 and
N-k degrees of freedom be used as the reference point in the
estimation of rho instead of the default value of 1.

median specifies that the median of the F distribution with k-1 and N-k
degrees of freedom be used as the reference point in the estimation
of rho instead of the default value of 1.

exact requests that exact confidence intervals be computed, as opposed to
the default asymptotic confidence intervals.  This option is allowed
only if the groups are equal in size and weights are not used.

level(#) specifies the confidence level, as a percentage, for confidence
intervals of the coefficients.  The default is level(95) or as set by
set level.

Remarks

loneway and oneway both fit ANOVA models, but loneway presents different
ancillary statistics from oneway:

Feature                                    oneway  loneway
------------------------------------------------------------
Fit one-way model                             x       x
on 375 or fewer levels                   x       x
on more than 375 levels                          x
Bartlett's test for equal variance            x
Multiple-comparison tests                     x
Intraclass correlation and SE                         x
Intraclass correlation confidence interval            x
Est. reliability of group-averaged mean               x
Est. SD of group effect                               x
Est. SD within group                                  x

Examples

Setup
. webuse auto7

Fit one-way random-effects ANOVA
. loneway mpg manufacturer_grp

Fit ANOVA to subset of the data
. loneway mpg manufacturer_grp if nummake==4

Stored results

loneway stores the following in r():

Scalars
r(N)           number of observations
r(rho)         intraclass correlation
r(lb)          lower bound of 95% CI for rho
r(ub)          upper bound of 95% CI for rho
r(rho_t)       estimated reliability
r(se)          asymp. SE of intraclass correlation
r(sd_w)        estimated SD within group
r(sd_b)        estimated SD of group effect

```