OPTIMIZE improved, layout changed, bug fix
This commit is contained in:
+6
-2
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user