Magnets and Pain Relief

 

Web Resource: Rice Virtual Lab in Statistics By David M. Lane
Case: Magnets and Pain Relief
 

Background, Experimental Design, and Materials
 

Click the above link and a new web page, Magnets and Pain Relief, will appear. Next, choose Background, Experimental design, and Materials from the list to the left.

Can the application of magnetic fields be an effective treatment for pain?

Variables Involved

  ______________________________________________

One Independent Variable with Two Levels

Device: an active magnetic device vs. an inactive magnetic device

Patients experiencing post-polio pain syndrome were recruited. Half of the patients were treated with an active magnetic device and half were treated with an inactive device.

Coding: The subjects in the experimental group were treated with an active magnetic device and they were coded as 1. The subjects in the control group were treated with an inactive placebo and they were coded as 2. 

Dependent Measures: Pre and Post treatment Scores

All subjects grades pain at the trigger point under palpitation on a scale from 1 to 10 (1 is the least pain, increasing to 10). Pain was graded before and after application of the above device. 

Data Analysis

Simplified Presentation

To simplify the presentation, an independent t-test will be introduced here. The independent variable is the device with two levels: an active magnet and an inactive placebo. The dependent variable is the post-treatment scores, score_2.

 The Null hypothesis

There is no difference in post-treatment ratings of pain between the two groups.

The Alternative Hypothesis

The mean rating of pain for the experimental group is lower than that for the control group. The application of magnetic fields is an effective treatment for pain. It is a one-sided test.

Set a Significance Level

Use a .05 significant level.

Assumptions

An independent t-test makes three assumptions:
 

  1. The populations are normally distributed.

  2. The variances in the populations are equal.

  3. Each observation is sampled randomly and is independent of each other observation.

If the assumptions are violated, the test results may not be valid.

Obtain the Raw Data

Copy the Data Set

Click the Raw Data section. It is listed on the left side of the web page: Magnets and Pain Relief. Highlight the variable names and all the scores. Then right click on the highlighted area and select Copy from the pop-out menu.


 

Now you may minimize or close the Magnets and Pain Relief window.
 

Start a Word Processing Program

For example, if you have the Microsoft Word program, you may start Microsoft Word by choosing Start \ Programs \ Microsoft Word.

Paste Raw Data

Choose Edit \ Paste. The raw data set will appear.

Save the File

To save the file, choose File \ Save as.

Save in: Select a preferred drive.
Save as type: click the down arrow and select Text only (*.txt)
File name: Score.txt.
Click save. Click Yes.
Exit Microsoft Word.

Import the File to SPSS

Start the SPSS. Choose File \ Read Text Data. The Open File dialog will appear. Select the drive and the file. Click Open. The Text Import Wizard window will appear.

Step 1: Does your text file match a predefined format?

No. The first line in our text file is variable names. Click the Next button.

Step 2: How are your variables arranged?

Delimited. Spaces are used to separate variables in our text file.

Are variable names included at the top of your file?

 Click "Yes". Click the Next button.

Step 3: The default selections are correct.

  Click the Next button. 

Step 4: Which delimiters appear between variables?

Space. Click the Next button.

Step 5: Specifications for variable(s) selected in the data preview.

Four Variables

The variable "score_1" was the pain rating measured before the treatment.
The variable "score_2"  was the pain rating measured after the treatment.
The variable "change" is the difference between the two ratings (score_1 - score_2 = change).
The variable "active" specifies the group membership. The experimental group was coded as 1 and the control group was coded as 2. 

Click each variable in the Data preview window.

The variable name and data format will display in the text box.

Click the Next button.  

Step 6: Click the Finish button. The data set will appear in the SPSS Data Editor window.

Imported Variables

The variable "score_1" was the pain rating measured before the treatment.
The variable "score_2"  was the pain rating measured after the treatment.
The variable "change" is the difference between the two ratings (score_1 - score_2 = change).
The variable "active" specifies the group membership. The experiment group was coded as 1 and the control group was coded as 2. 

Part One     Screen Data

Descriptive Statistics

Choose Analyze \ Descriptive Statistics \ Explore. First, move the variable "score_2" to the Dependent List. Next, move the variable "active" to Factor List. 

 

The Statistics Button and the Plots button: Click the Statistics button and select Outliers and click Continue. Click the Plots button and select Histogram and Normality plots with tests. In the Spread vs. Level with Levene Test, select Power estimation.

What does power estimation mean? Right click on Power estimation. The definition will pop out.

Finally, click continue and OK.

 

Results

1. Number of Subjects

The number of subjects in the experimental group is 29. The number of subject in the control group is 21.

 

  2.  Descriptive Statistics for Each Group


