I have 2 groups to compare - Minitab and stats newbie - Please help

B

Barbara B

Re: Minitab and stats newbies..please help

  • However, how do I use minitab to represent the percentages of data for main items in each group in the graphical mode-for better understanding?
Why not plot the percentages with boxplots, just like the means? You could calculate the percentage per row by subtracting 1 of each rating to adjust the range of ratings from 0 to 3 (instead of 1 to 4). Then you calculate the mean of the adjusted ratings (Calc > Row Statistics) and divide it by 3, so the results will lie between 0/3=0% fulfillment and 3/3=100% fulfillment.

  • For comparison between G1 and G2, I have tried to use ANOVA>GLM based on the data given. You are right! There are lots of complexities going on for me to interpret the data right now. Take a look on the result and my assumption as attached. Please correct me if I am wrong on the data interpretation.

Your interpretation of the significance tests in the ANOVA table and of the Tukey tests are correct. The difference between both lies in the hypothesis tested:

ANOVA:
H0: All group means are equal.
H1: At least one mean is different from the others.

pairwise comparison (e.g. Tukey, Bonferroni, Dunnett):
H0: The 2 means compared (e.g. type3 and type6) are equal.
H1: The 2 means compared (e.g. type3 and type6) are different.


S = 0.643302 R-Sq = 26.79% R-Sq(adj) = 25.42%

In this line the model quality is characterized:

The better the model, the smaller S and the higher becomes R-Sq and R-Sq(adj). Usually values for R-Sq and R-Sq(adj) above 80% are one criterion for a good model (=a model which can explain the results good). In your model less than 30% of the variation in the ratings is explained due to the terms (factors and interactions) in the model, so this model explains just a small amount of the rating values and is therefore insufficient.


Unusual Observations for mean ratings

Obs mean rating Fit SE Fit Residual St Resid
76 0.37500 3.46500 0.09098 -3.09000 -4.85 R
176 1.80000 3.52000 0.09098 -1.72000 -2.70 R
248 1.33333 3.03333 0.09098 -1.70000 -2.67 R
251 1.33333 2.70667 0.09098 -1.37333 -2.16 R
[...]
R denotes an observation with a large standardized residual.


"Large" is defined as more than 2*standard deviation away from the expected mean. The interval mean+/-2*standard deviation covers 95% of the data (under normal assumption). Your sample size is N=599, so 5% of 599 correspond to 30 ratings which could be expected to lie beyond +/-2*standard deviation. In the table of unusual observations 28 ratings are listed - pretty much the same amount of data which could be expected to be "unusual" or "large" for a data set of N=599.

