Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
reservebenefit
worldmap_fish_genetic_diversity
Commits
5fdd0512
Commit
5fdd0512
authored
Oct 14, 2019
by
peguerin
Browse files
add modified ttest marine vs freshwater
parent
12c33954
Changes
1
Hide whitespace changes
Inline
Side-by-side
00-scripts/step5/analysis/
wilcoxon_
tests.R
→
00-scripts/step5/analysis/tests.R
View file @
5fdd0512
...
...
@@ -9,6 +9,7 @@
## Submited to Nature communications, 2019
##
## wilcoxon test
## spatial association test FRESHWATER/MARINE
## determination mediane
##
##########################################################################
...
...
@@ -71,4 +72,24 @@ hist(dcM.1$GD_mean)
## test de Wilcoxon Genetic diversity
wilcox.test
(
dcM.1
$
GD_mean
,
dcF.1
$
GD_mean
)
# W =69070, p-value = 1.101e-09
## Wilcoxon Specific richness # W = 79143, p-value = 0.7306
wilcox.test
(
Mr
$
richness
,
Fr
$
richness
)
\ No newline at end of file
wilcox.test
(
Mr
$
richness
,
Fr
$
richness
)
##########################################################################
##### Modified t-test of spatial association test
###### between GDmean and species richness marine
coordsM
=
cbind
(
Mr
$
x
,
Mr
$
y
)
zM
<-
cor.spatial
(
Mr
$
GD_mean
,
Mr
$
richness
,
coordsM
)
modified.ttest
(
Mr
$
GD_mean
,
Mr
$
richness
,
coordsM
,
nclass
=
13
)
###### between GDmean and species richness freshwater
coordsF
=
cbind
(
Fr
$
x
,
Fr
$
y
)
modified.ttest
(
Fr
$
GD_mean
,
Fr
$
richness
,
coordsF
,
nclass
=
13
)
###### between freshwater and marine genetic diversity
coordsM
=
cbind
(
Mr
$
x
,
Mr
$
y
)
coordsF
=
cbind
(
Fr
$
x
,
Fr
$
y
)
coordsT
=
rbind
(
coordsM
,
coordsF
)
GD_meanT
=
data.frame
(
marine
=
Mr
$
GD_mean
,
freshwater
=
Fr
$
GD_mean
)
modified.ttest
(
GD_meanT
$
marine
,
GDmeanT
$
freshwater
,
coordsT
,
nclass
=
13
)
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment