This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
t.test_SEM <- function(mean1, mean2, SE1, SE2, n1, n2) { | |
# Calculate t-statistic | |
t_statistic <- (mean1 - mean2) / sqrt(SE1^2 + SE2^2) | |
# Calculate degrees of freedom | |
df <- ((SE1^2 + SE2^2)^2) / (((SE1^2)^2 / (n1 - 1)) + ((SE2^2)^2 / (n2 - 1))) | |
# Calculate p-value | |
p_value <- 2 * pt(abs(t_statistic), df = df, lower.tail = FALSE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'1. Press `ALT` + `F11` to open the Visual Basic for Applications (VBA) editor in Excel. | |
'2. In the VBA editor, click `Insert` > `Module` to insert a new module. | |
'3. Copy and paste the following VBA code into the module: | |
Function PropagateError(operation As String, value1 As Double, sigma1 As Double, value2 As Double, sigma2 As Double) As Double | |
Dim result As Double |