Statistics

General Linear Model in Minitab

This procedure gives almost similar results to the Pipestat!!!

  1. In our design Accommodation had three levels (Coll, consist, mp) and the Participants were nested inside the accommodation (one Participant could participate in only one condition or a between-subject design)
  2. These both were crosses with Distance (5 levels)
  3. All of these were again crossed with repetition of distances.
  4. The trick is to consider the nested variables as a single unit when describing the model in Minitab
  5. So the model for this design would be
    • condition participant(condition)
    • distance distance*condition distance*participant(condition)
    • repetition repetition*condition repetition*participant(condition) repetition*distance  repetition*distance*condition repetition*distance*participant(condition)
  6. It is much better to do it in Pipestat as it figures out the model itself rather than us specifying it.

My original motivation to study the model was to do post-hoc test REGWQ etc. in Minitab but it looks like it does not provide that test.


Analysis of variance and Ryan’s post-hoc in SPSS

  1.  Arrange data in columns
  2. Analyze -> General Linear Model -> Univariate
  3. Select the Dependent Variable as the value based on which the ANOVA will be run or Grouping in the REGWQ will be done (Error)
  4. Select Fixed Factors as the independent variables of which the effects need to be found (Distance , Repetition for Anova) (only Distance for REGWQ)
  5. Select the Random Factor (Participant) [This one is important]
  6. Select the post-hoc tests you need.
  7. Click OK

 


ANOVA vs. MANOVA

ANOVA MANOVA
One dependent variable Multiple dependent variables
Univariate F value Multivariate F value (Wilks’ lambda)
Multiple independent variables (Multi-Factor ANOVA) is not MANOVA
based on a comparison of the Mean square error (Within-group variability) and the mean square effect (Between-group variability) based on a comparison of the error variance/covariance matrix and the effect variance/covariance matrix
After getting a significant Multivariate effect, next step is to run Univariate test on each dependent variable to find which dependent variable was affected most and hence contributed in main multivariate effect.

“R”

R Commands:

  • getwd(): returns the current working directory
  • setwd("C:/R/tables"): Sets the current directory
  • source("src.R"): run the R source file
  • y<-edit(y): opens up a notepad/spreadsheet with data from y
  • data1<-edit(data.frame()): opens up a spreadsheet for data entry
  • tbl<-read.table("table.dat", header = T, sep =""): reads table.dat with header and space as delimiter.
  • dat.collim$Part <- factor(dat.collim$Part): It removes the unnecessary or empty levels for a variable.

 

Useful R Links:

 


Boxplot

Boxplot’s relation to Mean
  • Longer tail on the upper side means mean is higher than the median (median is shifted towards LQ) [a +vely skewed distribution]
  • Longer tail on the lower side means mean is lower than the median (median is shifted towards UQ) [a -vely skewed distribution]

Minitab Tricks

Importing .dat, .csv, xls file in Minitab

  • File -> Open Worksheet  [Choose .dat, .csv etc]

Removing empty cells in boxplot for between-subject design

  • Double click the axis variable.
  • Uncheck: “Include empty cells”.
  • This shows only those ticks that has some data in it, which is very useful in case of between-subject design, as the participants are divided into different treatment groups.

Changing order of x-axis groups

Minitab picks a default ordering for x-axis groups (usually Alphabetical or Numeric ordering) If you want to change the order of group variables on x-axis (e.g.  Low, Medium, High to Medium, Low, High):

  • Select the column in the data window which represents the group in the graph.
  • Right click and select Column->Value Order
  • Select User-specified order
  • Add the desired order, Click OK
  • Any graph from now onward will follow that order

 

Changing color of x-axis groups

  • The colors for groups can be selected in the dialog box at Tools->Options->Graphics-> Data View With Groups -> Symbol and Line Colors
  • You can also change color for individual groups or sub-groups by double clicking on the bars and choosing appropriate attributes in the dialog box.
  • Before double clicking, click just once to switch between different grouping variables.

SEM vs 95% CI

http://www.graphpad.com/articles/errorbars.htm

Notes:
  1. Assuming unpaired t-test.
  2. SEM bars are often about half or less smaller than 95% CI bars.
  3. SEM Bars
    • When SEM bars overlap , There is surely no statistical significant difference (p>0.05).
    • When SEM bars do not overlap, There may or may not be a statistical significant difference.
  4. 95% CI bars
    • When CI bars overlap, There may or may not be a statistical significant difference.
    • When CI bars do not overlap, There is definitely a statistical significant difference (p<0.05).