Subscribe Bookmark RSS Feed

Scripting: pointing a column and changing the existing value scores

saitcopuroglu

Community Trekker

Joined:

Sep 29, 2014

Dear Community,

 

I have a data table which has some categorical questions and answers, however I need to do a consumer research analysis weekly and I gave "value scores" to some of the answers.

Screen Shot 2017-06-08 at 19.02.26.pngScreen Shot 2017-06-08 at 19.04.24.pngScreen Shot 2017-06-08 at 19.05.45.png

 

I later split the "answer" column by keeping the column properties but I face a problem which I cant solve. The VALUE columns have only "yes" and "no" answers and the Value Scores should only consist of "100" and "0". Same goes for OVERALL... How could I solve this issue?

Any help is appreciated.

1 ACCEPTED SOLUTION

Accepted Solutions
Jeff_Perkinson

Community Manager

Joined:

Jun 23, 2011

Solution

First, I notice that the column referenced in your final Categorical output is called VALUE which is the name from your table before you split, so I suspect that there's an error in your script that's resulting in your analysis running on the wrong column.

 

However, if that's not the case, and you're really running the analysis on the OVERALL column that comes from the split then that means that some rows of the original data table have responses to the OVERALL question of Yes and No.

 

To see that that is the case, run a Distribution of VALUE on the original table BY CATEGORICAL and you'll see the VALUES for each level of CATEGORICAL. I suspect you'll find that OVERALL has some Yes and No responses.

 

I'm attaching a data table that I created to try to reproduce your problem. You'll see that no OVERALL rows have Yes or No. Run the Split script attached to the data table you'll see the split table and a categorical analysis that doesn't show any Yes or No

-Jeff
4 REPLIES
Jeff_Perkinson

Community Manager

Joined:

Jun 23, 2011

I'm afraid I don't understand your question. Can you provide some more details and perhaps some example data tables? Be sure to obscure any proprietary information before posting data.

-Jeff
saitcopuroglu

Community Trekker

Joined:

Sep 29, 2014

Thank you for replying my question.

I have a data table and categorical answer column has value scores

for OVERALL:

Excellent = 100,

Very Good = 75, 

Good = 50

Bad = 25

Very Bad = 0

For  REPEAT

Yes = 100

No = 0

 

Screen Shot 2017-06-12 at 23.15.34.pngScreen Shot 2017-06-12 at 23.19.16.png

 

Then I add the following script to split;

Data Table( "Veri_SelectionsTest2016RESORTS.jmp" ) << Split(

    Split By( :Name( "CATEGORICAL" ) ),

    Split( :Categorical Answer ),

    Group( :EntryId ),

    Output Table( "CategoricAnswer" ),

    Remaining Columns(

        Keep(

            :Resort,

            :YEAR,

            :MONTH,

            :Lastname,

            :Firstname,

            :COUNTRY,

            :MARKET,

            :Q Date,

            :Q Month,

            :Q Week,

            :Q Day,

            :Age,

            :Age Interval,

            :Length of Stay,

            :LengthOfStay,

            :SECTION,

            :FLOOR SUPERVISORS,

            :SHIFTS,

            :LANGUAGE,

            :ROOM POPULATION

        )

    ),

    Suppress formula evaluation( 0 ),

    Sort by Column Property

);

 

which gives me:

Screen Shot 2017-06-12 at 23.21.49.png

and for OVERALL Column I only need to see the value scores of Overall (Excellent, very Good, Good, Bad, Very Bad) but I see both the Value Scores of OVERALL and REPEAT together so i cant make categoric analysis. The answers for REPEAT (Evet, Hayir) shouldnt be there :-( and cant elimite it ..

Screen Shot 2017-06-12 at 23.26.30.png

 

 

Jeff_Perkinson

Community Manager

Joined:

Jun 23, 2011

Solution

First, I notice that the column referenced in your final Categorical output is called VALUE which is the name from your table before you split, so I suspect that there's an error in your script that's resulting in your analysis running on the wrong column.

 

However, if that's not the case, and you're really running the analysis on the OVERALL column that comes from the split then that means that some rows of the original data table have responses to the OVERALL question of Yes and No.

 

To see that that is the case, run a Distribution of VALUE on the original table BY CATEGORICAL and you'll see the VALUES for each level of CATEGORICAL. I suspect you'll find that OVERALL has some Yes and No responses.

 

I'm attaching a data table that I created to try to reproduce your problem. You'll see that no OVERALL rows have Yes or No. Run the Split script attached to the data table you'll see the split table and a categorical analysis that doesn't show any Yes or No

-Jeff
saitcopuroglu

Community Trekker

Joined:

Sep 29, 2014

Yes, the data has been contaminated. Thank you for pointing.