csgillespie / poweRlaw

This package implements both the discrete and continuous maximum likelihood estimators for fitting the power-law distribution to data. Additionally, a goodness-of-fit based approach is used to estimate the lower cutoff for the scaling region.
109 stars 24 forks source link

what is wrong with this code? #95

Closed changshuaili closed 3 years ago

changshuaili commented 3 years ago

Dear Dr. Colin Gillespie when I run the code of following:

rm(list = ls(all = TRUE)) ## Clears the workspace setwd("D:/百度云同步盘/论文/财富分布") getwd()

US.df = read.csv("D:/百度云同步盘/论文/财富分布/数据/2021/The United States-659-2021 - 副本.csv")

library("poweRlaw")

continuous power law

m_pl = conpl$new(US.df$Wealth) est_pl = estimate_xmin(m_pl) est_pl m_pl$setXmin(est_pl) get_distance_statistic(m_pl, xmax = 1e+05, distance = "ks") get_ntail(m_pl)

continuous log-normal distribution

m_ln = conlnorm$new(US.df$Wealth) est_ln = estimate_xmin(m_ln) m_ln$setXmin(est_ln)

bs_p1 = bootstrap_p(m_pl) bs_p1$p

bs_p2 = bootstrap_p(m_ln) bs_p2$p

it shows errors when it runs to "bs_p2 = bootstrap_p(m_ln) bs_p2$p " showing "Expected total run time for 100 sims, using 1 threads is 30.7 seconds. Error in checkForRemoteErrors(val) : one node produced an error: invlid argument"

pls tell me what to do? thank you so much!

changshuaili commented 3 years ago

"Expected total run time for 100 sims, using 1 threads is 30.7 seconds. Error in checkForRemoteErrors(val) : one node produced an error: invlid argument"

csgillespie commented 3 years ago

I can't reproduce this error.