首页 > 解决方案 > ggpubr 中是否有一些代码将 P 值变为非科学以添加到图形中

问题描述

GGPUBR 已将 P 值添加到散点图上,但我需要它是非科学的。

我已经尝试了以下代码,但这没有奏效。

compare_means(formula, data, method = "pearson", paired = FALSE,
group.by = NULL, ref.group = NULL, symnum.args = list(),
p.adjust.method = "holm", ...)



my_data <- read.csv("qPCR.csv")
 library(ggpubr)

 ggscatter(my_data, 
 x = "Intenties"                                                   
 y = "qPCR",
 size = 4,
 color = '#a8329b',
 add = 'reg.line',
 add.params = list(color='black'),
 cor.coef = TRUE,
 cor.coeff.args = list(output.type = 'text', size = 5, 
 color = '#a8329b',   label.sep = "\n"),
 cor.method = "pearson",
 conf.int = TRUE,    
 xlab = "Breath",                                                
 ylab = "qPCR ml/copies log")

标签: rggpubr

解决方案


p 值不是很科学1 [ASA 关于 p 值的声明],但如果你的意思是你得到科学记数法,我编造了一些数据,答案不是科学记数法。也许您的 p 值结果非常低。

my_data <- data.frame("Intenties" = 1:100, "qPCR" = rnorm(100, 100, 15))

ggscatter(my_data, 
          x = "Intenties",                                                   
          y = "qPCR",
          size = 4,
          color = '#a8329b',
          add = 'reg.line',
          add.params = list(color='black'),
          cor.coef = FALSE,
          # cor.coeff.args = list(output.type = 'text', size = 5, 
          #                       color = '#a8329b',   label.sep = "\n"),
          cor.method = "pearson",
          conf.int = TRUE,    
          xlab = "Breath",                                                
          ylab = "qPCR ml/copies log") + 
  annotate("text", 25, 125, label = "p < 0.1")

p 值注释在


推荐阅读