diff --git a/inst/shiny-squid/source/pages/modules/module6/UIMod6Step1.R b/inst/shiny-squid/source/pages/modules/module6/UIMod6Step1.R
index eccd5c0..d2380fc 100644
--- a/inst/shiny-squid/source/pages/modules/module6/UIMod6Step1.R
+++ b/inst/shiny-squid/source/pages/modules/module6/UIMod6Step1.R
@@ -54,7 +54,7 @@ span(
#Individual-specific response to an environmental effect (random slopes) variance (VS)
fluidRow(
- column(8,getSliderInput("Mod6Step1_Vs", Modules_VAR$Vs)),
+ column(8,getSliderInput("Mod6Step1_Vs", Modules_VAR$Vsx)),
column(4,textOutput("Mod6Step1_Vs_proportion", inline = TRUE))
),
diff --git a/inst/shiny-squid/source/pages/modules/module6/UIMod6Step2.R b/inst/shiny-squid/source/pages/modules/module6/UIMod6Step2.R
index b1d934d..5571dde 100644
--- a/inst/shiny-squid/source/pages/modules/module6/UIMod6Step2.R
+++ b/inst/shiny-squid/source/pages/modules/module6/UIMod6Step2.R
@@ -63,7 +63,7 @@ span(
#Individual-specific response to an environmental effect (random slopes) variance (Vs)
fluidRow(
- column(8,getSliderInput("Mod6Step2_Vs", Modules_VAR$Vs)),
+ column(8,getSliderInput("Mod6Step2_Vs", Modules_VAR$Vsx)),
column(4,textOutput("Mod6Step2_Vs_proportion", inline = TRUE))
),
@@ -86,6 +86,7 @@ span(
# Table : display true and measured values (Vp, Vi and mean)
uiOutput("Mod6Step2_summary_table"),
+ div(info_msg(Mod6Step2_txt$note1)), # Text: note 1
(HTML(Mod6Step2_txt$para5)), # Text: paragraph 5
@@ -103,7 +104,7 @@ span(
p("where"),
p(paste0("$$COV_{",NOT$devI,",",NOT$devS,NOT$env,"}=
E(",NOT$env,")Cov(",NOT$devI,",",NOT$devS,")$$")),
- div(info_msg(Mod6Step2_txt$note)), # Text: note
+ div(info_msg(Mod6Step2_txt$note2)), # Text: note 2
p(HTML(Mod6Step2_txt$para7)), # Text: paragraph 7
diff --git a/inst/shiny-squid/source/server/modules/module6/SVRMod6Step1.R b/inst/shiny-squid/source/server/modules/module6/SVRMod6Step1.R
index 572fded..31e79c1 100644
--- a/inst/shiny-squid/source/server/modules/module6/SVRMod6Step1.R
+++ b/inst/shiny-squid/source/server/modules/module6/SVRMod6Step1.R
@@ -67,15 +67,15 @@ c(
paste("Mean of the trait ($",EQ3$mean0,"$) =",round(input$Mod6Step1_B[1],2)),
paste("Population-specific slope of the environmental effect ($",NOT$mean,"$) =",round(input$Mod6Step1_B[2],2)),
"$\\text{Random effects}$",
- paste("Individual variance ($V_",NOT$devI,"$) =",input$Mod6Step1_Vi),
- paste("Individual-specific response to an environmental effect (random slopes) variance ($V_{",NOT$devS,NOT$env,"}$) =",input$Mod6Step1_Vs),
+ paste("Among-individual variance in intercept ($V_",NOT$devI,"$) =",input$Mod6Step1_Vi),
+ paste("Variance due to individual-specific responses to an environmental factor (random slopes; $V_{",NOT$devS,NOT$env,"}$) =",input$Mod6Step1_Vs),
paste("Residual variance ($V_",NOT$residualUpper,"$) =",input$Mod6Step1_Ve)),
"Estimated" = c("$\\text{Fixed effects}$",
paste("Sampled mean of the trait ($",NOT$mean,"'_0$) =",ifelse(!is.null(data),paste(data$B0,"\U00b1", data$se.B0, sep=" "),"...")),
paste("Estimated population-specific slope of the environmental effect ($",NOT$mean,"'$) =",ifelse(!is.null(data),paste(data$B1,"\U00b1", data$se.B1, sep=" "),"...")),
"$\\text{Random effects}$",
- paste("Individual variance in sample ($V'_",NOT$devI,"$) = ", ifelse(!is.null(data),data$Vi,"...")),
- paste("Individual-specific response to an environmental effect (random slopes) variance ($V'_{",NOT$devS,NOT$env,"}$) = ", ifelse(!is.null(data),data$Vs,"...")),
+ paste("Sampled among-individual variance in intercept ($V'_",NOT$devI,"$) = ", ifelse(!is.null(data),data$Vi,"...")),
+ paste("Variance due to individual-specific responses to an environmental factor (random slopes; $V'_{",NOT$devS,NOT$env,"}$) = ", ifelse(!is.null(data),data$Vs,"...")),
paste("Residual variance of sample ($V'_",NOT$residualUpper,"$) = ", ifelse(!is.null(data),data$Vr,"...")))
)
diff --git a/inst/shiny-squid/source/server/modules/module6/SVRMod6Step2.R b/inst/shiny-squid/source/server/modules/module6/SVRMod6Step2.R
index f246f5f..1dfe47f 100644
--- a/inst/shiny-squid/source/server/modules/module6/SVRMod6Step2.R
+++ b/inst/shiny-squid/source/server/modules/module6/SVRMod6Step2.R
@@ -78,16 +78,16 @@ c(
paste("Mean of the trait ($",EQ3$mean0,"$) =",round(input$Mod6Step2_B[1],2)),
paste("Population-specific slope of the environmental effect ($",NOT$mean,"$) =",round(input$Mod6Step2_B[2],2)),
"$\\text{Random effects}$",
- paste("Individual variance ($V_",NOT$devI,"$) =",input$Mod6Step2_Vi),
- paste("Individual-specific response to an environmental effect (random slopes) variance ($V_{",NOT$devS,NOT$env,"}$) =",input$Mod6Step2_Vs),
+ paste("Among individual variance in intercept ($V_",NOT$devI,"$) =",input$Mod6Step2_Vi),
+ paste("Among-individual variance in slopes (random slopes; $V_",NOT$devS,"$) =",input$Mod6Step2_Vs),
paste("Correlation between individual specific intercepts and slopes ($Cor_{",NOT$devI,",",NOT$devS,"}$) =",input$Mod6Step2_CorIS),
paste("Residual variance ($V_",NOT$residualUpper,"$) =",input$Mod6Step2_Ve)),
"Estimated" = c("$\\text{Fixed effects}$",
paste("Sampled mean of the trait ($",NOT$mean,"'_0$) =",ifelse(!is.null(data),data$B0,"...")),
paste("Estimated population-specific slope of the environmental effect ($",NOT$mean,"'$) =",ifelse(!is.null(data),data$B1,"...")),
"$\\text{Random effects}$",
- paste("Individual variance in sample ($V'_",NOT$devI,"$) = ", ifelse(!is.null(data),data$Vi,"...")),
- paste("Individual-specific response to an environmental effect (random slopes) variance ($V'_{",NOT$devS,NOT$env,"}$) = ", ifelse(!is.null(data),data$Vs,"...")),
+ paste("Sampled among-individual variance in intercept ($V'_",NOT$devI,"$) = ", ifelse(!is.null(data),data$Vi,"...")),
+ paste("Sampled among-individual variance in slope ($V'_",NOT$devS,"$) = ", ifelse(!is.null(data),data$Vs,"...")),
paste("Correlation between individual specific intercepts and slopes ($Cor'_{",NOT$devI,",",NOT$devS,"}$) =", ifelse(!is.null(data),data$CorIS,"...")),
paste("Residual variance of sample ($V'_",NOT$residualUpper,"$) = ", ifelse(!is.null(data),data$Vr,"...")))
)
diff --git a/inst/shiny-squid/source/text/modules/TXTmodule6.R b/inst/shiny-squid/source/text/modules/TXTmodule6.R
index 50d39fc..b79d156 100644
--- a/inst/shiny-squid/source/text/modules/TXTmodule6.R
+++ b/inst/shiny-squid/source/text/modules/TXTmodule6.R
@@ -55,8 +55,8 @@ Mod6Step1_txt <- list(
on the measure of phenotype in the i th individual.
Accordingly, we can apply the following parameterization regimes:"),
"note" = "Note: you can consider residual variance as solely measurement error variance,
- or you could consider it in which case it might also include some
- unknown environmental variance in addition to the known environmental variance determined below.",
+ or you could consider that it might also include some unknown environmental
+ variance in addition to the known environmental variance determined below.",
"para3" = "Set in the background is the environmental variable and its sampling.
Here we should use uniform sampling, where each individual is sampled
at the same time so there are no biases. By definition,
@@ -117,6 +117,12 @@ Mod6Step2_txt <- list(
"para4" = "We will then examine the appearance of the resulting data.",
"results" = "Results: A mixed-effects statistical model estimates these parameters:",
+ "note1" = paste0("Note that we have slightly changed what is presented in the table above.
+ Whereas earlier we presented the phenotypic variance due to a particular term
+ (e.g., the variance due to individual differences in response to an environmental
+ factor, or $V_{",NOT$devS,NOT$env,"}$), above we present what many statistical packages produce,
+ which in the case of random slope, is the variance in slope $(V_",NOT$devS,")$
+ rather than the phenotypic variance due to slope."),
"para5" = "The best way to develop an intuition about what the covariance represents
is to compare a graph with and without it. Below are two panels of simulated data.
The one on the left shows your simulated individuals without the covariance,
@@ -132,7 +138,7 @@ Mod6Step2_txt <- list(
the relationship between two parameters in the equation—that is,
how they behave across individuals.
The covariance does normally appear in a partitioning of variance:",
- "note" = paste0("Note: In SQuID $E(",NOT$env,")=0$ and hence the covariance does not contribute to total phenotypic variance."),
+ "note2" = paste0("Note: In SQuID $E(",NOT$env,")=0$ and hence the covariance does not contribute to total phenotypic variance."),
"para7" = "The biology of the covariance is just beginning to be explored
(e.g., Mathot et al. 2011).
Undoubtedly further understanding of it will contribute to understanding
diff --git a/inst/shiny-squid/source/variables/modules/VARmodules.R b/inst/shiny-squid/source/variables/modules/VARmodules.R
index 49bacf3..e7b4b1d 100644
--- a/inst/shiny-squid/source/variables/modules/VARmodules.R
+++ b/inst/shiny-squid/source/variables/modules/VARmodules.R
@@ -49,8 +49,8 @@ Modules_VAR <- list(
),
# Individual-specific response to an environmental effect (random slopes) variance (VS)
- "Vs" = list( "label" = paste0("Individual-specific response to an environmental effect (random slopes) variance ($V_{",NOT$devS,NOT$env,"}$): "),
- "infoTxt" = "Individual-specific response to an environmental effect (random slopes) variance",
+ "Vsx" = list( "label" = paste0("Variance due to individual-specific responses to an environmental factor (random slopes; $V_{",NOT$devS,NOT$env,"}$): "),
+ "infoTxt" = "Variance due to individual-specific responses to an environmental factor (random slopes)",
"value" = 0.2,
"min" = 0,
"max" = 1,
@@ -120,13 +120,13 @@ Modules_VAR <- list(
),
# Variance of population mean response to an environmental effect x
- "Vbx" = list( "label" = paste("Variance of population mean response to an environmental effect $(V_{",NOT$mean," ",NOT$env,"})$:",sep=""),
- "infoTxt" = "Variance of population mean response to an environmental effect.",
+ "Vbx" = list( "label" = paste0("Variance due to population mean effect of an environmental factor $(V_{",NOT$mean," ",NOT$env,"})$:"),
+ "infoTxt" = "Variance due to population mean effect of an environmental factor.",
"value" = 0.5,
"min" = 0,
"max" = 1,
"step" = 0.01,
- "errorTxt" = paste("Variance of population mean response to an environmental effect $(V_{",NOT$mean," ",NOT$env,"})$
+ "errorTxt" = paste("Variance due to population mean effect of an environmental factor $(V_{",NOT$mean," ",NOT$env,"})$
must be a number between 0 and 1.
Try to decrease other variances.",sep="")
),