ROUT outlier report updated and finalized
This commit is contained in:
1 parent
15a048b127
commit
2beaf0a9c8
8 files changed
+171
-111
No files matched your search
+48
@@ -1578,3 +1578,51 @@ divFUN <- function(x, Div, N, res, noDil) {
|
||||
}
|
||||
divFUN(y, Div, N, res, noDil)
|
||||
}
|
||||
|
||||
|
||||
#' Calculates bend points.
|
||||
#'
|
||||
#' Function to calcuate bend points and asymptote points.
|
||||
#'
|
||||
#' @param coeffsMR Coefficients of the restricted 4PL function fitting.
|
||||
#' @param coeffsMU Coefficients of the unrestricted 4PL function fitting.
|
||||
#' @returns A data-frame with the bend and asymptote points.
|
||||
#' @export
|
||||
#' @examples
|
||||
#' suppressMessages(source("../../dev/setup.R"))
|
||||
#'
|
||||
#' Y = c(as = 0.120445892203919, bs = 1.28418582519022, ds = 1.8338879701327,
|
||||
#' cs = 1.39147328614669, at = 0.138485413007939, bt = 1.21165361681225,
|
||||
#' dt = 1.87305623127598, r = -0.124939016993196)
|
||||
#' X=c(a = 0.128595630629391, b = 1.24241130117909, d = 1.85344873664946,
|
||||
#' cs = 1.42641893429388, r = -0.048418036970926)
|
||||
|
||||
#'
|
||||
#' bendFUN(X,Y)
|
||||
bendFUN <- function(coeffsMR, coeffsMU) {
|
||||
XbendMUlREF <- coeffsMU[4] - 1.5434 / abs(coeffsMU[2])
|
||||
XbendMUuREF <- coeffsMU[4] + 1.5434 / abs(coeffsMU[2])
|
||||
XbendMUlTEST <- coeffsMU[4] - coeffsMU[8] - 1.5434 / abs(coeffsMU[6])
|
||||
XbendMUuTEST <- coeffsMU[4] + coeffsMU[8] + 1.5434 / abs(coeffsMU[6])
|
||||
XbendMRlREF <- coeffsMR[4] - 1.5434 / abs(coeffsMR[2])
|
||||
XbendMRuREF <- coeffsMR[4] + 1.5434 / abs(coeffsMR[2])
|
||||
XbendMRlTEST <- coeffsMR[4] - coeffsMR[5] - 1.5434 / abs(coeffsMR[2])
|
||||
XbendMRuTEST <- coeffsMR[4] - coeffsMR[5] + 1.5434 / abs(coeffsMR[2])
|
||||
XasymlREF <- coeffsMR[4] - 3 / abs(coeffsMR[2])
|
||||
XasymuREF <- coeffsMR[4] + 3 / abs(coeffsMR[2])
|
||||
XasymlTEST <- coeffsMR[4] - coeffsMR[5] - 3 / abs(coeffsMR[2])
|
||||
XasymuTEST <- coeffsMR[4] - coeffsMR[5] + 3 / abs(coeffsMR[2])
|
||||
BPsMR_MU <- data.frame(
|
||||
points = c(
|
||||
"lower bendpoint REF", "upper bendpoint REF", "lower bendpoint TEST", "upper bendpoint TEST",
|
||||
"lower asymp. point REF", "upper asymp. point REF", "lower asymp. point TEST", "upper asymp. point TEST",
|
||||
"bendREF_lower_unrestr", "bendREF_upper_unrestr", "bendTEST_lower_unrestr", "bendTEST_upper_unrestr"
|
||||
),
|
||||
estimates = c(
|
||||
round(XbendMRlREF, 3), round(XbendMRuREF, 3), round(XbendMRlTEST, 3), round(XbendMRuTEST, 3),
|
||||
round(XasymlREF, 3), round(XasymuREF, 3), round(XasymlTEST, 3), round(XasymuTEST, 3),
|
||||
round(XbendMRlREF, 3), round(XbendMRuREF, 3), round(XbendMRlTEST, 3), round(XbendMRuTEST, 3)
|
||||
)
|
||||
)
|
||||
return(BPsMR_MU)
|
||||
}
|
||||
Reference in new issue
Block a user