This is an analysis report, providing the data and statistical analyses for an experiment by Martijn Bart and others on spiculous skeleton formation in the freshwater sponge E.fluviatilis under hypergravity conditions. A paper describing this experiment has been submitted to PeerJ in August 2018. The idea of the experiment was to investigate to what degree large g-forces prevent sponges to grow (i.e. expand their surface area and form oscula) and take up dissolved food (i.e. amino acids); and whether g-forces affect skeleton and osculum formation in interaction with additional feeding.
With this report it should be possible to get a basic understanding of the data that were collected in the experiment and follow the statistical analyses, but it is not meant to be studied independently from the paper. The paper provides contextual information as well as relevant details about sponge biology, accurate definitions of the various terms, and details of how the observations were exactly obtained.
This section provides the data (there are two data tables: spongeCN and spongeSO) and provides the option do download and save the data locally. In addition, some functions are specified which are used later in the analysis.
This data table comprises 277 rows (uniquely identified by the combined labels in plate and position), each representing a small sponge in an early stage of development that was subjected to a combination of the two experimental treatments:
For each sponge the surface area before and after being subjected to the gravitational condition was being recorded (surf_before and surf_after, in \(mm^2\)). Also the development stage that the sponge reached was recorded (stage3 or stage4; as a binary variable, stage 4 can only be reached after state3 has been reached). Reaching stage 4 means that the sponge has formed a so-called osculum.
The surface change for each sponge is calculated by surf_after - surf_before (surface). And the relative surface change is calculated by (surf_after - surf_before)/surf_before (perc).
Ten composite samples were made from individual sponges that were subjected to each unique combination of gravitational condition (G and Gc; levels 1, 2.5, 5, 10 and 20g), and reaching stage4 (stage4, 1 or 0). For each of these samples the 13C:12C and 15N:14N ratios were determined (C and N).
Function to claculate Nagelkerke’s R-squared (an R-squared value which is being used for logistic regression models). The function is used in Analysis 3.
R2NK <- function(rr)
{
n <- nrow(rr$model)
R2 <- (1 - exp((rr$dev - rr$null)/n))/(1 - exp(-rr$null/n))
RVAL <- list(N = n, R2 = R2)
return(RVAL)
}
Function to create a scatter plot of two series, with circles as symbols and simple lines as error-bars. It includes a legend & axis break. The function has the option to save the output to png, pdf or svg as well. It uses the axis.break function from the plotrix package.
mk_fig4 <- function(out='screen',S=spongeSO){
# calculate means and standard errors per g-force level
fed <- S$label=='L'
m_fed <- aggregate(S$perc[fed]~S$G[fed],FUN=mean)
s_fed <- aggregate(S$perc[fed]~S$G[fed],FUN=sd)
se_fed <- aggregate(S$perc[fed]~S$G[fed],
FUN=function(x) sd(x)/sqrt(length(x)) )
ms_fed <- data.frame(g=m_fed[,1], mean=m_fed[,2], se=se_fed[,2])
m_nonfed <- aggregate(S$perc[!fed]~S$G[!fed],FUN=mean)
s_nonfed <- aggregate(S$perc[!fed]~S$G[!fed],FUN=sd)
se_nonfed <- aggregate(S$perc[!fed]~S$G[!fed],
FUN=function(x) sd(x)/sqrt(length(x)) )
ms_nonfed <- data.frame(g=m_nonfed[,1], mean=m_nonfed[,2],
se=se_nonfed[,2])
xf <- c(1:5)-0.1
xn <- c(1:5)+0.1
xfl <- c( rbind(xf,xf,rep(NA,5)) )
yfl <- c( rbind( ms_fed$mean+ms_fed$se, ms_fed$mean-ms_fed$se, rep(NA,5)) )
xnfl <- c( rbind(xn,xn,rep(NA,5)) )
ynfl <- c( rbind( ms_nonfed$mean+ms_nonfed$se, ms_nonfed$mean-ms_nonfed$se, rep(NA,5)) )
if(out=='png'){ png('fig4.png') }
if(out=='pdf'){ pdf('fig4.pdf') }
if(out=='svg'){ svg('fig4.svg') }
op <- par(no.readonly = TRUE) # the whole list of settable pars
par(mar=c(3,6,1,1))
plot(xf, ms_fed$mean, type='n', bty='n', las=1,
yaxt="n",xaxt="n",
xlim = c(0, 6), ylim = c(140, 256), xaxs="i",
ylab = '',
xlab = '',
cex.lab=1.4, cex.axis=1.4)
lines(xfl, yfl, col = "black")
lines(xnfl, ynfl, col = "black")
points(xf, ms_fed$mean, col = "black", pch = 21, bg = "grey", cex = 2)
points(xn, ms_nonfed$mean, col = "black", pch = 21, bg = "black", cex = 2)
# mtext( paste( unique(S$GF2),'g'), at=1:5, side=1, line=0.5, cex=1.2)
# mtext( expression('surface increase ' (mm^2)), at=0.5, side=3, line=-2, cex=1.3)
# axis(1, at = 0:5, labels = c('', paste( unique(S$GF2),'g')), cex.lab=1.4, cex.axis=1.4, pos=0)
yticklbl <- seq(from=140,to=260,by=20)
axis(1, at = 0:5, labels = c('', unique(S$G)), cex.lab=1.4, cex.axis=1.4, pos=140)
axis(2, at = yticklbl, labels = c(0,yticklbl[-1]), cex.lab=1.4, cex.axis=1.4, las=1)
plotrix::axis.break(2,145,style="slash")
title(xlab = expression(italic(g)*'-force'), cex.lab = 1.4, line = 1.8)
title(ylab = 'percentage surface increase (%)', cex.lab=1.4,line = 3.6)
# the legend
{
llx = 1.5 # lower-left corner of legend x-coordinate
lly = 160 # lower-left corner of legend y-coordinate
dty = 0.5 # correction for text height, relative to symbol
points(llx, lly+5, pch = 21, col="black", bg="grey",cex = 2)
text(llx+0.3, lly+5 + dty, "fed", cex = 1.3, font = 1, adj = 0 )
points(llx, lly, pch = 21, col="black", bg="black", cex = 2)
text(llx+0.3, lly+dty, "non-fed", cex = 1.3, font = 1, adj = 0 )
}
par( op )
if(out!='screen'){ dev.off() }
}
Function to create a scatter plot of two series, with circles as symbols and simple lines as error-bars It includes horizontal lines for averages and a complex y-label.
mk_fig5 <- function(out='screen', S=spongeCN){
# N and C values are now uptake over 2 days,
# to express in values per day they are divided by 2
S$C <- S$C/2
S$N <- S$N/2
m_C <- aggregate(S$C~S$G,FUN=mean)
s_C <- aggregate(S$C~S$G,FUN=sd)
se_C <- aggregate(S$C~S$G,FUN=function(x) sd(x)/sqrt(length(x)) )
mC <- data.frame(g=m_C[,1], mean=m_C[,2], se=se_C[,2])
m_N <- aggregate(S$N~S$G,FUN=mean)
s_N <- aggregate(S$N~S$G,FUN=sd)
se_N <- aggregate(S$N~S$G,FUN=function(x) sd(x)/sqrt(length(x)) )
mN <- data.frame(g=m_N[,1], mean=m_N[,2], se=se_N[,2])
# define vectors for location on x-axis and vertical
# (standard error) lines
xf <- c(1:5)
xn <- c(1:5)
xfl <- c( rbind(xf,xf,rep(NA,5)) )
yfl <- c( rbind( mC$mean+mC$se, mC$mean-mC$se, rep(NA,5)) )
xnfl <- c( rbind(xn,xn,rep(NA,5)) )
ynfl <- c( rbind( mN$mean+mN$se, mN$mean-mN$se, rep(NA,5)) )
Cavg <- mean(mC$mean)
Navg <- mean(mN$mean)
label_yaxis1 <- 'Amino acid assimilation'
label_yaxis2 <- expression('('*μmol~C~or~N[~tracer]~mmol~C~or~N[~sponge]^{-1}~d^{−1}*')')
label_yaxis3 <- expression('('*μmol~C~or~N[~tracer]~(mmol~C~or~N[~sponge]~d)^{−1}*')')
if(out=='png'){ png('fig5.png') }
if(out=='pdf'){ pdf('fig5.pdf') }
# svg doesn't work with expression
# if(out=='svg'){ svg('fig5.svg') }
op <- par(no.readonly = TRUE)
par(mar=c(4,7,0.5,0.5))
plot(xf, mC$mean, type='n', xaxt="n", bty='n', las=1,
xlim = c(0, 6), ylim = c(0, 3), xlab = "", xaxs="i",
ylab = '', cex.lab=1.2, cex.axis=1.4)
lines(c(-0.1,5.2),c(Cavg,Cavg),col='grey',lty=2,lwd=2)
lines(c(-0.1,5.2),c(Navg,Navg),col='grey',lty=2,lwd=2)
lines(xfl, yfl, col = "black")
lines(xnfl, ynfl, col = "black")
points(xf, mC$mean, col = "black", pch = 21, bg = "grey", cex = 2)
points(xn, mN$mean, col = "black", pch = 21, bg = "black", cex = 2)
# mtext( paste(S$G, 'g'), at=1:5, side=1, line=0.3, cex=1.2)
# mtext( 'uptake (umol/day)', at = 0, side=3, line=0, cex=1.3)
# axis(1, at = 0:5, labels = c('', paste( unique(S$G),'g')), cex.lab=1.4, cex.axis=1.4, pos=0)
axis(1, at = 0:5, labels = c('', unique(S$G)), cex.lab=1.4, cex.axis=1.4, pos=0)
title(ylab = label_yaxis1, cex.lab = 1.4, line = 5.7)
title(ylab = label_yaxis2, cex.lab = 1.4, line = 3.3)
# alternative 2nd line in y-axis label
# title(ylab = label_yaxis3, cex.lab = 1.4, line = 3.3)
title(xlab = expression(italic(g)*'-force'), cex.lab = 1.4, line = 1.8)
text(5.5, Cavg, "C", cex = 1.5, font = 1, adj = 0, col="darkgrey")
text(5.5, Navg, "N", cex = 1.5, font = 1, adj = 0)
par( op )
if(out!='screen'){ dev.off() }
}
In this section, the influence of hypergravity conditions and feeding on surface area increase of growing sponges is investigated. First exploratory graphs are made and therafter the relations are tested with a linear model. Finally, a graph is made to communicate the relations well.
The boxplots below give an overall impression of the effects on the surface area of sponges under influcence of g-force and being ‘fed’ versus ‘non-fed’.
par(oma = c(2, 3, 2, 0), # two rows of text at the outer left and bottom margin
mar = c(1, 3, 1, 1), # space for one row of text at ticks
mgp = c(2, 1, 0), # axis label at 2 rows distance, tick labels at 1 row
xpd = NA) # allow content to protrude into outer margin (and beyond)
boxplot(surface~as.factor(G), data=spongeSO, subset = (label == 'N'),
boxwex = 0.2, at = 1:5 - 0.15, xlim=c(0.5,5.5), ylim=c(0,1.5),
frame=FALSE,pty="m",xaxt="n",
col = "darkgrey", main='')
boxplot(surface~as.factor(G), data=spongeSO, subset = (label == 'L'), add=TRUE,
boxwex = 0.2, at = 1:5 + 0.15, xlim=c(0.5,5.5), ylim=c(0,1.5),
frame=FALSE,pty="m",xaxt="n",yaxt='n',
col = "white", main='')
mtext( unique(spongeSO$G),at=1:5,side=1,line=0.5)
mtext( 'g-force',at=3,side=1,line=1.5)
legend(4.5,1.5, c('non-fed','fed'), fill=c("grey","white"),bty = "n")
mtext('surface (mm)',at=0.75,side=2,line=2.5)
Surface and g-force are negatively related. By treating g-force (appropriately) as a numerical variable, it becomes apparent that this relation is quite linear.
plot(surface~jitter(G), data=spongeSO, subset = (label == 'N'),
xlim=c(-2,22),ylim=c(0,1.6),bty='n',col='blue',xlab='',ylab='')
par(new=TRUE)
plot(surface~jitter(G), data=spongeSO, subset = (label == 'L'),pch=3,
xlim=c(-2,22),ylim=c(0,1.6),bty='n',col='red',
xlab='g-force',ylab='Surface area increase (sq.mm)')
legend(15,1.4, c('non-fed','fed'), pch=c(1,3),col=c('blue','red'),bty = "n")
The relation between surface, g-force and being fed or not fed), can be tested formally via multiple linear regression. This is done below.
summary( mB1 <- lm(surface~G,data=spongeSO) )
##
## Call:
## lm(formula = surface ~ G, data = spongeSO)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.47173 -0.16986 -0.03613 0.16515 1.03387
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.573593 0.025913 22.135 < 2e-16 ***
## G -0.008746 0.002487 -3.517 0.000527 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.2574 on 225 degrees of freedom
## Multiple R-squared: 0.05212, Adjusted R-squared: 0.04791
## F-statistic: 12.37 on 1 and 225 DF, p-value: 0.000527
summary( mB2 <- lm(surface~G+label,data=spongeSO) )
##
## Call:
## lm(formula = surface ~ G + label, data = spongeSO)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.47805 -0.17180 -0.02796 0.17320 1.01875
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.590315 0.031089 18.988 < 2e-16 ***
## G -0.008906 0.002492 -3.573 0.000431 ***
## labelN -0.033448 0.034347 -0.974 0.331200
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.2575 on 224 degrees of freedom
## Multiple R-squared: 0.05612, Adjusted R-squared: 0.04769
## F-statistic: 6.659 on 2 and 224 DF, p-value: 0.001552
summary( mB3 <- lm(surface~G*label,data=spongeSO) )
##
## Call:
## lm(formula = surface ~ G * label, data = spongeSO)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.46957 -0.16523 -0.02957 0.16138 1.01415
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.568578 0.036408 15.617 <2e-16 ***
## G -0.006273 0.003390 -1.850 0.0656 .
## labelN 0.010982 0.051803 0.212 0.8323
## G:labelN -0.005722 0.004997 -1.145 0.2534
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.2573 on 223 degrees of freedom
## Multiple R-squared: 0.06164, Adjusted R-squared: 0.04901
## F-statistic: 4.883 on 3 and 223 DF, p-value: 0.002623
mk_fig4()
The figure depicts surface area increase (expressed as % of initial size) of fed and non-fed sponges under the different hypergravity forces. The circles give averages and the error bars represent standard errors of the mean.
Relative surface increase is influenced linearly by g-force and not by sponges being fed or non-fed (model mB1). This model explains however only 5% of the variance.
In this section, the influence of hypergravity conditions and reaching stage4 (osculum formation) on the incorporation of isotopically-enriched (13C and 15N) amino acids is investigated for developing E. fluviatilis. The relation is tested with simple linear models and visualised.
summary( CG <- lm(C~Gc,data=spongeCN) )
##
## Call:
## lm(formula = C ~ Gc, data = spongeCN)
##
## Residuals:
## 1 2 3 4 5 6 7 8 9
## 0.0805 -0.0670 0.0505 -0.0915 -0.0070 -0.0805 0.0670 -0.0505 0.0915
## 10
## 0.0070
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.75350 0.06624 11.375 9.19e-05 ***
## Gc1G 0.16400 0.09368 1.751 0.140
## Gc2.5G -0.03850 0.09368 -0.411 0.698
## Gc20G -0.03550 0.09368 -0.379 0.720
## Gc5G 0.17100 0.09368 1.825 0.128
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.09368 on 5 degrees of freedom
## Multiple R-squared: 0.6735, Adjusted R-squared: 0.4123
## F-statistic: 2.578 on 4 and 5 DF, p-value: 0.1635
summary( CO <- lm(C~stage4,data=spongeCN) )
##
## Call:
## lm(formula = C ~ stage4, data = spongeCN)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.15080 -0.08775 -0.00310 0.05415 0.19920
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.81260 0.05786 14.044 6.41e-07 ***
## stage4 -0.01380 0.08183 -0.169 0.87
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1294 on 8 degrees of freedom
## Multiple R-squared: 0.003543, Adjusted R-squared: -0.121
## F-statistic: 0.02844 on 1 and 8 DF, p-value: 0.8703
summary( CGO <- lm(C~Gc+stage4,data=spongeCN) )
##
## Call:
## lm(formula = C ~ Gc + stage4, data = spongeCN)
##
## Residuals:
## 1 2 3 4 5 6 7 8 9
## 0.0874 -0.0601 0.0574 -0.0846 -0.0001 -0.0874 0.0601 -0.0574 0.0846
## 10
## 0.0001
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.76040 0.08069 9.424 0.000707 ***
## Gc1G 0.16400 0.10417 1.574 0.190522
## Gc2.5G -0.03850 0.10417 -0.370 0.730424
## Gc20G -0.03550 0.10417 -0.341 0.750409
## Gc5G 0.17100 0.10417 1.642 0.176027
## stage4 -0.01380 0.06588 -0.209 0.844322
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1042 on 4 degrees of freedom
## Multiple R-squared: 0.677, Adjusted R-squared: 0.2733
## F-statistic: 1.677 on 5 and 4 DF, p-value: 0.3183
summary( NG <- lm(N~Gc,data=spongeCN) )
##
## Call:
## lm(formula = N ~ Gc, data = spongeCN)
##
## Residuals:
## 1 2 3 4 5 6 7 8 9
## 0.2250 -0.4435 0.1925 -0.5640 -0.0295 -0.2250 0.4435 -0.1925 0.5640
## 10
## 0.0295
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 3.8560 0.3474 11.100 0.000103 ***
## Gc1G 0.8520 0.4913 1.734 0.143391
## Gc2.5G 0.7145 0.4913 1.454 0.205579
## Gc20G -0.9135 0.4913 -1.860 0.122048
## Gc5G 1.8035 0.4913 3.671 0.014426 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.4913 on 5 degrees of freedom
## Multiple R-squared: 0.8722, Adjusted R-squared: 0.7699
## F-statistic: 8.529 on 4 and 5 DF, p-value: 0.01858
summary( NO <- lm(N~stage4,data=spongeCN) )
##
## Call:
## lm(formula = N ~ stage4, data = spongeCN)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.4992 -0.7227 -0.0197 0.6679 1.6286
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 4.4712 0.4818 9.280 1.48e-05 ***
## stage4 -0.2478 0.6814 -0.364 0.726
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.077 on 8 degrees of freedom
## Multiple R-squared: 0.01626, Adjusted R-squared: -0.1067
## F-statistic: 0.1322 on 1 and 8 DF, p-value: 0.7255
summary( NGO <- lm(N~Gc+stage4,data=spongeCN) )
##
## Call:
## lm(formula = N ~ Gc + stage4, data = spongeCN)
##
## Residuals:
## 1 2 3 4 5 6 7 8 9
## 0.3489 -0.3196 0.3164 -0.4401 0.0944 -0.3489 0.3196 -0.3164 0.4401
## 10
## -0.0944
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 3.9799 0.3975 10.013 0.000559 ***
## Gc1G 0.8520 0.5131 1.660 0.172165
## Gc2.5G 0.7145 0.5131 1.392 0.236196
## Gc20G -0.9135 0.5131 -1.780 0.149634
## Gc5G 1.8035 0.5131 3.515 0.024566 *
## stage4 -0.2478 0.3245 -0.764 0.487672
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.5131 on 4 degrees of freedom
## Multiple R-squared: 0.8884, Adjusted R-squared: 0.749
## F-statistic: 6.371 on 5 and 4 DF, p-value: 0.04851
Given that the model NG
shows a significianct effect we also conduct a post-hoc tests to see which pairs of means are different.
TukeyHSD(aov(NG))
## Tukey multiple comparisons of means
## 95% family-wise confidence level
##
## Fit: aov(formula = NG)
##
## $Gc
## diff lwr upr p adj
## 1G-10G 0.8520 -1.1186899 2.8226899 0.4905033
## 2.5G-10G 0.7145 -1.2561899 2.6851899 0.6254253
## 20G-10G -0.9135 -2.8841899 1.0571899 0.4359193
## 5G-10G 1.8035 -0.1671899 3.7741899 0.0691279
## 2.5G-1G -0.1375 -2.1081899 1.8331899 0.9981758
## 20G-1G -1.7655 -3.7361899 0.2051899 0.0745383
## 5G-1G 0.9515 -1.0191899 2.9221899 0.4044106
## 20G-2.5G -1.6280 -3.5986899 0.3426899 0.0983928
## 5G-2.5G 1.0890 -0.8816899 3.0596899 0.3052989
## 5G-20G 2.7170 0.7463101 4.6876899 0.0137480
mk_fig5()
The graph shows the influence of hypergravity conditions on the incorporation of isotopically-enriched (13C and 15N) amino acids in developing E. fluviatilis.
The dotted line represents the average uptake across all g-force levels, the error bars represent standard errors of the mean. Especially the N uptake at 5 g and 20 g deviate from the average (in opposing directions).
There seem to be only very marginal effects on C and N uptake in the sponge tissue due to g-force and osculum formation. Osculum formation has no inflence on uptake of C nor N. Hypergravity has a differential effect on C and N: for C uptake there is no effect, but for N uptake there might be an effect (under 5 g the uptake is high while under 20 g it appears to be low). However the underlying explanation for this pattern is lacking.
summary( mB1 <- glm(stage4~G,data=spongeSO,family=binomial) )
##
## Call:
## glm(formula = stage4 ~ G, family = binomial, data = spongeSO)
##
## Deviance Residuals:
## Min 1Q Median 3Q Max
## -1.1822 -1.0704 -0.7056 1.2156 1.7393
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 0.07843 0.20574 0.381 0.7030
## G -0.06711 0.02182 -3.076 0.0021 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 304.89 on 226 degrees of freedom
## Residual deviance: 294.56 on 225 degrees of freedom
## AIC: 298.56
##
## Number of Fisher Scoring iterations: 4
summary( mB2 <- glm(stage4~label,data=spongeSO,family=binomial) )
##
## Call:
## glm(formula = stage4 ~ label, family = binomial, data = spongeSO)
##
## Deviance Residuals:
## Min 1Q Median 3Q Max
## -1.2848 -0.7657 -0.7657 1.0737 1.6553
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -1.0769 0.2080 -5.178 2.24e-07 ***
## labelN 1.3258 0.2862 4.632 3.63e-06 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 304.89 on 226 degrees of freedom
## Residual deviance: 282.24 on 225 degrees of freedom
## AIC: 286.24
##
## Number of Fisher Scoring iterations: 4
summary( mB3 <- glm(stage4~G+label,data=spongeSO,family=binomial) )
##
## Call:
## glm(formula = stage4 ~ G + label, family = binomial, data = spongeSO)
##
## Deviance Residuals:
## Min 1Q Median 3Q Max
## -1.4744 -0.8808 -0.5261 0.9445 1.7306
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -0.58087 0.26023 -2.232 0.02561 *
## G -0.06634 0.02263 -2.931 0.00338 **
## labelN 1.32267 0.29255 4.521 6.15e-06 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 304.89 on 226 degrees of freedom
## Residual deviance: 272.99 on 224 degrees of freedom
## AIC: 278.99
##
## Number of Fisher Scoring iterations: 4
summary( mB4 <- glm(stage4~label*G,data=spongeSO,family=binomial) )
##
## Call:
## glm(formula = stage4 ~ label * G, family = binomial, data = spongeSO)
##
## Deviance Residuals:
## Min 1Q Median 3Q Max
## -1.3474 -1.0899 -0.1072 1.0877 2.2010
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 0.49740 0.36872 1.349 0.177342
## labelN -0.33056 0.46799 -0.706 0.479977
## G -0.28268 0.07308 -3.868 0.000110 ***
## labelN:G 0.29390 0.07860 3.739 0.000185 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 304.89 on 226 degrees of freedom
## Residual deviance: 250.68 on 223 degrees of freedom
## AIC: 258.68
##
## Number of Fisher Scoring iterations: 6
We test whether the model with interaction (mB4) is indeed better than model without (mB1) it appears to be so, with p=0.001
lmtest::lrtest(mB1,mB4)
## Likelihood ratio test
##
## Model 1: stage4 ~ G
## Model 2: stage4 ~ label * G
## #Df LogLik Df Chisq Pr(>Chisq)
## 1 2 -147.28
## 2 4 -125.34 2 43.884 2.956e-10 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
And calculate Nagelkerke’s R2 as a metric expressing effect-size by the best model.
R2NK(mB4)
## $N
## [1] 227
##
## $R2
## [1] 0.287476
The formation of Oscula is influenced by by sponges being fed or non-fed in interaction with g-force.