Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Sample size for mvtest in MANOVA assumption test

    Hi Statalist community!

    I am looking for advice on a specific Stata command - I am analyzing simulation output with MANOVA (in STATA) and want to test the assumptions - specifically (1) the Homoscedasticity and (2) Correlation of the dependent variables.

    I'm using the following code in STATA for the test and I am getting the error message below:

    Code

    (1)
    Code:
    mvtest covariance y1 y2, by(group)
    (2)
    Code:
    mvtest correlations y1 y2, by(group)
    Error message:

    Code:
    size of sample 1 too small
    My experiment is using a Box-Behnken fractional design with 108 treatment groups and 24 sample per treatment group (thus 2.592 observations) - in my opinion this should be enough.
    Has anybody an idea what I am doing wrong? Any help would be really appreciated.

    Thanks a lot & have a great new year's eve,

    Eike
    Last edited by eiken; 30 Dec 2014, 05:01.

  • #2
    I didn't find anything in the entries for these tests in the user's manual about the relation between the minimum sample size and the number of groups, but if you set trace on you can see that the code tests to make sure that sample sizes are smaller than the number of groups - 1 for mvtest covariance or number of groups for mvtest correlations. You can see the limits by running this
    Code:
    version 13.1
    
    clear *
    set more off
    
    drawnorm y1 y2, double corr(1 0.5\  0.5 1) n(`= 24 * 108') seed(`=date("2014-12-31", "YMD")')
    generate int group = mod(_n, 108) + 1
    
    manova y1 y2 = group
    
    quietly count if group == 1
    local N1 = r(N)
    capture noisily mvtest covariance y1 y2, by(group)
    capture noisily mvtest covariance y1 y2 if group <= `N1', by(group)
    capture noisily mvtest covariance y1 y2 if group <= `N1' - 1, by(group)
    mvtest covariance y1 y2 if group < `N1' - 1, by(group)
    
    capture noisily mvtest correlations y1 y2, by(group)
    capture noisily mvtest correlations y1 y2 if group <= `N1', by(group)
    mvtest correlations y1 y2 if group < `N1', by(group)
    
    exit

    Comment

    Working...
    X