2
我想知道腳本的輸出結果是否正確。如何在R中繪製度分佈
所以劇本(其中與度我所有的頂點的矢量存儲在X):
x是
x
[1] 7 9 8 5 6 2 8 9 7 5 2 4 6 9 2 6 10 8
x是某個網絡頂點度 - 像頂點1具有度7,頂點2具有9度等 X < - V2 摘要(X)
library(igraph)
split.screen(c(1,2))
screen(1)
plot (tabulate(x), log = "xy", ylab = "Frequency (log scale)", xlab = "Degree (log scale)", main = "Log-log plot of degree distribution")
screen(2)
y <- (length(x) - rank(x, ties.method = "first"))/length(x)
plot(x, y, log = "xy", ylab = "Fraction with min. degree k (log scale)", xlab = "Degree (k) (log scale)", main = "Cumulative log-log plot of degree distribution")
close.screen(all = TRUE)
power.law.fit(x, xmin = 50)
我的問題是叔對數對數似乎是不正確的 - 例如,我的整體度爲'7'8倍,所以不應該把這個點記錄在對數圖上0.845(log 7)/0.903(log(8)as在(x/y)?
此外,有人可以告訴我如何在屏幕2中繪製圖線(對數 - 對數刻度上的冪律)?
如何MLE產生這些差異?有一個簡單的解釋嗎? –
抱歉,你能解釋一下這個..所觀察到的模式是否正確? –