Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- JMP User Community
- :
- Discussions
- :
- How do I create a plot for nested contingency tabl...

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Sep 8, 2013 9:38 AM
(794 views)

Hi all,

I have two 2x2 contingency tables, one nested in the other. For example, I am looking at students in classes classified by their gender (M or F) and whether they actively participates in athletics program (A or NA) ; and then among those in each group, I am looking at the frequency of students who ran into disciplinary problems. Thus the table may look like

M &A 50 (12)

F & A 40 (8)

M & NA 150 (8)

F & NA 150 (6)

Total 390 (34)

The numbers in the parenthesis are the frequency of students who ran into disciplinary problems. So, for example, out of 50 male athletes 12 had disciplinary problems, etc., I want to know how to create a graph in JMP, say a Mosaic plot, to convey the information. Also, is there any simple way to compare between the proportions?

I would appreciate any help. Thank you in advance for your response.

1 ACCEPTED SOLUTION

Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Solution

There is a plot "Share Chart" in the Categorical platform that may be what you want. Or the "Frequency Chart".

Run this JSL example to have a look:

// Example table

dt = New Table**(** "test",

Add Rows**(** **8** **)**,

New Column**(** "sex", Character, Set Values**(** **{**"M", "M", "M", "M", "F", "F", "F", "F"**}** **)** **)**,

New Column**(** "athlete", Character, Set Values**(** **{**"A", "A", "NA", "NA", "A", "A", "NA", "NA"**}** **)** **)**,

New Column**(** "diciplinary problems", Character, Set Values**(** **{**"DP", "NP", "DP", "NP", "DP", "NP", "DP", "NP"**}** **)** **)**,

New Column**(** "frequency", Numeric, Set Values**(** **[****12**, **38**, **8**, **142**, **8**, **32**, **6**, **144****]** **)** **)**

**)**;

// Test for homogeneity

dt << Categorical**(**

Freq**(** :frequency **)**,

X**(** :sex, :athlete **)**,

Grouping Option**(** Both **)**,

Separate Responses**(** :diciplinary problems **)**,

Share Chart**(****1****)**,

Frequency Chart**(** **1** **)**,

Transposed Freq Chart**(** **1** **)**,

Test Response Homogeneity**(** **1** **)**

**)**;

2 REPLIES

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

There is a plot "Share Chart" in the Categorical platform that may be what you want. Or the "Frequency Chart".

Run this JSL example to have a look:

// Example table

dt = New Table**(** "test",

Add Rows**(** **8** **)**,

New Column**(** "sex", Character, Set Values**(** **{**"M", "M", "M", "M", "F", "F", "F", "F"**}** **)** **)**,

New Column**(** "athlete", Character, Set Values**(** **{**"A", "A", "NA", "NA", "A", "A", "NA", "NA"**}** **)** **)**,

New Column**(** "diciplinary problems", Character, Set Values**(** **{**"DP", "NP", "DP", "NP", "DP", "NP", "DP", "NP"**}** **)** **)**,

New Column**(** "frequency", Numeric, Set Values**(** **[****12**, **38**, **8**, **142**, **8**, **32**, **6**, **144****]** **)** **)**

**)**;

// Test for homogeneity

dt << Categorical**(**

Freq**(** :frequency **)**,

X**(** :sex, :athlete **)**,

Grouping Option**(** Both **)**,

Separate Responses**(** :diciplinary problems **)**,

Share Chart**(****1****)**,

Frequency Chart**(** **1** **)**,

Transposed Freq Chart**(** **1** **)**,

Test Response Homogeneity**(** **1** **)**

**)**;

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Sep 12, 2013 11:53 AM
(532 views)