Skip to content

p-values for lmodel2 are missing #570

@IndrajeetPatil

Description

@IndrajeetPatil

Summary for lmodel2 objects include a column corresponding to p-values ("P-perm (1-tailed)"), but they are included in the tidier output.

# setup
set.seed(123)
library(lmodel2)
data(mod2ex2)

# model
Ex2.res <-
  lmodel2::lmodel2(
    formula = Prey ~ Predators,
    data = mod2ex2,
    range.y = "relative",
    range.x = "relative",
    nperm = 99
  )

# regression results
Ex2.res$regression.results
#>   Method Intercept    Slope Angle (degrees) P-perm (1-tailed)
#> 1    OLS  20.02675 2.631527        69.19283              0.01
#> 2     MA  13.05968 3.465907        73.90584              0.01
#> 3    SMA  16.45205 3.059635        71.90073                NA
#> 4    RMA  17.25651 2.963292        71.35239              0.01

# p-values are absent
broom::tidy(Ex2.res, conf.int = TRUE)
#> # A tibble: 8 x 5
#>   method term      estimate conf.low conf.high
#>   <fct>  <chr>        <dbl>    <dbl>     <dbl>
#> 1 MA     Intercept    13.1      1.35     19.8 
#> 2 MA     Slope         3.47     2.66      4.87
#> 3 OLS    Intercept    20.0     12.5      27.6 
#> 4 OLS    Slope         2.63     1.86      3.40
#> 5 RMA    Intercept    17.3      8.96     23.8 
#> 6 RMA    Slope         2.96     2.17      3.96
#> 7 SMA    Intercept    16.5      9.20     22.1 
#> 8 SMA    Slope         3.06     2.38      3.93

Created on 2019-01-05 by the reprex package (v0.2.1)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions