p.value for stat_fit_tidy

Issue #9 resolved
Anonymous created an issue


it would bei cool if "stat_fit_tidy" provide "p.value" fields for each paramter too

(now estimate and standard error "_se" is possible)

thx Christof

micmen.formula <- y ~ SSmicmen(x, Vm, K) 
ggplot(Puromycin, aes(conc, rate, colour = state)) +
  geom_point() +
  geom_smooth(method = "nls", 
              formula = micmen.formula,
              se = FALSE) +
  stat_fit_tidy(method = "nls", 
                method.args = list(formula = micmen.formula),
                geom = "text",
                label.x.npc = "right",
                label.y.npc = "bottom",
                aes(label = paste("V[m]~`=`~", signif(..Vm.., digits = 3),
                                  "%+-%", signif(..Vm_se.., digits = 2),
                                  "~~~~K~`=`~", signif(..K.., digits = 3),
                                  "%+-%", signif(..K_se.., digits = 2),
                                  sep = "")),
                parse = TRUE)

Comments (1)

  1. Pedro J. Aphalo repo owner

    Hi, Thanks for the suggestion. I have now implemented this change. In addition, some weeks ago I have added to the version in this repository a stat_fit_tb() which allows to add the output of either summary() or anova() onto a ggplot as a table. I will do some testing before submitting to CRAN. Meanwhile you can install from Bitbucket using package 'devtools' if you are willing to test the changes and give feedback. Use devtools::install_bitbucket("aphalo/ggpmisc") after installing 'devtools'. For assembling the labels use ..Vm_p.value.. and ..K_p.value.. Pedro.

  2. Log in to comment