[R] ggplot and boxplots

2018-03-12 Thread Yectli Huerta via R-help
Hi,

I was wondering if someone could give me a hint or two. I'm having problems 
generating ggplot2 boxplots . The plot that is has dots but no boxplots. Below 
is the dataset

> testing_ggplot
V1V2 V3
1  256  Disabled 688.61
2  256  Disabled 698.63
3  256  Disabled 700.02
4  256  Disabled 693.36
5  256  Disabled  688.8
6  256  Disabled 697.72
7  256  Disabled 698.15
8  256  Disabled 693.98
9  256  Disabled 700.75
...
16 256   Enabled 698.35
17 256   Enabled 694.71
18 256   Enabled 705.53
19 256   Enabled 708.61
20 256   Enabled 693.33
...
32 272  Disabled 690.79

33 272  Disabled 687.14
34 272  Disabled 684.92
35 272  Disabled 687.87
36 272  Disabled 687.33
37 272   Enabled 696.22
38 272   Enabled 700.61
39 272   Enabled  695.2
40 272   Enabled 697.46
41 272   Enabled 696.83
...

This command for some reason, fails to generate a boxplot
> ggplot(testing_ggplot,aes(factor(V2),V3))+geom_boxplot() 
> +facet_wrap(~as.factor(V1))

I don't seem to figure out what is wrong with the ggplot command I'm using. I 
attached a png with the generated plot

thanks,

yh__
R-help@r-project.org 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.


Re: [R] ggplot and boxplots

2018-03-13 Thread Yectli Huerta via R-help

On March 12, 2018 11:59 PM, Richard M. Heiberger  wrote:

> It looks like your V3 is a factor.
> 
> testing_ggplot <- data.frame(
> 
> V1=factor(c(256, 256, 256, 272, 272, 272)),
> 
> V2=c("Disabled", "Disabled", "Enabled", "Disabled", "Enabled", "Enabled"),
> 
> V3=681:686)
> 

thanks for the explanation and solution. 

yah

__
R-help@r-project.org 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.


Re: [R] semiparametric manova

2018-11-12 Thread Yectli Huerta via R-help
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



signature.asc
Description: OpenPGP digital signature
__
R-help@r-project.org 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.


Re: [R] semiparametric manova

2018-11-13 Thread Yectli Huerta via R-help



> > 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

signature.asc
Description: OpenPGP digital signature
__
R-help@r-project.org 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.


[R] semiparametric manova

2018-11-12 Thread Yectli Huerta via R-help
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

signature.asc
Description: OpenPGP digital signature
__
R-help@r-project.org 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.