Examine measures of central tendency and measures of variability.

Subjects grade pain at the trigger point under palpitation on a scale from 1 to 10 (1 is the least pain, increasing to 10).

Mean

The mean pain rating for the experimental group is 4.379. The mean pain rating for the control group is 8.429. It appears that the treatment group experienced less pain.

Standard Deviation

The sample standard deviation for the experimental group is 3.144. The sample standard deviation for the control group is 1.859. It appears that the pain ratings are more variable in the experimental group.  

Deviate from Normality

A value of zero for the skewness indicates a symmetric distribution. A value of zero for the kurtosis indicates the a shape (flatness or peakedness) close to normal. The normal distribution has kurtosis of zero. 

Experimental Group

Skewness = .541 and Standard Error = .434

The value of the coefficient of skewness is slightly more than 1 times its standard error. For our example, .541 / .434 = 1.25

Kurtosis = -.546 and Standard Error = .845

For our example, -.546/.845 = -.646. The value of the coefficient of kurtosis is less than 1 times its standard error. 

We will visualize the distribution by plotting a histogram and a boxplot.

Control Group

Skewness = -1.062 and Standard Error = .501

For our example, -1.062/.501 = -2.12. The value of the coefficient of skewness is more than 2 times its standard error. The distribution is negatively skewed.

Kurtosis = .175 and Standard Error = .972

For our example, .175/.972 = .18. The value of the coefficient of kurtosis is less than 1 times its standard error. 

We will visualize the distribution by plotting a histogram and a boxplot.

Interval Estimation

(1) Experimental Group: Based on the sample mean and standard error of the mean, a confidence interval can be computed. The 95% confidence interval for the mean is 3.183 to 5.575.

(2) Control Group: The 95% confidence interval for the mean is 7.582 to 9.275.

(3) Note that the two confidence intervals do not overlap. A significant mean difference will be found between the two groups.

3. Test of Normality

   

The hypothesis of normality of post-treatment scores for both groups was rejected, p < .05.

4. Test of Homogeneity of Variance 


Based on Mean

The null hypothesis that the two group variances are equal was rejected, p < .05.

5. Histograms

Experimental group

Control Group

 It appears that the distribution of the scores for the control group is negatively skewed. More subjects in the control group reported higher degrees of pain.

6. Normal Q-Q Plots

If the sample is from a normal population, the data points should fall on a straight line.

Experimental group

Control group

The normal Q-Q plots showed that the values deviated somewhat from the straight line.

7. Detrended Normal Q-Q Plots

If the sample is from a normal population, the data points are expected to cluster around a horizontal line through 0. Also, there should be no pattern.

Experimental group

Control group

 

Note that the deviations from a straight line are not randomly distributed around 0.

8. Boxplots

The side-by-side boxplots for the two groups on the dependent variable, score_2 (post-treatment ratings of pain), is displayed below 


Variability

The length of the box represents the difference between the 25th and 75th percentiles. The larger the box, the greater the spread of the data.  Note that the pain ratings are more variable in the experimental group.   

Skewness

1. Median

If the median is not in the center of the box, the distribution is skewed. If the median is closer to the top of the box, the distribution may be negatively skewed. If the median is closer to the bottom of the box, the distribution may be positively skewed. 

2. Length of Whiskers

Draw lines from the ends of the box to the largest and smallest values that are not outliers. These lines are called whiskers. If the upper whisker is much longer than the lower whisker, it gives the impression of positive skewness. If the lower whisker is much longer than the upper whisker, it gives the impression of negative skewness. Note that your data set should  be large enough to make the above observation.

Outliers

Case numbers are used to label outliers (o) and extremes (*). The outliers are cases  with the values between 1.5 and 3 box-lengths from  the 75th percentile or 25th percentile. The extreme values are cases with the values more than 3 box-lengths from the 75th percentile or 25th percentile.

Note that there are two outliers detected in the control group. The outliers may be due to recoding errors, due to the sample being from a skewed population distribution or not being from the same population, or simply due to the small sample size.

Should you delete the outlier? Look for a reason why it happened. Once you know the reason, the further course of analysis becomes obvious.

9. Spread-versus-Level Plot 

The spread-versus-level plot plots the nature logs of the interquartile ranges against the natural logs of the medians for each group. Note that there is a strong negative relationship (slope = -.725) between the spread and level. A power transformation can be used to lessen the relationship. 

power = 1 - slope = 1.725

Thus, the closest power is 2 (square).

The following commonly used transformations are listed in the SPSS Base System User's Guide. 
 

Power

Transformations

3

Cube

2

Square

1

No Change

1/2

Square Root

0

Logarithm

-1/2

