OPTIMIZE improved, layout changed, bug fix
Build and deploy Roxygen2|pkgdown documentation site / build-and-deploy-documentation (push) Has been cancelled
run tests / build-and-deploy-documentation (push) Has been cancelled

This commit is contained in:
2026-08-10 10:31:30 +02:00
parent 0b56824e3d
commit f154986505
5 changed files with 216 additions and 51 deletions
+6 -2
View File
@@ -40,6 +40,7 @@ library(scales)
COR_FUNC <- function(vec1, vec2) {
df <- data.frame(v1 = vec1, v2 = vec2)
df2 <- df[complete.cases(df),]
#browser()
return(cor(df2[,1],df2[,2]))
}
@@ -942,12 +943,13 @@ PlotLinPLA_FUNC <- function(circle, sigmoid, all_l2, pl_df, indS, indT) {
truePL_df <- NULL
}
p <- ggplot(all_l2, aes(x = log_dose, y = readout, color = factor(isRef))) +
geom_point(size = 2) +
# labs(title=paste("linear regression model", indS,indT), color="product") +
scale_colour_manual(labels = c("test", "reference"), values = c("#C2173F", "#4545BA")) +
ylim(min(all_l2$readout), max(all_l2$readout)) +
scale_x_continuous(breaks = scales::pretty_breaks(n = 10)) +
scale_y_continuous(breaks = scales::pretty_breaks(n = 10)) +
theme_bw()
@@ -981,6 +983,7 @@ PlotLinPLA_FUNC <- function(circle, sigmoid, all_l2, pl_df, indS, indT) {
x = log_dose, y = readout, shape = factor(isRef),
size = 5, alpha = 0.2
), col = c("black"), inherit.aes = FALSE) +
ylim(min(all_l2$readout), max(all_l2$readout)) +
scale_shape_manual(labels = c("test", "reference"), values = c(21, 21))
# fit intercept for test and ref and common slope
@@ -1017,6 +1020,7 @@ PlotLinPLA_FUNC <- function(circle, sigmoid, all_l2, pl_df, indS, indT) {
title = paste("restricted linear regression model"),
subtitle = paste("Regression on highlighted points")
) +
ylim(min(all_l2$readout), max(all_l2$readout)) +
theme(legend.position = "none", axis.text = element_text(size = 14))
pr3 <- pr2 + geom_point(circle, mapping = aes(
x = log_dose, y = readout, shape = factor(isRef),
@@ -1219,7 +1223,7 @@ tests_FUNC <- function(ro_new, Lim, PureErrFlag) {
VCOVpure <- V_V * meanPureErr
DFsPure <- FitAnova[4, 1]
#browser()
testPOTr <- logical()
if (POTr_CI[1] * 100 > Lim[[9]] & POTr_CI[2] * 100 < Lim[[10]]) testPOTr <- 0 else testPOTr <- 1