Item Analysis
Example 1
Summary: Performs item analysis on a data table, utilizing the Logistic 2PL model and generating dual plots with customized scales.
Code:
// Item Analysis
// Open data table
dt = Open("data_table.jmp");
// Item Analysis
Item Analysis(
Y(
:Q1, :Q2, :Q3, :Q4, :Q5, :Q6, :Q7,
:Q8, :Q9, :Q10, :Q11, :Q12, :Q13,
:Q14
),
Model( "Logistic 2PL" ),
Number of Plots Across( 2 ),
SendToReport(
Dispatch( {"Dual Plot"}, "1",
ScaleBox,
{Scale( "Linear" ),
Format( "Fixed Dec", 1 ),
Min( 0 ), Max( 2 ),
Inc( 0.5 ), Minor Ticks( 1 ),
Add Ref Line(
1, "Dotted", "Black"
)}
),
Dispatch( {"Dual Plot"}, "2",
ScaleBox,
{Scale( "Linear" ),
Format( "Best" ), Min( -4 ),
Max( 4 ), Inc( 1 ),
Minor Ticks( 7 )}
)
)
);
Code Explanation:
- Open table.
- Perform item analysis.
- Specify response variables.
- Choose logistic 2PL model.
- Set plots across.
- Customize first plot scale.
- Set scale type to linear.
- Format numbers to fixed decimal.
- Define scale range and increment.
- Add reference line at 1.
Example 2
Summary: Runs item analysis using a logistic 2PL model, generating dual plots with customized scales and formats.
Code:
dt = Open("data_table.jmp");
Item Analysis(
Y( :Q1, :Q2, :Q3, :Q4, :Q5, :Q6, :Q7, :Q8, :Q9, :Q10, :Q11, :Q12, :Q13, :Q14 ),
Model( "Logistic 2PL" ),
Number of Plots Across( 2 ),
SendToReport(
Dispatch( {"Dual Plot"}, "1", ScaleBox, {Format( "Custom", Formula( Choose( 2 * value + 1, 0, 0.5, 1, 1.5, 2 ) ), 12 )} ),
Dispatch( {"Dual Plot"}, "2", ScaleBox, {Format( "Custom", Formula( Choose( 5 + value, -4, -3, -2, -1, 0, 1, 2, 3, 4 ) ), 9 )} )
)
);
Code Explanation:
- Open data table.
- Perform item analysis.
- Specify response variables.
- Use logistic 2PL model.
- Set plots across two columns.
- Customize first plot scale.
- Apply custom format to first plot.
- Define custom formula for first plot.
- Customize second plot scale.
- Apply custom format to second plot.
Example 3
Summary: Creates an item analysis object with specified response variables and sends it to a report for parameter estimation, utilizing JMP's Item Analysis platform.
Code:
Names Default To Here( 1 );
dt = Open("data_table.jmp");
obj = Item Analysis(
Y( :Q1, :Q2, :Q3, :Q4, :Q5, :Q6, :Q7, :Q8, :Q9 ),
SendToReport( Dispatch( {}, "Parameter Estimates", OutlineBox, {Close( 1 )} ) )
);
Code Explanation:
- Set default name scope.
- Open data table.
- Create item analysis object.
- Specify response variables.
- Close parameter estimates outline.
Example 4
Summary: Runs item analysis using the Logistic 2PL model and sends the report to output, closing the characteristic curves section.
Code:
Open("data_table.jmp");
Item Analysis(
Y( :Q1, :Q2, :Q3, :Q4 ),
Model( "Logistic 2PL" ),
SendToReport( Dispatch( {}, "Characteristic Curves", OutlineBox, {Close( 0 )} ) )
);
Code Explanation:
- Open data table;
- Perform item analysis.
- Specify response variables.
- Choose logistic 2PL model.
- Send report to output.
- Close characteristic curves section.
Example 5
Summary: Runs item analysis on multiple questions using a logistic 2PL model, generating dual plots with customized scales across two columns.
Code:
dt under test = Open("data_table.jmp");
obj = Item Analysis(
Y( :Q1, :Q2, :Q3, :Q4, :Q5, :Q6, :Q7, :Q8, :Q9, :Q10, :Q11, :Q12, :Q13, :Q14 ),
Model( "Logistic 2PL" ),
Number of Plots Across( 2 ),
SendToReport(
Dispatch( {"Dual Plot"}, "1", ScaleBox,
{Scale( Linear ), Format( Fixed Dec, 1 ), Min( 0 ), Max( 2 ), Inc( 0.5 ), Minor Ticks( 1 ), Add Ref Line( 1, Dotted, Black )}
),
Dispatch( {"Dual Plot"}, "2", ScaleBox, {Scale( Linear ), Format( Best ), Min( -4 ), Max( 4 ), Inc( 1 ), Minor Ticks( 7 )} )
)
);
Code Explanation:
- Open data table.
- Run item analysis on multiple questions.
- Use logistic 2PL model.
- Arrange plots across two columns.
- Customize first dual plot scale.
- Set scale to linear.
- Format numbers to fixed decimal.
- Set minimum value to 0.
- Set maximum value to 2.
- Customize second dual plot scale.
Example 6
Summary: Creates an item analysis object for variables Q1 to Q9, utilizing the Item Analysis platform in JMP.
Code:
Open("data_table.jmp");
obj = Item Analysis( Y( :Q1, :Q2, :Q3, :Q4, :Q5, :Q6, :Q7, :Q8, :Q9 ) );
Code Explanation:
- Open data table;
- Create item analysis object.
- Analyze variables Q1 to Q9.
Example 7
Summary: Runs item analysis using the Logistic 2PL model, generates reports and journals, and attempts to redo analysis with updated settings.
Code:
dt = Open("data_table.jmp");
obj = Item Analysis(
Y( :Q1, :Q2, :Q3, :Q4, :Q5, :Q6, :Q7, :Q8, :Q9, :Q10, :Q11, :Q12, :Q13, :Q14 ),
Model( "Logistic 2PL" ),
Number of Plots Across( 2 )
);
rpt1 = obj << report;
expr1 = rpt1 << get journal;
:Q1 << Set Property( "Missing Value Codes", 1 );
Try(
obj2 = obj << Redo Analysis;
rpt2 = obj2 << Report;
expr2 = rpt2 << Get Journal;
ans = Equal( expr1, expr2 );
,
);
Code Explanation:
- Open data table.
- Perform item analysis.
- Set model to Logistic 2PL.
- Configure plots layout.
- Generate initial report.
- Extract initial journal.
- Set missing value code for Q1.
- Attempt to redo analysis.
- Generate new report.
- Extract new journal.