But there is one rating which differs extremly from the others: Obs 76 (first row) with a standardized residual of -4.85. This value is in fact different and shown as a point far away in the residuals plot. (Btw: I recommend to use the residual plots for analysis instead of the table of unusual observations. It's imho much easier to get the pitfalls out of the plots.)

If you take a look in the data you could see that something went wrong for observation 76: Values for mean ratings for a scale between 1 and 4 have to lie between 1 (all ratings equal 1) and 4 (all ratings equal 4), but the mean in observation 76 (Group 2, Type 1) is 0.375. This occured because the means were calculated out of the sums in your third posting, but the number of ratings were not given there.

The deviations from the blue line and the other deviations from the normal distribution in the residual plots occur probably due to the small resolution of the rating scale. Even if the mean (or percentage alternatively) is calculated, the number of different values is limited, so one couldn't expect that the residuals follow the normal distribution exactly or show a bell-shaped histogram. I would therefore recommend to look for clear deviations from the normal assumption or obvious violations of the variance homogenity assumption after the analysis was done with correct means or percentages (see below).

  • Please advise me further on the steps to get to this result as well. I need to understand right from the start when you extract the data into the table that you attached to me in your reply before.

To avoid further wrong means (and to clarify how I prepared the data earlier), recalculate the means using the row-statistics-function:
Calc > Row Statistics
Statistic: choose mean
Input variables: c23 c36 c37 c41 c42 c43 c44 c45 (e.g. for type1)
Store result in: 'type1 (mean)'
OK

Afterwards stack the columns 'type1 (means)'-'type6 (means)' in a new worksheet:
Data > Stack > Stack Columns

and assign the appropriate Group in a separate column, e.g. by
Calc > Make Patterned Data > Text values
Store patterned data in: Groups
Text values: G1 G2
Number of times to list each value: 50 (n=50 ratings per group and type)
Number of times to list each sequence: 6 (6 types)
OK

and redo the analysis with ANOVA > GLM. (I couldn't do this because I don't have the information how many ratings are given for a sum in a specific row.)

Could you please attach the data used for the GLM analysis in a spreadsheet format, if you have more questions? Thx!

Best regards,

Barbara
 
N

noorolya.dollah

Re: Minitab and stats newbies..please help

Hi Barbara,

Thank you for your helpful responses.
Attached is the original raw data, which is in the excel format for group 1 and group 2 for you to recheck the analysis that I have done.

There are number of questions that I need your further advice.

  • What do I do for the missing values?
  • As I have tried to use the tukey analysis for posthoc test, where is the part that I can obtain data for the differences for each type in each group? E.g Mean for type 1 in Group 1 is different than mean for type 1 in group 2. I need those information to fill in the F/T value below. I am more interested to know how each type different from each group rather than which type is different overall.Please advise.
Group 1 Group 2 F/T-Value P-value
Type 1 mean mean
Type2 mean mean
Type 3 mean mean
Type4 mean mean
Type 5 mean mean
Type6 mean mean

Again, thank you very much.

 

Attachments

  • Rawdata.xls
    48.5 KB · Views: 68
B

Barbara B

Re: Minitab and stats newbies..please help

Hi noorolya,

thanks for the data, but could you also provide which columns belong to P1 (or type 1), P2 (or type 2), and so on?

TIA

Barbara
 
N

noorolya.dollah

Re: Minitab and stats newbies..please help

Hi Barbara

Good day. Here is the detail of which column that belongs to which type:

P1 (8 items) – C23, C36, C37, C41, C42, 43, C44, 45
P2 (5 items) – C24, C27, C34, C39, C40
P3 (3 items) – C25, C32, C33
P4 (5 items) – C26, C28, C31, C38, C46
P5 (2 items) – C30, C35
P6 (3 items) – C29, C47, C48

Regarding a list of question that I have asked you in my previous post ;

Is this method valid to use in the statistical data? Or do you have any other suggestion?
  • Comparison between each type in each group : Type 1 in Group 1 and Type 1 in group 2 and so on.. Can I use the OneWay ANOVA to obtain this information? Or do you have any other better method to be used?
  • Normality test- As in our previous posted reply, we have talked about the normality test on my data to ensure that my choice of statistical method is valid to use. I have performed a normality test on mean for each type and group and attached is the result. I am not sure how to interpret the normality test on this data as some of the data have passed certain normality test and some don’t. Really need your advise on this , in order for me to use valid analysis either nonparametric test or parametric for the comparison.

Thank you very much for your kind support.
 

Attachments

  • normalitytest.xls
    8 KB · Views: 95
B

Barbara B

Re: Minitab and stats newbies..please help

Hi noorolya,

here is the way I would recommend:

  1. Preparation of data step 1 (in Excel)
    file: Rawdata.xls
    purpose: tidy data
    1. Rename sheet3 "data", create 2 new sheets and name them "data transposed" and "data ratings"
    2. Copy data of sheet "Group1" in column B-BC of sheet "data" (line 1-51), and data of "Group2" without first line beneath the data of Group1 in column B-BC (line 52-101)
    3. Name column A (sheet "data") with "groups" and fill in 50 times "1" and 50 times "2" (for group1 and group2)
    4. Rename the entries in the first line so you could identify P1-ratings, P2-ratings, etc. directly:
      • P1 (8 items): C23 > P1-1, C36 > P1-2, C37 > P1-3, C41 > P1-4, C42 > P1-5, C43 > P1-6, C44 > P1-7, C45 > P1-8
      • P2 (5 items): C24 > P2-1, C27 > P2-2, C34 > P2-3, C39 > P2-4, C40 > P2-5
      • P3 (3 items): C25 > P3-1, C32 > P3-2, C33 > P3-3
      • P4 (5 items): C26 > P4-1, C28 > P4-2, C31 > P4-3, C38 > P4-4, C46 > P4-5
      • P5 (2 items): C30 > P5-1, C35 > P5-2
      • P6 (3 items): C29 > P6-1, C47 > P6-2, C48 > P6-3
    5. Mark the data (columns A-BC, lines 1-101) in sheet "data", copy it and paste it transposed into the sheet "data transposed" (to paste data transposed: press CTRL+ALT+V, choose "transpose")
    6. Sort the data in sheet "data transposed" by column A
    7. Delete line 2-29 (formally columns C1-C22 and C49-54 in sheet "data")
    8. Mark the whole data in sheet "data transposed"
    9. Paste it transposed in the sheet "data ratings"
    10. Save data as file "data ratings 2011 04 18.xls"

  2. Preparation of data step 2 (in Minitab)
    file: "data ratings 2011 04 18.xls"
    purpose: get the data ratings into Minitab and check if the import was done correctly
    1. Open Excel-Worksheet "data ratings 2011 04 18.xls" in Minitab:
      1. In Minitab: Choose File > Open Worksheet
      2. Change filetype to "Excel (*.xls, *.xslx)"
      3. Find the Excel-Worksheet "data ratings 2011 04 18.xls" on your harddrive with "Browse"
      4. Press "Open"
    2. Delete the sheets not used in the analysis (press the "x" on the upper right side of the worksheet): "Group1", "Group2", "data", "data transposed" (the data is only copied to Minitab, so the Excel file will remain the same regardless what you'll do in Minitab)
    3. Check if the remaining worksheet "data ratings" contain all ratings: Press the circled "i" in the Minitab toolbar, Count should give "100" for all columns (and you could see the number of missings per column directly beneath "Missings")

  3. Preparation of data step 3 (in Minitab)
    purpose: calculate mean and percentage of each type (P1-P6)
    1. Name C28-C33 in the Minitab worksheet by P1(mean), P2(mean),..., P6(mean)
    2. Name C34-C39 in the Minitab worksheet by P1(%), P2(%),..., P6(%)
    3. Do NOT use any macros or other routines to fill in values for missings! (See below for some reasons.)
    4. Calculate means:
      1. Calc > Row Statistics
      2. Statistic: Choose Mean
      3. Input variables: 'P1-1'-'P1-8'
      4. Store result in: 'P1(mean)'
      5. OK
      Calculate P2(mean), P3(mean), etc. out of the ratings in the appropriate columns 'P2-1'-'P2-5', 'P3-1'-'P3-3' and so on.
    5. Check if the means are calculated correctly, that is
      mean = sum/(number of non-missing values)
      e.g. type 2 (P2) in line 69 has ratings P2-1=1, P2-2=* (missing), P2-3=1, P2-4=1, P2-5=1. The correct mean should be
      P2(mean) = sum/(number of non-missing values) = 4 / 4 = 1.0
      and P2(mean) in line 69 is given as 1.0.
      Minitab uses the correct formula for the mean. The wrong values occured previously, because the mean was calculated with a constant number of values in the denominator (5 for P2) instead of the real number of non-missing values for a specific rating.
    6. Calculate percentages for each line out of the means
      • To achieve a percentage between 0% (=all ratings equal 1) and 100% (=all ratings equal 4), the ratings have to be shifted from 1-4 to 0-3, afterwards divided by the maximum value 3 and multiplicated by 100
      • Calculate percentages
        1. Calc > Calculator
        2. Store result in variable: 'P1(%)'
        3. Expression: ('P1(mean)'-3)/3*100
        4. OK
        Calculate P2(%), P3(%), etc. out of the means in the appropriate columns 'P2(mean)', 'P3(mean)' and so on.

  4. Preparation of data step 4 (in Minitab)
    purpose: prepare data to get an appropriate format for further analysis/GLM (data has to be stacked)
    1. Stack the means:
      1. Data > Stack > Columns
      2. Stack the following columns: 'P1(mean)'-'P6(mean)'
      3. Store stacked data in: choose "New worksheet" and name it "stacked means"
      4. OK
    2. Rename C1 from "Subscripts" to "type", C2 "mean", C3 "group"
    3. Assign the mean ratings to the Groups
      1. Calc > Make Patterned Data > Text Values
      2. Store patterned data in: 'group'
      3. Text values: G1 G2
      4. Number of times to list each value: 50 (50 ratings per group and type)
      5. Number of times to list each sequence: 6 (6 types)
      6. OK
    4. For a worksheet with stacked percentages, repeat the steps with the columns 'P1(%)'-'P6(%)'
    5. Save all worksheets in an Excel-format
      1. Choose File > Save Current Worksheet as (Despite "Current" all worksheets will be saved as separate sheets in the excel file)
      2. Change filetype to "Excel (*.xls, *.xslx)"
      3. Type in a file name, e.g. "data ratings for analysis 2011 04 18.xls"
      4. Press "Save"

:) The data is ready for analysis :magic:

And here are the answers of the questions concerning the analysis:
  • Why not use routines for filling gaps in the data?
    • Missings could occur due to a number of different reasons:
      • Rater overlooked the item.
      • Rater wanted to give a rating not available in the scale (e.g. "always" is more frequent than the highest rating "often")
      • Rater didn't feel competent to give a rating
      • ...
    • If you fill missings with a value (irrespective of what value you use, like mean, smoothing technique or any other routine), you'll make an assumption about the missing value. For the Minitab macro it is stated that
      This macro replaces the missing values in a column using a smoothing technique that handles missing values by assuming a linear relationship.
      So by using this macro you assume that the ratings are given in a linear kind of way. That's at least arguable if you take a look at the list with possible reasons for missings above.
    • There are only a few missing values present in your data set, so you do have enough data to draw valid conclusions. It is not necessary to have alle the wholes filled with a value.

  • Pros and cons of tests vs. models
    • Pros of a test vs. model:
      • Easier to use and interpret for a single situation
    • Cons of a test vs. model:
      • Only a single aspect of a (often) complex situation is tested.
      • No information about the whole picture available (e.g. no coefficient of determination, residual analysis).
      • Risk of type I error increases with multiple comparisons (see Miners post). This could be avoided in models by using multiple comparison options like Tukey for more than 2 types to compare.
      • No interactions between two or more factors could be evaluated.
      • For every single test the requirements have to be checked (e.g. normality test) and the appropriate test procedure has to be choosen (e. g. normally distributed data: t-test OR Mann-Whitney test or Kruskal-Wallis test, non-normally distributed data: Mann-Whitney or Kruskal-Wallis test).
    • As the list of cons for tests vs. models is much longer and a model gives a lot more information about the data, I would almost always recommend to use a model instead of a bunch of tests.
    • If you want to conduct an analysis based on tests, I would recommend to use 1 test procedure for all to get results which are easier to compare. As some of the rating means for a specific type (e.g. P1) is not normally distributed in both groups, a t test result will be flawed at least for this ratings. You can use a Mann-Whitney or Kruskal-Wallis test to compare group1 vs. group2 for alle types instead.

  • Interpretation of normality tests
    • A test statistic or p-value thereof is only a single value to characterize the fit of the data compared with a specific distribution.
    • Different distribution tests take different deviations from the assumed distribution into account, e.g. the Anderson-Darling is more sensitive at the tails than the others (Ryan-Joiner, Kolmogorov-Smirnov), so it is most likely to get different results out of the tests.
    • Different test procedures have different qualities, e.g. the KS-test is weak in power and therefore not recommended (for details take a look at this thread)
    • It is always recommended to take a look at the data (> probability plot) and not only the p-values to get an impression about the data structure and distribution. And for your data even the ratings which do have p-values above 0.05 for all three tests (e.g. P2 in Group1), the points are stacked because the variability in the means is small due to a scale with only 4 different ratings. So imho there is not enough information in the data to assume a normal distribution - despite the test results.

  • Differences and similarities between Mann-Whitney and Kruskal-Wallis test
    • Mann-Whitney and Kruskal-Wallis test have the same recommendation: numeric data, presumably out of a distribution with equal shape for all test series (e.g. Group1 and Group2)
    • Both tests compare the difference of medians in the test series
    • Mann-Whitney
      • compares 2 medians (e.g. Group1 vs. Group2)
      • null hypothesis: median1 = median2
      • Format required for Minitab: 2 columns containing the data (e.g. 1 column for Group1, 1 column for Group2)
    • Kruskal-Wallis
      • compares 2 or more medians (e.g. type1, type2, type3 and type4)
      • null hypothesis: median1 = median2 = median3 = median4
      • Format required for Minitab: 1 column containing the data (e.g. P1(mean)) and another column containing the grouping factor (e.g. Group with G1 and G2)
      • Mathematically the Mann-Whitney test is a special case of the Kruskal-Wallis test for 2 groups.

  • Multiple comparisons with One-way ANOVA vs. GLM (with more than 1 factor) in Minitab
    • Both procedures assign an appropriate type I risk if more than 2 levels (like 6 types) are compared.
    • If One-way ANOVA is used, the effect of only 1 factor could be evaluated (see notes about tests vs. models). The results could be flawed if other factors (like Group1 vs. Group2) are present in the data.
    • If GLM with factors type, group and interaction type*group is used, the comparisons of the types are adjusted for groups and the interaction within the model. So these results are presumably more reliable than those reported in the One-was ANOVA.

Best regards :bigwave:

Barbara
 

Attachments

  • Data Ratings 2011 04 18.xls
    127.5 KB · Views: 77
  • Data Ratings for Analysis 2011 04 18.xls
    145.5 KB · Views: 98
N

noorolya.dollah

Re: Minitab and stats newbies..please help

Dear Barbara

Thank you so much for your detail steps and explanation. It has been very useful for me. However, there is still one thing that I need to clarify:

I have proceed further analysis with the GLM as per advised. I tried to use Type Group Type*Group to acquire the differences between Type 1 in G1 and Type 1 in G2, but the result was not suit with what I want to find out.
Attached is the output for you to verify.

By the way, I have revised my set of data and attached is the new one, should you need to try on your own.

Thanks.:thanx:
 

Attachments

  • data ratings 2011 04 21.xls
    125 KB · Views: 70
  • RawData210411.xls
    49.5 KB · Views: 78
  • Results forGLM210411.doc
    39 KB · Views: 60
B

Barbara B

Re: Minitab and stats newbies..please help

Noorolya,

could you please elaborate a little bit more what your concerns about the results are?

To visualize the results you could use factor plots within the GLM menu:
  1. Stat > ANOVA > GLM
  2. Responses: 'mean ratings'
    Model: group type group*type
  3. > Graphs:
    Residual Plots: Choose "Four in one"
    > OK
  4. > Factor Plots:
    Main Effect Plot: Factor: group type
    Interaction Plot: Factor: group type [without asterisk!]
    > OK
  5. > Comparisons:
    Terms: group type group*type
    Method: Tukey
    choose "grouping information", "Confidence Interval", "Test"
    > OK > OK
(Only the factor plots were missing in the document "Results forGLM210411.doc".)

The factor plots give you a visual impression about the differences in each group, whereas the Tukey test results evaluate if this differences are significant for specific combinations.

If you hover with the mouse pointer over a point in a factor plot you'll see the mean for each type, group or combination thereof. But this is a little bit tedious if you're interested in the results for a single combination.

To get the fits and confidence intervals for the fits from the GLM, use the prediction button in the GLM menu. Before something can be predicted it has to be specified at which point of the model the prediction should be calculated, that is the levels for text variables like type and group (or values for numeric variables not given here) have to be present in the worksheet. (Prediction in the GLM is a new feature with Minitab R16.)

To predict a response and confidence interval based on a GLM:
  1. Make patterned data for all combinations of type and group (in separate columns):
    1. Calc > Make Patterned Data > Text values
    2. Store patterned data in: 'pred_type' [use a short and sweet name which reflects the variable and the fact it is used for prediction]
    3. Text values (eg, red, "light blue"): "P1(mean)" "P2(mean)" "P3(mean)" "P4(mean)" "P5(mean)" "P6(mean)"
      [Beware of the correct spelling (case-sensitive) of the levels and the correct use of hyphenation marks given in parenthesis. The latter may differ with your regional settings.]
    4. Number of times to list each value: 2
    5. Number of times to list each sequence: 1
    6. OK
    And for the group-levels:
    1. Calc > Make Patterned Data > Text values
    2. Store patterned data in: 'pred_group'
    3. Text values (eg, red, "light blue"): G1 G2
    4. Number of times to list each value: 1
    5. Number of times to list each sequence: 6
    6. OK

  2. Predict responses:
    1. Stat > ANOVA > GLM
    2. Responses: 'mean ratings'
      Model: group type group*type
    3. > Graphs:
      Residual Plots: Choose "Four in one"
      > OK
    4. > Factor Plots:
      Main Effect Plot: Factor: group type
      Interaction Plot: Factor: group type
      > OK
    5. > Comparisons:
      Terms: group type group*type
      Method: Tukey
      choose "grouping information", "Confidence Interval", "Test"
      > OK
    6. [the new part for predictions]
      > Options
      Prediction intervals for new observations: 'pred_group' 'pred_type' [The order of the prediction variables have to be the same as the order in the Model field!]
      Confidence level: 95.0
      Storage: choose "Fits", "Confidence Limits"
      > OK > OK

The fits will be given in the session window and stored in the worksheet for further analysis. The confidence limits provide information about the uncertainty in your fits based on your actual data, e. g. for type P1(mean) and group G1 the fit is given as 2.37 with a 95% confindence interval (2.1989 , 2.5411).

E. g. if you want to know what the difference in the fit is for Type 1 in Group 1 and Group 2, you can unstack the fits in column 'PFits1' using the subscripts in column 'pred_group' (Data > Unstack Columns) and than use the calculator (Calc > Calculator) to get the difference for each type. The result for Type 1 in Group 2 minus Group 1 is 0.18607, so the mean ratings in Group 2 are 0.19 higher than the mean ratings in Group 1.

If you want evaluate the uncertainty in new observations use prediction intervals instead of confidence intervals. Confidence intervals always belong to the actual data, whereas prediction intervals deal with "what will happen if we do this data collection and modeling again?" So the uncertainty for predictions is higher than the uncertainty for the actual data. If you take a look at the 95% prediction interval for type P1(mean) and group G1 you can find (1.1472 , 3.5918). The upper limit lies even beyond the scale (with maximum 3) and the width is tremendous. So in the end your data and the fit of the model could not provide helpful predictions as the coefficient of determination is too small (R²=30%). But you could draw vital conclusions about the ratings measured so far.

Best regards,

Barbara
 
N

noorolya.dollah

Re: Minitab and stats newbies..please help

Dear Barbara,

Thank you so much for you kind assistances so far. I have tried the steps given below but still struggling to understand and answer the questions in my research. As a simple view, I need to answer these questions; is there any significance difference between type 1 in group1 and type 1 in group 2? If there is a significance difference, which one is the higher and which one is the lower?
I am trying to use a simple method like one way anova to compare a set of means for type 1 in group 1 and a set of means for type 1 in group 2. I found the result is quite similar to what I really need. Yet, I am still need your advice and comment on the chosen method.:confused:
Attached is the data and one way anova result.
Thank you.
 

Attachments

  • OneWay-AnovaData.xls
    15 KB · Views: 76
  • anova.doc
    55.5 KB · Views: 99
B

Barbara B

Re: Minitab and stats newbies..please help

Noorolya,

if you split the data into subsets for the different types and compare Group 1 and Group 2 separately for each type (P1-P6), the results are not very informative.

The coefficient of determination (R-sq) for the six ANOVAs varies between 0.09% (P4) and 62.93% (P5), but there is no significant difference between G1 and G2 in any model
  • p-value ANOVA>0.05
  • 0 is included in every tukey and Fisher simultaneous confindence interval = no significant difference

But take another look at the "big" GLM model for mean ratings. If you stored the fits and 95% confidence limits in the worksheet, you could find out what the differences for P1 in G1 and G2 are and if these differences are significant.

To control the type I error with multiple tests you could use the Sidak-correction (see Wikipedia reference-linkBonferroni_correction, section 2.2):
no. of tests: n=6 (P1 G1 vs. G2, P2 G1 vs. G2, ..., P6 G1 vs. G2)
max. tolerable type I risk (alpha): 5%=0.05

adjusted alpha*: (1-alpha)^(1/n) = (1-0.05)^(1/6) = 0.008512 = 0.8512%
adjusted confidence level: 1-(alpha*) = 1-0.00852 = 0.991588 = 99.1588%

To get confindence limits with adjusted alpha or rather adjusted confidence level:
  • Change the confidence level within GLM > Options from 95.0 to 99.1588 (for prediction)
  • Store the results in the worksheet
  • Compare the differences and confidence intervals as in the examples attached.

Best regards,

Barbara
 

Attachments

  • Data Ratings Fits and Confidence Limits 2011 04 28.xls
    25 KB · Views: 83
Top Bottom