semiparametric manova

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

semiparametric manova

R help mailing list-2
Hello,

I was wondering if there are other packages like MANOVA.RM that could be used to analysis non normal distributions. I have to analyze data with more than 2 predictor variables and a similar number of response variables. When I try the function MANOVA.wide with more than 2 predictor variables, I get

There is at least one factor-level combination
           with less than 2 observations!

Is there another package out there that can be used to analyze the significance of more than 2 predictor variables?

thanks,

yah
______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

signature.asc (523 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: semiparametric manova

David Carlson
The error message does not say anything about having more than two predictor variables. It says that one of the combinations of the predictor variables has less than 2 observations (i.e. 1 or 0 observations). That is probably an issue of your sample size. You may need to consider combining some of the categories in your predictor variables or increasing your sample size. Are your predictor variables coded as factors?

----------------------------------------
David L Carlson
Department of Anthropology
Texas A&M University
College Station, TX 77843-4352


-----Original Message-----
From: R-help <[hidden email]> On Behalf Of Yectli Huerta via R-help
Sent: Monday, November 12, 2018 2:38 PM
To: [hidden email]
Subject: [R] semiparametric manova

Hello,

I was wondering if there are other packages like MANOVA.RM that could be used to analysis non normal distributions. I have to analyze data with more than 2 predictor variables and a similar number of response variables. When I try the function MANOVA.wide with more than 2 predictor variables, I get

There is at least one factor-level combination
           with less than 2 observations!

Is there another package out there that can be used to analyze the significance of more than 2 predictor variables?

thanks,

yah
______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: semiparametric manova

David Winsemius
In reply to this post by R help mailing list-2

On 11/12/18 12:37 PM, Yectli Huerta via R-help wrote:
> Hello,
>
> I was wondering if there are other packages like MANOVA.RM that could be used to analysis non normal distributions. I have to analyze data with more than 2 predictor variables and a similar number of response variables. When I try the function MANOVA.wide with more than 2 predictor variables, I get
>
> There is at least one factor-level combination
>             with less than 2 observations!
>
> Is there another package out there that can be used to analyze the significance of more than 2 predictor variables?


That is a warning about a problem with your data in one or more of the
"cells" defined by your factor levels. It's not going to be solved by
choosing another package. You should be able to determine which variable
is causing this warning by first looking at the data, a step should
_always_ precede running any multivariate procedure.

--

David.

> thanks,
>
> yah
>
> ______________________________________________
> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: semiparametric manova

R help mailing list-2
thanks for the replies.

i don't believe the data is the problem. here you see how i used 3 variables and it fails,
but when i use any combination of 2 variables, it does work

> head(df)
   V1 V2 V3 V4 V5           V6           V7
1 200 16 16  3 64 5.584092e+13 1.616745e+12
2 200 16 16  3 64 5.589262e+13 1.715906e+12
3 200 16 16  3 64 5.588578e+13 1.714084e+12
4 200 16 16  3 64 5.588061e+13 1.651920e+12
5 200 16 16  3 64 5.589810e+13 1.624824e+12
6 200  8 16  1 48 5.585124e+13 1.689478e+12
> library(MANOVA.RM)
> df$V1
[1] 200 200 200 200 200 200 200 200 200 200 200 200 200 200 200 500 500 500 500
[20] 500 500 500 500 500 500 350 350 350 350 350 200 200 200 200 200 200 200 200
[39] 200 200 200 200 200 200 200 500 500 500 500 500 350 350 350 350 350 350 350
[58] 350 350 350 350 350 350 350 350 350 350 350 350 350 500 500 500 500 500 500
[77] 500 500 500 500 350 350 350 350 350 500 500 500 500 500
> df$V2
[1] 16 16 16 16 16  8  8  8  8  8  8  8  8  8  8 16 16 16 16 16  8  8  8  8  8
[26]  8  8  8  8  8 24 24 24 24 24 24 24 24 24 24 16 16 16 16 16  8  8  8  8  8
[51] 16 16 16 16 16  8  8  8  8  8 16 16 16 16 16 24 24 24 24 24 24 24 24 24 24
[76] 16 16 16 16 16 24 24 24 24 24 24 24 24 24 24
> df$V3
[1] 16 16 16 16 16 16 16 16 16 16  9  9  9  9  9  9  9  9  9  9 23 23 23 23 23
[26]  9  9  9  9  9  9  9  9  9  9 23 23 23 23 23 23 23 23 23 23 16 16 16 16 16
[51]  9  9  9  9  9 23 23 23 23 23 16 16 16 16 16 23 23 23 23 23 16 16 16 16 16
[76] 23 23 23 23 23 16 16 16 16 16  9  9  9  9  9
>
> MANOVA.wide(cbind(V6,V7)~V1*V2*V3,data=df,seed=1234)
Error in MANOVA.wide(cbind(V6, V7) ~ V1 * V2 * V3, data = df, seed = 1234) :
  There is at least one factor-level combination
           with less than 2 observations!

> MANOVA.wide(cbind(V6,V7)~V1*V2,data=df,seed=1234)
Call:
cbind(V6, V7) ~ V1 * V2

Wald-Type Statistic (WTS):
      Test statistic df p-value
V1            17.870  4   0.001
V2            20.392  4   0.000
V1:V2         24.127  8   0.002

....

> MANOVA.wide(cbind(V6,V7)~V1*V3,data=df,seed=1234)
Call:
cbind(V6, V7) ~ V1 * V3

Wald-Type Statistic (WTS):
      Test statistic df p-value
V1            18.566  4   0.001
V3            19.894  4   0.001
V1:V3         27.330  8   0.001

...
> MANOVA.wide(cbind(V6,V7)~V2*V3,data=df,seed=1234)
Call:
cbind(V6, V7) ~ V2 * V3

Wald-Type Statistic (WTS):
      Test statistic df p-value
V2            20.139  4   0.000
V3            19.947  4   0.001
V2:V3         32.088  8   0.000

....
______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

signature.asc (523 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: semiparametric manova

David Carlson
With two variables there are no combinations with less than 2 observations. Here's the part of the data you provided:

> df <- structure(list(V1 = c(200, 200, 200, 200, 200, 200, 200, 200,
200, 200, 200, 200, 200, 200, 200, 500, 500, 500, 500, 500, 500,
500, 500, 500, 500, 350, 350, 350, 350, 350, 200, 200, 200, 200,
200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 500, 500,
500, 500, 500, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350,
350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 500, 500, 500,
500, 500, 500, 500, 500, 500, 500, 350, 350, 350, 350, 350, 500,
500, 500, 500, 500), V2 = c(16, 16, 16, 16, 16, 8, 8, 8, 8, 8,
8, 8, 8, 8, 8, 16, 16, 16, 16, 16, 8, 8, 8, 8, 8, 8, 8, 8, 8,
8, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 16, 16, 16, 16, 16,
8, 8, 8, 8, 8, 16, 16, 16, 16, 16, 8, 8, 8, 8, 8, 16, 16, 16,
16, 16, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 16, 16, 16, 16,
16, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24), V3 = c(16, 16, 16,
16, 16, 16, 16, 16, 16, 16, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 23,
23, 23, 23, 23, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 23, 23, 23, 23,
23, 23, 23, 23, 23, 23, 16, 16, 16, 16, 16, 9, 9, 9, 9, 9, 23,
23, 23, 23, 23, 16, 16, 16, 16, 16, 23, 23, 23, 23, 23, 16, 16,
16, 16, 16, 23, 23, 23, 23, 23, 16, 16, 16, 16, 16, 9, 9, 9,
9, 9)), class = "data.frame", row.names = c(NA, -90L))

> xtabs(~V1+V2+V3, df) # There are 9 cells with 0 entries. That is the problem.
, , V3 = 9

     V2
V1    8 16 24
  200 5  0  5
  350 5  5  0
  500 0  5  5

, , V3 = 16

     V2
V1    8 16 24
  200 5  5  0
  350 0  5  5
  500 5  0  5

, , V3 = 23

     V2
V1    8 16 24
  200 0  5  5
  350 5  0  5
  500 5  5  0

> xtabs(~V1+V2, df)  # No cells < 2 with V1, V2
     V2
V1     8 16 24
  200 10 10 10
  350 10 10 10
  500 10 10 10
> xtabs(~V1+V3, df)  # No cells < 2 with V1, V3
     V3
V1     9 16 23
  200 10 10 10
  350 10 10 10
  500 10 10 10
> xtabs(~V2+V3, df)  # No cells < 2 with V2, V3
    V3
V2    9 16 23
  8  10 10 10
  16 10 10 10
  24 10 10 10


David L. Carlson
Department of Anthropology
Texas A&M University



-----Original Message-----
From: R-help [mailto:[hidden email]] On Behalf Of Yectli Huerta via R-help
Sent: Monday, November 12, 2018 6:25 PM
To: [hidden email]
Subject: Re: [R] semiparametric manova

thanks for the replies.

i don't believe the data is the problem. here you see how i used 3 variables and it fails,
but when i use any combination of 2 variables, it does work

> head(df)
   V1 V2 V3 V4 V5           V6           V7
1 200 16 16  3 64 5.584092e+13 1.616745e+12
2 200 16 16  3 64 5.589262e+13 1.715906e+12
3 200 16 16  3 64 5.588578e+13 1.714084e+12
4 200 16 16  3 64 5.588061e+13 1.651920e+12
5 200 16 16  3 64 5.589810e+13 1.624824e+12
6 200  8 16  1 48 5.585124e+13 1.689478e+12
> library(MANOVA.RM)
> df$V1
[1] 200 200 200 200 200 200 200 200 200 200 200 200 200 200 200 500 500 500 500
[20] 500 500 500 500 500 500 350 350 350 350 350 200 200 200 200 200 200 200 200
[39] 200 200 200 200 200 200 200 500 500 500 500 500 350 350 350 350 350 350 350
[58] 350 350 350 350 350 350 350 350 350 350 350 350 350 500 500 500 500 500 500
[77] 500 500 500 500 350 350 350 350 350 500 500 500 500 500
> df$V2
[1] 16 16 16 16 16  8  8  8  8  8  8  8  8  8  8 16 16 16 16 16  8  8  8  8  8
[26]  8  8  8  8  8 24 24 24 24 24 24 24 24 24 24 16 16 16 16 16  8  8  8  8  8
[51] 16 16 16 16 16  8  8  8  8  8 16 16 16 16 16 24 24 24 24 24 24 24 24 24 24
[76] 16 16 16 16 16 24 24 24 24 24 24 24 24 24 24
> df$V3
[1] 16 16 16 16 16 16 16 16 16 16  9  9  9  9  9  9  9  9  9  9 23 23 23 23 23
[26]  9  9  9  9  9  9  9  9  9  9 23 23 23 23 23 23 23 23 23 23 16 16 16 16 16
[51]  9  9  9  9  9 23 23 23 23 23 16 16 16 16 16 23 23 23 23 23 16 16 16 16 16
[76] 23 23 23 23 23 16 16 16 16 16  9  9  9  9  9
>
> MANOVA.wide(cbind(V6,V7)~V1*V2*V3,data=df,seed=1234)
Error in MANOVA.wide(cbind(V6, V7) ~ V1 * V2 * V3, data = df, seed = 1234) :
  There is at least one factor-level combination
           with less than 2 observations!

> MANOVA.wide(cbind(V6,V7)~V1*V2,data=df,seed=1234)
Call:
cbind(V6, V7) ~ V1 * V2

Wald-Type Statistic (WTS):
      Test statistic df p-value
V1            17.870  4   0.001
V2            20.392  4   0.000
V1:V2         24.127  8   0.002

....

> MANOVA.wide(cbind(V6,V7)~V1*V3,data=df,seed=1234)
Call:
cbind(V6, V7) ~ V1 * V3

Wald-Type Statistic (WTS):
      Test statistic df p-value
V1            18.566  4   0.001
V3            19.894  4   0.001
V1:V3         27.330  8   0.001

...
> MANOVA.wide(cbind(V6,V7)~V2*V3,data=df,seed=1234)
Call:
cbind(V6, V7) ~ V2 * V3

Wald-Type Statistic (WTS):
      Test statistic df p-value
V2            20.139  4   0.000
V3            19.947  4   0.001
V2:V3         32.088  8   0.000

....
______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: semiparametric manova

R help mailing list-2



> > xtabs(~V1+V2+V3, df) # There are 9 cells with 0 entries. That is the problem.
>

> , , V3 = 9
>

> V2
> V1 8 16 24
> 200 5 0 5
> 350 5 5 0
> 500 0 5 5


thanks for the insight

yah
______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

signature.asc (523 bytes) Download Attachment