Skip to content

p-value missing for fit_power_law() #1158

@krlmlr

Description

@krlmlr

What happens?

fit_power_law() no longer returns a KS.p component.

To Reproduce

igraph 1.6.0

options(conflicts.policy = list(warn = FALSE))
library(igraph)
g <- sample_pa(1000) # increase this number to have a better estimate
d <- degree(g, mode = "in")
fit_power_law(d + 1, 10)
#> $continuous
#> [1] FALSE
#> 
#> $alpha
#> [1] 2.738748
#> 
#> $xmin
#> [1] 10
#> 
#> $logLik
#> [1] -62.25711
#> 
#> $KS.stat
#> [1] 0.1037705
#> 
#> $KS.p
#> [1] 0.986668

Created on 2024-01-23 with reprex v2.1.0

igraph 2.0.0

options(conflicts.policy = list(warn = FALSE))
library(igraph)
g <- sample_pa(1000) # increase this number to have a better estimate
d <- degree(g, mode = "in")
fit_power_law(d + 1, 10)
#> $continuous
#> [1] FALSE
#> 
#> $alpha
#> [1] 3.226469
#> 
#> $xmin
#> [1] 10
#> 
#> $logLik
#> [1] -63.90509
#> 
#> $KS.stat
#> [1] 0.07306791

Created on 2024-01-23 with reprex v2.1.0

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions