# [R] Manova: Data similarly generated are significantly different.

Roger Xu rxu823 at gmail.com
Fri Sep 4 23:18:22 CEST 2015

```Dear R users,

Hi. I don't know if my understanding of Manova test is correct. So I test
with the following code and got strange results.

Any help would be appreciated.

y0, y1, and y2 are independently generated by the same method.

They are each split into 20 groups by the same method.
The summary of the Manova test (stored in variable s) says:

The Pr (>F) value is less than 2.2e-16.

y0 <- runif(100, 0, 1)
y1 <- runif(100, 0, 1)
y2 <- runif(100, 0, 1)

y0 <- c(y0, runif(100, 0, 10) )
y1 <- c(y1, runif(100, 0, 10) )
y2 <- c(y2, runif(100, 0, 10) )

y0=as.numeric(unlist(y0))
y1=as.numeric(unlist(y1))
y2=as.numeric(unlist(y2))

b=10
a=length(y0)/b
g=rep(1:a,rep(b,a))

m1 <- manova(cbind(y0, y1, y2) ~ g)
s=summary(m1, test = "Wilks")

a = s\$stats
a = a
s
a

The summary is here:

Df   Wilks approx F num Df den Df    Pr(>F)
g           1 0.37069   110.91      3    196 < 2.2e-16 ***
Residuals 198
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

[[alternative HTML version deleted]]

```
{"ft_lang_label":"__label__en","ft_lang_prob":0.6884573,"math_prob":0.9832298,"size":1147,"snap":"2022-05-2022-21","text_gpt3_token_len":449,"char_repetition_ratio":0.11373578,"word_repetition_ratio":0.0,"special_character_ratio":0.42371404,"punctuation_ratio":0.18374558,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.99827605,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2022-05-26T14:19:05Z\",\"WARC-Record-ID\":\"<urn:uuid:bb71bc49-5440-44ca-8257-2e68a2cb3aa7>\",\"Content-Length\":\"4193\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:93c31385-5d4a-4d02-8f60-4cf8800b66e0>\",\"WARC-Concurrent-To\":\"<urn:uuid:5199cba9-6f39-4f53-ac4d-8566bbf016c1>\",\"WARC-IP-Address\":\"129.132.119.195\",\"WARC-Target-URI\":\"https://www.stat.math.ethz.ch/pipermail/r-help/2015-September/431868.html\",\"WARC-Payload-Digest\":\"sha1:VZI3C3OYNS62I75K6U6XUDZTA3ECSO7G\",\"WARC-Block-Digest\":\"sha1:ORVBKGURL66FSM6L5NXMIOUCX7ULOEYI\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2022/CC-MAIN-2022-21/CC-MAIN-2022-21_segments_1652662606992.69_warc_CC-MAIN-20220526131456-20220526161456-00503.warc.gz\"}"}