分佈平台幾何平均值的置信區間你好,
是否有任何快捷方式可以從分佈平台獲取幾何平均值的置信區間?
基礎數據分析和建模數據探索和可視化回复:分佈平台幾何平均值的置信區間你好伊恩,
那很完美。 非常感謝您的建議。
回复:分佈平台幾何平均值的置信區間如果您只關心時間間隔,則可以使用這種方法來獲取它,這種方法要快得多,因為您沒有 Bootstrap 通用性所需的所有平台啟動的開銷:
NamesDefaultToHere(1);
// Get some data
dt = Open("$SAMPLE_DATA/Big Class.jmp");
n = NRow(dt);
dataVec = dt[0, "height"]; // Get the requisite data as a vector
nb = 100000; // Number of bootstrsp samples
gms = J(nb, 1, .); // Vector to hold the geometric mean of each bootstrap sample
for(s=1, s<=nb, s++, // Loop over bootstrap samples
pickMe = J(n, 1, RandomInteger(1, n)); // Indices of elements to compose this bootstrap sample
bootstrapSampleVec = dataVec[pickMe]; // Values in this bootstrap sample
gm = exp(Mean(ln(bootstrapSampleVec))); // Geometric mean of this bootstrap sample
gms[s] = gm;
);
gm95 = Quantile(0.95, gms);
gm05 = Quantile(0.05, gms);
Print("The Geometric Mean lies betweeen "||Char(Round(gm05, 3))||" and "||Char(Round(gm95, 3))||".");
這段代碼可能可以並行化以使其更快,但會損失一些可讀性。
回复:分佈平台幾何平均值的置信區間我沒有將細節與指導進行比較@馬克貝利引用,但您也可以嘗試引導程序(交互式或通過 JSL)。 例如:
NamesDefaultToHere(1);
// Get some data
dt = Open("$SAMPLE_DATA/Big Class.jmp");
// Use Distribution
dist = dt << Distribution(
Continuous Distribution(
Column( :height ),
Quantiles( 0 ),
Vertical( 0 ),
Outlier Box Plot( 0 ),
Customize Summary Statistics(
Mean( 0 ),
Std Dev( 0 ),
Std Err Mean( 0 ),
Upper Mean Confidence Interval( 0 ),
Lower Mean Confidence Interval( 0 ),
N( 0 ),
N Missing( 0 ),
Geometric Mean( 1 )
)
)
);
// Bootstrp the statistic in question (note 'dt2' is a list)
dt2 = Report(dist)[TableBox(1)] << Bootstrap(1000);
// Inspect the bootstrp distribution
dist2 = dt2[2] << runScript("Distribution");
// Get the confidence interval for the statistic by inspection or further JSL . . .回复:分佈平台幾何平均值的置信區間另一種方法,不使用 JSL,但對對數正態分佈做出相同的假設;使用分發平台,分析數據的自然日誌。 然後可以通過 Exp 反向轉換獲得的均值和置信區間。 所得區間是 GM 的置信區間。
回复:分佈平台幾何平均值的置信區間嗨馬克,
非常感謝您的快速反饋。
回复:分佈平台幾何平均值的置信區間該結果無法從分發平台或 JMP 中的任何其他位置獲得。 可以使用本中的指導來編寫計算腳本DO 循環博客文章。 SAS/IML 與 JMP JSL 類似,因此轉換還不錯。