Means and LS Means Calculation in Statistics

 
web example
http://onbiostatistics.blogspot.com/2009/04/least-
squares-means-marginal-means-vs.html
 
Data
 
Model with only main effects (JMP output):
Center
 
 
Level 
 
Least Sq Mean
 
 
 
Mean
1
 
                   4.00
  
                      4.00
2           
 
6.00
  
                      6.00
 
Model with only main effects (JMP output): Trt
 
 
Level 
 
Least Sq Mean
 
Mean
A
 
                   5.00
 
                      4.80
B          
 
5.00
 
                      5.20
 
Model with interaction in JMP (the right model to
use in JMP): Center
 
 
Level 
 
Least Sq Mean
 
Mean
1
 
                   4.25
 
                      4.00
2
 
                   6.25
 
                      6.00
 
Model with interaction in JMP (the right model to
use in JMP): Trt
 
 
Level 
 
Least Sq Mean
 
Mean
A
 
                   5.25
 
                      4.80
B          
 
5.25
 
                      5.20
 
How are Means calculated? (from webpage)
 
The mean value for Treatment A is simply the
summation of all measures divided by the total
number of observations:
Mean for treatment A = 24/5 = 4.8)
Mean for treatment B = 26/5 = 5.2.
Mean for treatment A > Mean for treatment B.
 
How are LS Means calculated? (again, webpage)
 
Table 2 shows the calculation of least squares means.
First step is to calculate the means for each cell of
treatment and center combination.
The mean 9/3=3 for treatment A and center 1
combination
7.5 for treatment A and center 2 combination
5.5 for treatment B and center 1 combination
5 for treatment B and center 2 combination.
 
LS Means continued (again from webpage)
 
After the mean for each cell is calculated, the least
squares means are simply the average of these means.
For treatment A, the LS mean is (3+7.5)/2 = 5.25
For treatment B, it is (5.5+5)/2=5.25
The LS Mean for both treatment groups are identical.
 
Ahh, that’s fine, but what about empty cells?
 
First fit a two-way model with least squares
Then estimate the predicted value for that empty cell
Put that value in as though it were “real” data, this is
called “
imputing
” the value
Redo the analysis and 
voila, 
you get the LS Means!!!
One can do this iteratively and this is called “
multiple
imputation”
, but that gets used elsewhere in Statistics
(i.e. you don’t have to worry about it)
 
Predicted values for empty cells
 
Predicted values for empty cells are obtained with a
Regression model.
With Regression, you can obtain “predicted values”
even where there is no data point.
You can do the same thing in ANOVA by using
Regression with Dummy Variables.
Dummy  variables are “indicator variables’ for class
variables.
Slide Note
Embed
Share

Explanation of how means and least squares means (LS Means) are calculated in statistics. Describes the process of calculating means for different treatments and centers, as well as deriving LS Means through an iterative process, including handling empty cells.

  • Statistics
  • Calculation
  • LS Means
  • Treatment
  • Imputation

Uploaded on Jul 17, 2024 | 2 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. Download presentation by click this link. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

E N D

Presentation Transcript


  1. web example http://onbiostatistics.blogspot.com/2009/04/least- squares-means-marginal-means-vs.html

  2. Data

  3. Model with only main effects (JMP output): Center Level 1 2 Least Sq Mean 4.00 6.00 Mean 4.00 6.00

  4. Model with only main effects (JMP output): Trt Level A B Least Sq Mean 5.00 5.00 Mean 4.80 5.20

  5. Model with interaction in JMP (the right model to use in JMP): Center Level 1 2 Least Sq Mean 4.25 6.25 Mean 4.00 6.00

  6. Model with interaction in JMP (the right model to use in JMP): Trt Level A B Least Sq Mean 5.25 5.25 Mean 4.80 5.20

  7. How are Means calculated? (from webpage) The mean value for Treatment A is simply the summation of all measures divided by the total number of observations: Mean for treatment A = 24/5 = 4.8) Mean for treatment B = 26/5 = 5.2. Mean for treatment A > Mean for treatment B.

  8. How are LS Means calculated? (again, webpage) Table 2 shows the calculation of least squares means. First step is to calculate the means for each cell of treatment and center combination. The mean 9/3=3 for treatment A and center 1 combination 7.5 for treatment A and center 2 combination 5.5 for treatment B and center 1 combination 5 for treatment B and center 2 combination.

  9. LS Means continued (again from webpage) After the mean for each cell is calculated, the least squares means are simply the average of these means. For treatment A, the LS mean is (3+7.5)/2 = 5.25 For treatment B, it is (5.5+5)/2=5.25 The LS Mean for both treatment groups are identical.

  10. Ahh, thats fine, but what about empty cells? First fit a two-way model with least squares Then estimate the predicted value for that empty cell Put that value in as though it were real data, this is called imputing the value Redo the analysis and voila, you get the LS Means!!! One can do this iteratively and this is called multiple imputation , but that gets used elsewhere in Statistics (i.e. you don t have to worry about it)

  11. Predicted values for empty cells Predicted values for empty cells are obtained with a Regression model. With Regression, you can obtain predicted values even where there is no data point. You can do the same thing in ANOVA by using Regression with Dummy Variables. Dummy variables are indicator variables for class variables.

Related


More Related Content

giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#