This page has been updated to work with Stata 12. This chapter makes use of the user written program fitstat program, which is not part of base Stata. Prior to…
Read More
Search Results for: stata
An Introduction to Categorical Analysis by Alan Agresti Chapter 8: Multicategory Logit Models | Stata Textbook Examples
Table 8.2 on page 207. use https://stats.idre.ucla.edu/stat/stata/examples/icda/gator, clear * Stata 8 code. mlogit c length, basecategory(3) nolog * Stata 9 code and output. mlogit c length, baseoutcome(3) nolog Multinomial logistic…
Read More
An Introduction to Categorical Analysis by Alan Agresti Chapter 9: Models for Matched Pairs | Stata Textbook Examples
Section 9.1.1 McNemar Test. The code below for creating the data set can be copied to the Stata Do-file Editor and be executed through the Do-file Editor. clear input r1…
Read More
Experimental Design by Roger Kirk Chapter 10: Completely Randomized Factorial Design with Three or More Treatments | Stata Textbook Examples
Table 10.2-1, page 440. use https://stats.idre.ucla.edu/stat/stata/examples/kirk/crf222, clear tabdisp order c b, cellvar(y) by(a) ———-+————————- | b and c a and | —- 1 — —- 2 — order | 1…
Read More
Experimental Design by Roger Kirk Chapter 11: Hierarchical Designs | Stata Textbook Examples
Table 11.2-1, page 480. use https://stats.idre.ucla.edu/stat/stata/examples/kirk/crh28, clear tabdisp order b, cellvar(y) by(a) ———-+———————————————– a and | b order | 1 2 3 4 5 6 7 8 ———-+———————————————– 1 |…
Read More
Experimental Design by Roger Kirk Chapter 12: Split-Plot Factorial Design | Stata Textbook Examples
Table 12.2-1, page 516. use https://stats.idre.ucla.edu/stat/stata/examples/kirk/spf2-4, clear tabdisp s b, cellvar(y) by(a) concise ———-+———————– | b a and s | 1 2 3 4 ———-+———————– 1 | 1 | 3…
Read More
Experimental Design by Roger Kirk Chapter 13: Confounded Factorial Designs | Stata Textbook Examples
Use data file rbcf2-2, page 596. use https://stats.idre.ucla.edu/stat/stata/examples/kirk/rbcf2-2, clear list a b g s y 1. 0 0 0 0 3 2. 0 0 0 1 5 3. 0 0…
Read More
Experimental Design by Roger Kirk Chapter 14: Fractional Factorial Designs | Stata Textbook Examples
Use data file crff24-1, page 596. use https://stats.idre.ucla.edu/stat/stata/examples/kirk/crff24-1, clear list a b c d y 1. 0 0 0 0 3 2. 0 0 0 0 6 3. 0 0…
Read More
Experimental Design by Roger Kirk Chapter 15: Analysis of Covariance | Stata Textbook Examples
Use data file crac3, page 714. use https://stats.idre.ucla.edu/stat/stata/examples/kirk/crac3, clear sort a by a: gen n = _n list, clean a y x n 1. 1 1 1 1 2. 1…
Read More
Experimental Design by Roger Kirk Chapter 5: Completely Randomized Design | Stata Textbook Examples
use https://stats.idre.ucla.edu/stat/stata/examples/kirk/cr4, clear Table 5.2-1, page 167. The variable order was added to the file to preserve the original ordering of the data. tabdisp order a, cellvar(y) ———-+———————– | a…
Read More
