发布日期: 11/15/2021

Categorical

The Free Text option in Categorical displays a Text Explorer report. Scripts that call the Free Text option in Categorical should be updated to use the Text Explorer platform.

Scripting for Supercategories

When ratings are involved in a data set (for example, a five point scale), you might want to know the percent of the responses in the top two or another subset of ratings. You can define a group of ratings in the data using the supercategories scripting option (instead of the column property).

The following example creates a new column called Floss Delimited 2, and adds a supercategory called Sleep Related, which contains two values: Before Sleep and Wake.

dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
dt << New Column( "Floss Delimited 2",
	Character,
	Set Property(
		"Supercategories",
		{Group( "Sleep Related", {"Before Sleep,", "Wake,"} )}
	), ...);

In the data table, under the Columns panel at left, scroll down to the new Floss Delimited 2 column. Click the column property indicator Image shown here and select Supercategories. You can see the new Sleep Related supercategory with its two values.

Supercategories can also be specified in a Categorical launch command, where the properties are listed inside parentheses after the column name:

dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
dt << Categorical(
	Supercategories(
		:Floss Delimited(
			{Group( "Sleep Related", {"Before Sleep,", "Wake,"} )}
		)
	),
	Multiple Response( :Floss Delimited )
);

In the Categorical report, notice that the Sleep Related category has 203 cases. If you had run the Categorical platform without creating this supercategory, Before Sleep and Wake would appear as separate categories with 143 and 60 cases, respectively.

For more information about supercategories, see 超类别 in Consumer Research.

需要更多信息?有问题?从 JMP 用户社区得到解答 (community.jmp.com).