Reciprocal of the square root

-1

Reciprocal

 

Remedy

We have detected that our data violate assumptions of normality and homoscedasticity. In this case, transforming the data or use a nonparametric test may provide a better analysis. 

Ask Why

When an assumption is violated, the correct course of action is to find a reason why it happened. Once you know the reason, the further course of analysis becomes obvious.

Normalize the Skewed Distribution

If the coefficient of skewness is not statistically significant, the departure of the distribution from normality can be considered due to random factors, and the distribution can be normalized. In general, area transformations are a better method of the normalization of data than other methods, as, e.g., the square root method, the logarithm transformation, or the often used arc sine transformation.

If the coefficient of skewness is statistically significant, other avenues leading to normality should be explored. Normalizing markedly skewed distributions may obscure factors making the distribution skewed to begin with. These factors may, in some cases, be of crucial importance.

   Rank the Data

If the distribution does not appear to be normal and the sample size is small, we may consider statistical procedures that do not require the assumption of normality (distribution-free or nonparametric tests) and transform the interval or ratio data to the ordinal data. The scores will be ranked from smallest to largest values.    

The Mann-Whitney test (Wilcoxon Rank-Sum) is a non-parametric analog of the independent t-test. However the t-test procedure will always have more power than the corresponding non-parametric test if the distribution is normal.
 

Square Transformations

Suppose that the researcher decided to transform the data to stabilize the variances.

A power transformation is often used to stabilize variances (SPSS Base System User's Guide, Release 6.0). 

First, the researcher would like to to correct nonnormality and unequal variances by transforming all the data values of the variable "score_2". 

Transformations are usually chosen from the "power family" of transformations. To achieve equal variances in the groups, a square transformation is suggested by the SPSS. Switch to the Data Editor window. To apply the square transformation, choose Transformation \ Compute. Type square in the Target Variable text box.  

Next, type score_2, *, and score_2 in the Numeric Expression text box.  

 

Click OK. The new variable, square, will appear in the Data Editor window.

To judge the success of the transformation, choose Analyze \ Descriptive Statistics \ Explore. Move the previously selected variable, score_2, back to the variable list. Click the new variable, square, and move it to the Dependent List. Click OK. 

Results

1. Examine descriptive statistics

 

Standard Deviation

The sample standard deviation for the experimental group is 34.05. The sample standard deviation  for the control group is 28.20. The standard deviations for the two groups are more equivalent compared to the original, untransformed data. The square transformation did help.

Skewness and Kurtosis

The values of skewness and kurtosis should be close to zero after a successful transformation.

For our example, the skewness for the experimental group is increased to 1.363 (about 3 times its standard error). The skewness for the placebo (control) group is decreased to -.736  (about 1 times its standard error).

For the experimental group, the value of kurtosis is less than 1 times its standard error (.477/.845 = .56). For the control group, the value of kurtosis is less than 1 times its standard error (-.712/.972 = -.73). 

What do you conclude?

2. Test of Normality

The hypothesis of normality of post-treatment scores for both groups was still rejected, p < .05.
 

3. Test of Homogeneity of Variance

 

The null hypothesis that the two group variances are equal was not rejected, p > .05.

A power transformation is often used to stabilize variances (SPSS Base System User's Guide, Release 6.0). A square transformation achieved equal variances in the groups. 

4. Data Visualizations

The square transformation was not successful in normalizing the skewed distributions. Observe the following graphs.

Histograms

   

Normal Q-Q Plots

If the sample is from a normal population, the data points should fall on a straight line.  

Experimental Group

Control Group

 

Detrended Normal Q-Q Plots

I
f the sample is from a normal population, the data points are expected to cluster around a horizontal line through 0. Also, there should be no pattern.

Experimental group

Control group

 

Boxplot 

 

Variability

The length of the box represents the difference between the 25th and 75th percentiles. The larger the box, the greater the spread of the data.  Note that the variability of pain ratings are similar for the two groups.   

Length of Whiskers

Draw lines from the ends of the box to the largest and smallest values that are not outliers. These lines are called whiskers. If the upper whisker is much longer than the lower whisker, it gives the impression of positive skewness. If the lower whisker is much longer than the upper whisker, it gives the impression of negative skewness.

Conclusion

A square transformation did achieve equal variances in the groups. However, the square transformation was not successful in normalizing the skewed distributions. 

 

Part Two     Inferential Statistics

Conduct the Mann-Whitney test.

The square transformation was not successful in correcting the nonnormality. The researcher then decided to use a nonparametric test.

If the distribution does not appear to be normal and the sample size is small, we may consider statistical procedures that do not require the assumption of normality (distribution-free or nonparametric tests)  and transform the interval or ratio data to the ordinal data. The scores will be ranked from smallest to largest values. The Mann-Whitney test (Wilcoxon Rank-Sum) is a non-parametric analog of the independent t-test. (The Kruskal-Wallis method is a non-parametric analog of one-way ANOVA.) However the t-test/ANOVA procedures will always have more power than the corresponding non-parametric tests if the distribution is normal.

Choose Analyze \ Nonparametric Tests \ Two Independent Samples. Move the variable "score_2" to the test Variable list. Move the variable "active" to the Grouping Variable list. Click on the define Groups button. Group1: Type 1 in the textbox. Group 2: Type 2 in the textbox. Click Continue. 

 

 

Click the Options button and select Descriptive statistics. Click Continue and OK.

 

Results

It begins by combining the scores from two groups into a single set. These scores are then rank-ordered from lowest to highest.

Mean Rank

The mean rank for the experimental group is lower (18.31) than the mean rank for the control group (35.43). 

Sum of Ranks

If the two populations have the same distribution, their sample distributions of ranks should be similar.

Note that the sum of the ranks for the experimental group (531) was much smaller than the control group (744).

Test Statistics  

Wilcoxon W

The number (531) identified as W represents the sum of the ranks for the experimental group. If the two populations have the same distribution, their sample distributions of ranks should be similar (SPSS Base System User's Guide).

Recall that the sum of the ranks for the experimental group (531) was much smaller than the control group (744). 

Mann-Whitney U

The number (96) identified as U represents the number of times a value in the experimental group precedes a value in the control group. If the two populations have the same distribution, values from one group should not consistently precede values in the other (SPSS Base System User's Guide).

The Z value and the Associated Probability

The z value was -4.418. The probability associated with a z value of -4.418 was was less than .05. The null hypothesis was rejected. The two groups were significantly different. The experimental group experienced less pain.

Conduct an independent t test.

Parametric techniques are preferred because of their greater sensitivity. That is, they are more likely to lead to reject the null hypothesis.

Test the consequences of assumption violation by Simulation

Open the web page, http://www.ruf.rice.edu/~lane/case_studies/magnets/index.html, click the Inferential Statistics section. Dr. David Lane suggested to run the "Data Analysis Lab" and to test the consequences of these assumption violations by simulation. The results indicates a significant difference can be used to reject the null hypothesis even with the assumption violation.

Conduct an independent t test. The dependent variable will be the post-treatment measure, score_2 and the independent variable will be the variable "active".

The Null hypothesis

There is no difference in post-treatment ratings of pain between the two groups.

The Alternative Hypothesis

The mean rating of pain for the experimental group is lower than that for the control group. The application of magnetic fields is an effective treatment for pain.

It is a one-sided test.

Choose Analyze \ Compare Means \ Independent Samples T Test. Move the variable "score_2" to the test Variable list. Move the variable "active" to the Grouping Variable list.  

 

Click on the define Groups button. Group1: Type 1 in the textbox. Group 2: Type 2 in the textbox. Click Continue. 




Click OK.   

Results

Group Statistics 

The group treated with the active magnet reported lower pain ratings (M = 4.38, s = 3.14) than did the group treated with the inactive placebo (M = 8.429, s = 1.86).  Note that the mean difference is very large (4.379 - 8.429 = -4.05) and the two standard deviations are not equal (3.14 vs. 1.86).

Independent Samples Test

 

Equality of Variances

Levene's test is used to test the null hypothesis that the two population variances are equal. 

The probability associated with the F test is less than .05. The null hypothesis was rejected, F = 4.458, p = .04. The assumption of homoscedasticity was not met.

Equal Variance Not assumed    

Examine the t ratio corrected for inequality of variance (the Welch t test)

The probability associated with the t value was less than .05. The null hypothesis was rejected.

The group treated with the active magnet reported significantly lower pain ratings (M = 4.38, s = 3.14) than did the group treated with the inactive placebo (M = 8.429, s = 1.86), t(46.418) = -5.695, p < .05.

95% Confidence Interval of the difference

The 95% confidence interval for the difference between two population means was from -5.48 to -2.6184.

Test hypotheses by using confidence interval of the difference

Note that the null hypothesis of no difference was rejected and the 95 % confidence interval for the  difference between two population means did not include 0 (the null value). The null hypothesis value falls outside the 95% confidence interval around the sample mean difference.  

Part Three    Q and A

Open the web page: Magnets and Pain Relief. Choose Descriptive Statistics, Inferential Statistics, and Interpretation from the list to the left and answer the associated questions. 

Web Resources

http://www.davidmlane.com/hyperstat/dist_free.html by David Lane