multinomial observations

Example 7.23: the Monty Hall problem

January 20, 2010 | Ken Kleinman

The Monty Hall problem illustrates a simple setting where intuition often leads to a solution different from formal reasoning. The situation is based on the game show Let's Make a Deal. First, Monty puts a prize behind one of three doors. Then the player chooses a door. Next, (without moving ...
[Read more...]

Example 7.20: Simulate categorical data

January 4, 2010 | Ken Kleinman

Both SAS and R provide means of simulating categorical data (see section 1.10.4). Alternatively, it is trivial to write code to do this directly. In this entry, we show how to do it once. In a future entry, we'll demonstrate writing a SAS Macro (section A.8.1) and a function in R (...
[Read more...]

Example 7.18: Displaying missing value categories in a table

December 14, 2009 | Ken Kleinman

When displaying contingency tables (section 2.3.1), there are times when it is useful to either show or hide the missing data category. Both SAS and the typical R command default to displaying the table only for observations where both factors are observed.In this example, we generate some multinomial data (section 1.10.4) ...
[Read more...]

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)