Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: syntax for nested two-factor ANOVA


From   "Erick Turner" <[email protected]>
To   [email protected]
Subject   st: syntax for nested two-factor ANOVA
Date   Sun, 9 Apr 2006 17:03:49 -0700

I have been puzzling through the examples on nested ANOVAs given in the manual, but I think my model is somewhat different from those. I could use help setting up the proper command syntax.

My data structure is this:

My DV is "testresult" (continuous)
IVs are all categorical: "brand" is nested within "company", but the IV of main interest is "keep" (1 or 0, for sold or discarded).

So I want to see whether the "keep rate" is affected significantly and primarily by testresult, after controlling for the brand and the company making that brand.

I would expect there should be error terms for testresult*brand and/ or testresult*company.

Related question: would this employ a sequential sum of squares rather than a partial sum of squares, entering in the "confounds" first and then IV of key interest last?

Below is my confused attempt at a command and the result, which only yields a single F value, that being for the whole model, and no F values for the factors.

anova testresult brand company keep brand*keep company*keep / brand| company, sequential

Number of obs = 89 R-squared = 0.3971
Root MSE = .204223 Adj R-squared = 0.2081

Source | Seq. SS df MS F Prob > F
-------------- +----------------------------------------------------
Model | 1.84058059 21 .087646695 2.10 0.0116
|
brand | .69112847 11 .062829861
company | 0 0
keep | .905309904 1 .905309904
brand*keep | .244142211 9 .027126912
company*keep | 0 0
brand|company | 0 0
-------------- +----------------------------------------------------
|
Residual | 2.79437683 67 .041707117
-------------- +----------------------------------------------------
Total | 4.63495741 88 .052669971

------------------------

Thanks in advance for help with the proper syntax for what I'm trying to do.

Erick



*
* 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/




© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index