正態分佈和變換大家好,
我有一些測量數據,當我嘗試連續正態擬合時,我可以看到我的數據不正常。 但是,從擬合優度檢驗中我可以看到數據來自 Johnson Su 分佈。
該分佈具有兩種形狀、一種位置和一種尺度參數。 從我的在線研究中,我可以了解如何計算這些參數的方差以及標準差。 我用 Excel 來計算,但是 JMP 有辦法做到這一點嗎? 根據我的理解,“分佈”分析中的摘要統計表會假設數據來自正態分佈來計算這些統計數據。
提前致謝!
娜塔莉
回复:正態分佈和變換謝謝你的回复,txnelson。 我沒有想到這一點,我也沒有想到會是這樣。 我想知道如果它使得不可能準確地反轉轉換,那麼該轉換的價值是什麼。 如果我根據轉換後的數據開發模型,我需要知道該模型的原始數據形式的輸出是什麼。 那麼,JMP 甚至將這種轉換作為一種選擇,這似乎很愚蠢。 對原劇本表示敬意。 我將保存它以供將來需要時使用。回复:正態分佈和變換該腳本不適用於密度變換。該函數為同一密度值生成多個值,而代碼無法處理該問題。見下圖

回复:正態分佈和變換也許這是我的數據集? 簡而言之,我從數據集中選擇一個值,並提取對數正態轉換值來測試/驗證代碼。 我的數據集如下。 值 7 對應於轉換後的值 0.112832236739791,因此我應該能夠使用轉換後的值作為代碼中的目標,並且腳本應該輸出 7。 正確的?
Names Default to Here(1);
dt=New Table( "Test",
Add Rows( 30 ),
New Column("PNP3",
Numeric,
"Continuous",
Format( "Best", 10 ),
Set Values(
[12, 4, 12, 13, 7, 5, 5, 15, 5, 5, 5, 15, 7, 7, 16, 5, 9, 11, 18, 8, 16, 12, 7, 14, 6, 11, 7, 10, 14, 10]
)
),
New Column( "LogNormal Density PNP3",
Numeric,
"Continuous",
Format( "Best", 12 ),
Formula(
Normal Density( Log( :PNP3 ), 2.17970974904887, 0.43804625261609 ) / :PNP3
)
)
);
/***********************************************************************/
/* */
/* The getformula column retrieves the formula from the translation */
/* column and replaces the Original Column name in the formula with */
/* string "__value__". The value of this variable is what will be */
/* evaluated in the successive approximations done by the script. */
/* */
/***********************************************************************/
getformula = Function( {ColName, FormulaColName},
{ColName, FormulaColName, TheFormula, coloncolname},
//__value__ = .;
// Get the transformed data columns formula as a literal string
TheFormula=Column( FormulaColName ) << Get Formula ;
// Check to see that a formula was found
If( Is Empty( TheFormula ) == 1 ,
Dialog(
" The column specified as",
"the Transformed Column does",
" not contain a formula. ",
" ",
" Please rerun and select",
" the correct column"
);
Throw();
);
TheFormula=char( Column( FormulaColName ) << Get Formula );
// Get the actual name of the orignal column since
// the upper,lower case and spacing is critical in determining
// where in the formula the column name actually occurs
ColName = Column( ColName ) << Get Name;
// Determine if the reference to the column name in the
// formula is a simple :colname reference or a complex
// reference :Name(\!"colname\!")
// If the column name isn't found set the return code to -1
If(
Contains( TheFormula, ":" || ColName ), ColonColName = ":" || ColName, // Else
Contains( TheFormula, ":Name(\!"" || ColName || "\!")" ), ColonColName = ":Name(\!"" || ColName || "\!")", // Else
rc = -1
);
// Replace all of the column references in the formula with
// the string "(__value__)" so that when the formula is
// evaluated later, it will take the then value of the memory
// variable called __value__ and use it in the formula
If( Contains( TheFormula, ColonColName ) > 0,
While( Contains( TheFormula, ColonColName ) > 0, TheFormula = Munger( TheFormula, 1, ColonColName, "(__Value__)" ) ),
Dialog(
" The column specified as",
"the Transformed Column does",
" not contain a reference",
" to the original column.",
" in it's formula.",
" ",
" Please rerun and select",
" the correct column"
);
Throw();
);
TheFormula;
);
/***********************************************************************/
/* */
/* The gettrans function evaluates the formula in the transformed */
/* and converts the formula into a generic form for repeated use in */
/* running of the script. */
/* */
/***********************************************************************/
gettrans = Function( {ColName, FormulaColName, TheTarget, Theformula},
//colname="PNP3";formulacolname="Johnson Sl Transform PNP3"; Thetarget=johnsonmean;theformula=myformula;
{ColName, FormulaColName, TheFormula, High, Low, TheTarget, TheMax, Themin, __value__},
// The program uses successive approximations to determine the different
// parametrics. The way it works is that it calculates the needed parameter
// such as Mean, or Standard Deviation, and then by using successive
// approximations from the original column's values, and passing those
// values through the columns formula, when the approximation value matches
// the calculated value from the transformed column, the retransformed value
// has been found
// Set the extreem values
High = Col Maximum( If( Excluded( Row State( Empty() ) ) == 0, Column( ColName ), . ) );
Low = Col Minimum( If( Excluded( Row State( Empty() ) ) == 0, Column( ColName ), . ) );
// Make a guess at the first value
__value__ = Mean( High, Low );
// Iterate the guessing for up to 100 times, adjusting by 1/2 on each loop
For( i = 1, i <= 100, i++,
TheResult = Eval( Parse( theformula ) );
If(
TheResult > TheTarget, High = __value__,
TheResult < TheTarget, Low = __value__,
Break()
);
If( High == Low, Break() );
__value__ = Mean( High, Low );
);
__value__; // Expose the return value
); // End of function gettrans
myFormula = getformula( "PNP3","LogNormal Density PNP3" );
MatchValue = 7;
TargetValue = 0.112832236739791;
dt<<RUN formulas=""></RUN>
運行代碼後,日誌輸出如下
MatchValue = 7;
TargetValue = 0.112832236739791;
Gettrans("PNP3", "LogNormal Density PNP3", 0.112832236739791, myFormula) = 18;
Gettrans 函數的輸出應為 7。 代碼輸出的值 18 對應於轉換後的值 0.0135701784925184。
回复:正態分佈和變換我不明白這是什麼問題?由於所有代碼所做的都是從原始列中獲取值並將它們傳遞給公式,直到結果等於轉換列中的目標值(通常是新分佈的平均值)。我根據之前的回復重新編寫了腳本,但這一次,使用由分佈平台確定的對數正態密度公式,並且代碼似乎對我有用
Names Default to Here(1);
dt=New Table( "Test",
Add Rows( 100 ),
New Column("PNP3",
Numeric,
"Continuous",
Format( "Best", 10 ),
Set Values(
[130.378809500886, 132.736937590235, 136.831952164704, 136.969154239163,
136.622623419893, 137.480356512481, 138.094011176166, 142.10586919757,
134.750041237898, 129.719685093372, 136.520172900026, 134.778624216716,
136.991131754497, 140.420940666186, 143.257827228986, 132.213765487819,
144.671172276421, 134.703176752174, 136.744212473486, 137.187637284245,
139.788226018039, 139.372617199359, 136.112484488985, 142.809097034809,
137.799370430979, 138.482493403385, 135.236982575217, 136.251777781494,
130.768356509183, 138.248554728086, 139.77894292052, 134.25405167366,
147.680687116943, 131.351711991517, 132.84274608728, 129.925216236015,
133.47206414316, 143.339607103893, 145.341236691691, 139.200187547183,
142.775409342827, 140.276696563388, 130.623979847275, 140.899814366103,
136.839389290019, 137.239125319, 133.5265281641, 139.356927352471,
130.278640163464, 144.604061001983, 135.286715550332, 134.465744849174,
131.37612790407, 131.830655714309, 140.69724979219, 142.88152043774,
135.253839945611, 127.349434776131, 129.499730399113, 128.447533754611,
130.916853702805, 134.599575929218, 140.761701916093, 136.870661473033,
138.253066182015, 140.403627077024, 134.522643679098, 124.842978178703,
131.803059455053, 125.886786494664, 133.013566701611, 136.940299158936,
133.263913979648, 144.695171321015, 149.541020434399, 144.503845528521,
136.086324063453, 139.530943158798, 138.421460162451, 133.180943784947,
142.166796633818, 142.676541730822, 135.723943440339, 143.957996114985,
145.712158558794, 138.38937502716, 140.535304753392, 142.140619481175,
131.379414509756, 144.949299702964, 133.349854687882, 139.470639804255,
140.160558367008, 137.130662662612, 145.692632562344, 131.870848869966,
136.391733804566, 134.219740661271, 139.021827550389, 147.958038547157]
)
),
New Column( "LogNormal Density PNP3",
Numeric,
"Continuous",
Format( "Best", 12 ),
Formula(
Normal Density( Log( :PNP3 ), 4.92072961984847, 0.0370684539915594 ) / :PNP3
)
)
);
/***********************************************************************/
/* */
/* The getformula column retrieves the formula from the translation */
/* column and replaces the Original Column name in the formula with */
/* string "__value__". The value of this variable is what will be */
/* evaluated in the successive approximations done by the script. */
/* */
/***********************************************************************/
getformula = Function( {ColName, FormulaColName},
{ColName, FormulaColName, TheFormula, coloncolname},
//__value__ = .;
// Get the transformed data columns formula as a literal string
TheFormula=Column( FormulaColName ) << Get Formula ;
// Check to see that a formula was found
If( Is Empty( TheFormula ) == 1 ,
Dialog(
" The column specified as",
"the Transformed Column does",
" not contain a formula. ",
" ",
" Please rerun and select",
" the correct column"
);
Throw();
);
TheFormula=char( Column( FormulaColName ) << Get Formula );
// Get the actual name of the orignal column since
// the upper,lower case and spacing is critical in determining
// where in the formula the column name actually occurs
ColName = Column( ColName ) << Get Name;
// Determine if the reference to the column name in the
// formula is a simple :colname reference or a complex
// reference :Name(\!"colname\!")
// If the column name isn't found set the return code to -1
If(
Contains( TheFormula, ":" || ColName ), ColonColName = ":" || ColName, // Else
Contains( TheFormula, ":Name(\!"" || ColName || "\!")" ), ColonColName = ":Name(\!"" || ColName || "\!")", // Else
rc = -1
);
// Replace all of the column references in the formula with
// the string "(__value__)" so that when the formula is
// evaluated later, it will take the then value of the memory
// variable called __value__ and use it in the formula
If( Contains( TheFormula, ColonColName ) > 0,
While( Contains( TheFormula, ColonColName ) > 0, TheFormula = Munger( TheFormula, 1, ColonColName, "(__Value__)" ) ),
Dialog(
" The column specified as",
"the Transformed Column does",
" not contain a reference",
" to the original column.",
" in it's formula.",
" ",
" Please rerun and select",
" the correct column"
);
Throw();
);
TheFormula;
);
/***********************************************************************/
/* */
/* The gettrans function evaluates the formula in the transformed */
/* and converts the formula into a generic form for repeated use in */
/* running of the script. */
/* */
/***********************************************************************/
gettrans = Function( {ColName, FormulaColName, TheTarget, Theformula},
//colname="PNP3";formulacolname="Johnson Sl Transform PNP3"; Thetarget=johnsonmean;theformula=myformula;
{ColName, FormulaColName, TheFormula, High, Low, TheTarget, TheMax, Themin, __value__},
// The program uses successive approximations to determine the different
// parametrics. The way it works is that it calculates the needed parameter
// such as Mean, or Standard Deviation, and then by using successive
// approximations from the original column's values, and passing those
// values through the columns formula, when the approximation value matches
// the calculated value from the transformed column, the retransformed value
// has been found
// Set the extreem values
High = Col Maximum( If( Excluded( Row State( Empty() ) ) == 0, Column( ColName ), . ) );
Low = Col Minimum( If( Excluded( Row State( Empty() ) ) == 0, Column( ColName ), . ) );
// Make a guess at the first value
__value__ = Mean( High, Low );
// Iterate the guessing for up to 100 times, adjusting by 1/2 on each loop
For( i = 1, i <= 100, i++,
TheResult = Eval( Parse( theformula ) );
If(
TheResult > TheTarget, High = __value__,
TheResult < TheTarget, Low = __value__,
Break()
);
If( High == Low, Break() );
__value__ = Mean( High, Low );
);
__value__; // Expose the return value
); // End of function gettrans
myFormula = getformula( "PNP3","LogNormal Density PNP3" );
dt<<RUN formulas=""></RUN>回复:正態分佈和變換嗨特克斯尼爾森,
我對您鏈接的程序/腳本有疑問。 它可以輕鬆逆轉約翰遜變換,但不適用於其他變換。 特別是對數正態密度變換。 您介意我私信您看看是否有辦法修改腳本以使其工作嗎?回复:正態分佈和變換該專欄名為“Johnson Sl Transform X By Timepoint”是轉換後的數據。此列包含標準化數據。您將根據此專欄進行分析。
因此,當您運行分析以確定 Timepoint1 和 Timepoint2 數據之間是否存在差異時,您將在轉換後的數據列上運行它。現在的問題是,它將報告轉換後數據規模的值。因此,為了將其與原始列 X 關聯起來,您可以運行腳本,輸入分析中的數據點值,然後返回以 X 表示的值。
回复:正態分佈和變換當然,正如我之前發布的那樣,腳本應該單獨運行。 為了方便起見,我只附上了單個文件 (Test.jmp)。您的腳本是否應該在名為 Y(在該數據表文件中)的第三列中記錄約翰遜 SI 轉換後的正常數據,以便運行它並查看其正常形狀?
問題是腳本中沒有命令行來保存該數據表中的普通數據。 這就是為什麼有人問我這個問題。
如果您查看這些拆分文件之一併運行腳本,則第三列 Y 仍為空白。 我認為每個分割數據表都可以由第三列 Y 中約翰遜 SI 轉換後的正常數據來完成,因為之後我想將它們再次合併到一個文件中以進行統計分析。
時間點1:
約翰遜均值 = -3.80945275324507e-15;
列平均值(:X) = -7.4569375;
Gettrans("X", "Johnson Sl 按時間點變換 X", JohnsonMean, myFormula) = -10.7617217296089;
時間點2:
約翰遜均值 = 7.27196081129478e-15;
列平均值(:X) = 3.257375;
Gettrans("X", "Johnson Sl 按時間點變換 X", JohnsonMean, myFormula) = 1.87687074670016;
感謝您的幫助。
回复:正態分佈和變換您的問題的解決方案必須引入人為決定,即您是否知道不同時間點數據組來自不同的總體分佈這一事實?我的假設是,確定總體分佈是否屬於正態分佈的最佳方法是將所有數據合併到一個評估中。接下來是對所有數據使用單一轉換,然後對轉換後的數據執行後續分析。任何真正的差異都應該在轉換後的數據中被識別出來。現在,如果您對來自不同分佈的時間點組有獨立的先驗知識,那麼您將需要將數據子集到單獨的時間點組中,並在不同的子集上單獨運行腳本。
回复:正態分佈和變換嗨吉姆,
我認為這裡有一個誤解。 雖然,日誌文件顯示:
JohnsonMean = 1.72084568816899e-15;
Col Mean(:X) = -2.09978125;
Gettrans("X", "Johnson Sl Transform X By Timepoint", JohnsonMean, myFormula) = 1.1;您的腳本不會將“Johnson SI Transformation By Timepoint”列中的正常數據保存到我的數據表中的 Y 列中。
最好的,
雷納爾多
回复:正態分佈和變換返回包含組合時間點的數據表。然後轉到“分佈”並針對轉換後的數據運行它。
然後,前往
幫助==>書籍==>探索JMP
您必須詳細了解 JMP 的工作原理!
回复:正態分佈和變換我創建了兩個子集:每個時間點一個。 在哪裡使用日誌文件的輸出來獲取和繪製正常數據?
回复:正態分佈和變換1. 好的,我單獨運行一下。
2. 我有您提到的那些輸出(日誌文件)和 Johnson SI Transform X By Timepoint(= 非正態分佈),但沒有分配給 Y 列的數據。
回复:正態分佈和變換1. 如果您需要為每個時間點獲取單獨的結果,則需要將數據表子集為每個時間點的單獨表,然後分別在每個時間點上運行腳本。
2. 現在,您需要使用轉換後的數據列繼續進行分析,就好像它是您的 Y 列一樣。
3.閱讀並消化文檔
幫助==>書籍==>探索JMP
回复:正態分佈和變換抱歉,我沒有告訴你日誌文件,因為我找不到它。 我是 JMP 的初學者。 現在我可以找到它:查看 -> 日誌。
好的,我添加了該命令行,得到了相同的結果!
下一步是什麼? :D
PS:腳本不是分別考慮兩個時間點來計算這些參數嗎? 也許,名為“Timepoint”的新參數將被添加到“getformula”和“gettrans”函數中。
回复:正態分佈和變換1. 我在最近的回復之一中請求您查看日誌以查看是否有任何錯誤。我運行了腳本,正如您上次回复所附的數據表中所包含的那樣。在查看日誌時,它指定:
The namespace "dt" is not defined in access or evaluation of 'dt:Johnson Sl Transform X By Timepoint' ,
dt:Johnson Sl Transform X By Timepoint/*###*/
考慮到這一點,並查看腳本,“dt”引用位於該行中
JohnsonMean = Col Mean( dt:Johnson Sl Transform X By Timepoint );
在這種情況下,dt 正在尋找一個名為 dt 的變量,該變量指向要從中讀取數據的數據表。因此,對程序的更正是在代碼中使用引用之前添加以下行。
dt=current data table();
我將其添加到代碼副本中,作為腳本中的第一行。
一旦我這樣做了,在日誌中我從腳本中得到了以下結果
JohnsonMean = 1.72084568816899e-15;
Col Mean(:X) = -2.09978125;
Gettrans("X", "Johnson Sl Transform X By Timepoint", JohnsonMean, myFormula) = 1.1;
請注意......結果在日誌文件中......
回复:正態分佈和變換謝謝你的帖子,吉姆! 我想現在能力分析已經明白了! 
關於從非正態數據到正態數據的轉換,我創建了一個示例(Test.jmp),其中包含兩個時間點和 X 作為非正態變量。 我按照你的程序操作:
1. 分析->分佈
2. X 為“Y,列”,時間點為“By”
3.我單擊“分佈時間點”->“堆棧”
4. 對於每個時間點,我單擊紅色三角形和“連續擬合 -> Johnson SI”
5.我點擊“Fitted Johnson SI -> 保存轉換後的”
然後 JMP 生成“Johnson SI Transform X By Timepoint”列
所以,這就是重點:我嘗試運行位於 Test.jmp 左上角的腳本,但沒有任何反應。
請您解釋一下我在該腳本中做錯了什麼?
PS:我希望 Y 列代表 Johnson SI 變換後 X 的正態性。
非常感謝!
回复:正態分佈和變換它們通常應用於製造過程
回复:正態分佈和變換我是否正確地認為 Cp 和 Cpk 不適用於心理學領域,而是應用於工程、過程控制等領域?
回复:正態分佈和變換Cp/Cpk 分析完全受規格限支配。是的,您可以生成 3k 規格限制,但是,在如此有限的測量空間上使用它們在我看來只是產生數字的練習,而不是任何真正意義的東西。
回复:正態分佈和變換關於能力分析,我在您之前的一篇文章中看到了它的設置,當時您在 URL 中向我解釋了“如何將非數據轉換為正常數據的步驟”: https://community.jmp.com/t5/Discussions/Normal-Distributions-and-Transformations/td-p/28662/page/2?lightbox-message-images-53315=9889i529042A0AA61277A (第2頁)
看起來“能力分析”正在衡量一個系統是否能夠滿足統計過程控制中的一組規範或要求,不是嗎? 所以它不適用於我的情況。
回复:正態分佈和變換我會再問一次,但更直接地問,為什麼您認為需要對數據進行能力分析?
除此之外,考慮到腳本沒有為您提供任何可見的輸出,日誌中是否有任何消息表明有任何錯誤?
回复:正態分佈和變換1.雖然,我讀了能力分析“衡量過程與定義的規格限制的一致性”,但不幸的是我並沒有準確理解它在統計中的含義。
2. 因此,當創建新列“Johnson SI”時,我確實需要運行您的腳本。 (最初,我認為沒有必要運行它)。 無論如何,我嘗試運行它。 就我而言,數據表採用列格式。 我嘗試調整您的腳本,刪除創建數據表的第一部分,並插入列名稱而不是 PNP3 和“Johnson SI Transform PNP3”,並將其保存在左上角的框中(數據名稱下方)文件)在數據文件內。 當我運行它時,什麼也沒有發生。 (我不知道我是否正確保存了它,或者是否發生了與列名有關的任何解析錯誤,因為它們不在腳本中,而是在數據文件中)。 拜託,吉姆( @tx尼爾森),如何使用列格式數據文件運行您的腳本?
非常感謝!
回复:正態分佈和變換1. 您必須告訴我您想通過能力分析做什麼。我的背景是心理學和工程學。您可以使用 Cp/Cpk 來對功能進行一定程度的估計,但由於您在一組數據中使用它,而不是基於實際的規格限制,因此我會發現該統計數據有些可疑。
2、對數據進行變換的目的是將數據變換成服從正態分佈的分佈。這樣做的理由是,許多統計檢驗都是基於正態分佈的數據。Wilconon 統計量是一種非參數檢驗。它不需要正態分佈。
回复:正態分佈和變換我知道我需要運行你的腳本。 如果我不運行它,我可以看到該列已標準化,但是......
1. 在什麼情況下應該使用能力分析中的這些參數?
2. 當我在重複測量設計中運行非正態數據時,我可以通過非參數多重比較測試(例如,Wilcoxon 每對)的結果發現對我在各個時間點分析的變量有顯著影響。 然而,當我運行數據(哪一列已使用 Johnson SI 進行轉換)時,這種顯著影響在各個時間點上消失了。 那麼,我應該相信哪個結果呢?
回复:正態分佈和變換是的.....
回复:正態分佈和變換好的。 之後我應該運行您的腳本將 Johnson SI 專欄轉換為正常狀態嗎?
回复:正態分佈和變換從 Fitted Johnson SI 輪廓框中的紅色三角形中選擇“保存變換”。它將使用 Johnson SI 轉換創建新的數據列
回复:正態分佈和變換嗨吉姆( @tx尼爾森),
謝謝你的文章。 我讀了你建議的鏈接。 據我了解,我可以通過能力分析使用 Johnson SI 擬合分佈,在 <分佈類型> 上選擇“Johnson SI”,或者我可以運行擬合分佈,然後單擊紅色三角形能力分析,我可以找到規格限制為你建議的。
我同意您的觀點,傳統上,規格限值是根據測量數據的了解來確定的。 然而,我相信它適用於工程領域。 在心理學領域,很難了解這些限制,而只能了解收集到的數據。 這樣,我認為我應該運行 Johnson SI 的擬合分佈,然後單擊紅色三角形 ==> 設置 K 西格瑪的規格限制,選擇 K 值 = 3。
當我這樣做時,我得到了分位數西格瑪和約翰遜 SI 的擬合圖。 但是,我沒有得到數據的正常形狀,只有來自能力分析的參數(規格限制)。 請問下一步是什麼?
謝謝。
回复:正態分佈和變換1.我建議您訪問JMP網頁並閱讀分發平台上的文檔
JMP 網頁==支持==>在線文檔==基本分析==>分佈
它將讓您很好地了解該工具可以為您做什麼。您聲明您正在使用 JMP 10。最新的 JMP 版本是 14(即將發布),網絡上的文檔是 JMP 14。但是,您會發現,幾乎所有您在文檔中讀到的內容都可以在 JMP 10 中找到。
2. 數據分佈形狀(即正態分佈、Johnson SI 分佈、對數正態分佈等)的確定不是由能力分析確定的。事實上恰恰相反。分佈的形狀決定了使用什麼公式來計算數據的能力。
3. 你似乎不明白能力分析的局限性。傳統上,規格限值是根據測量數據的知識確定的。也就是說,如果您正在測量電氣元件的電壓,則零件的設計將規定,為了使零件正常工作,電壓需要介於規格下限 (LSL) 和規格上限 (USL) 之間。這些限制將用於確定過程的能力。
4. 在許多情況下,您想要從分發平台中得到的只是確定數據是否呈正態分佈。為什麼這很重要,是因為許多統計分析都假設數據呈正態分佈。所以對數據進行變換的目的就是將數據變成正態分佈,這樣統計檢驗才能提供更準確的結果。
回复:正態分佈和變換此外,我是 JMP 的初學者,這是我嘗試進行的第一次轉換,但它涉及重複測量設計,因此具有額外的複雜性。
我還沒有找到“能力分析”和“Fitted Johnson SI”之間的關係。 我的意思是如果我選擇《能力分析》首先,假設我正確輸入上述參數(我之前的帖子),那麼我將選擇”連續擬合==>全部”,選擇Johnson SI。 這樣,JMP 是否會考慮“能力分析”中輸入的信息來評估“擬合的 Johnson SI”?
PS:我的數據採用高(或長)格式:行由主題表示;第一列是時間點(T1、T2、...),第二列是 OUT。 當我單擊 Fitted Johnson SI==>Save Transformed 為每個時間點時,名為“Johnson SI Transform OUT by Timepoints”的同一列將使用這些轉換後的分數完成。 之後,我嘗試使用“選擇角色變量”框中的“Johnson SI Transform OUT by Timepoints”列和“構造模型效果”中的{時間點、主題和隨機、主題*時間點和隨機}在擬合模型中運行統計分析“ 盒子,但我無法得到任何相關結果。
我想我需要在獲得“Johnson SI Transform OUT by Timepoints”(轉換後的數據)列後立即運行您的腳本。 我對嗎?
這是我的下一個疑問:理解您描述為解決方案的過程。 我運行了你的例子,真是太棒了! 我需要學習如何“從轉換後的數據中獲取標準差,計算 1、2、3 等標準差的平均值之上和之下的值,然後將轉換反轉回原始數據。”。
非常感謝您的關注和寶貴的幫助!
回复:正態分佈和變換嗨吉姆( @tx尼爾森),非常感謝您的解釋!
我有以下問題:
1. 對於我的研究案例,稱為 OUT 的非正常結果包含不同的時間點(T1、T2...),因為我有重複測量設計。 因此,當我進行分析==>分佈時,我想我需要在“將選定的列轉換為角色”對話框中將該變量OUT 選擇為“Y,列”,並將主題間(例如,時間點)選擇為“按” ,不是嗎?
2. 如果我這樣做,那麼我將得到 OUT 與每個時間點的關係圖,例如 OUT 與 T1 的關係; OUT 與 T2 等。 在 JMP v.10 中,我需要按照您對每個圖的指示進行操作,因為它無法自動執行此操作。 沒關係。 我選擇“Distributions Timepoint=T1==>Stack”,所有圖都顯示在水平軸上。
疑問:我應該先選擇“能力分析”還是“連續擬合==>全部”? 我的意思是,當我選擇“能力分析”時,對話框會顯示輸入以下參數:“規格下限”、“目標”和“規格上限”,但我不知道必須定義哪些值。 它們是否基於箱線圖,排除異常值?
謝謝。
回复:正態分佈和變換分佈平台允許人們評估給定列的分佈,然後它可能有一種方法將數據轉換為正態分佈。以下是步驟
1. 運行分發平台,選擇所需的列。我的示例來自安裝 JMP 時安裝的半導體能力示例數據表。
分析==>分佈
2. 顯示輸出後,從
連續擬合==>全部

3. 平台將按順序為您提供最適合數據的分佈。在本例中,選擇 LogNormal。不幸的是,LogNormal 無法創建數據的轉換版本,因此取消選擇它並選擇 Johnson SI。
4. 現在,單擊“Fitted Johnson SI”的紅色三角形,然後選擇“保存轉換後的結果”

JMP 現已將數據的轉換版本保存到新列中,您現在可以將其用於分析
回复:正態分佈和變換嗨吉姆( @tx尼爾森),
我無法理解如何在 JMP 中將非正態數據轉換為正態分佈。 請您向我解釋一下原始非正態數據的步驟?
謝謝。
回复:正態分佈和變換這是一個完整的程序,它根據一組轉換後的數據的統計結果返回一個值。我希望這有幫助
Names Default to Here(1);
dt=New Table( "Test",
Add Rows( 100 ),
New Column("PNP3",
Numeric,
"Continuous",
Format( "Best", 10 ),
Set Values(
[130.378809500886, 132.736937590235, 136.831952164704, 136.969154239163,
136.622623419893, 137.480356512481, 138.094011176166, 142.10586919757,
134.750041237898, 129.719685093372, 136.520172900026, 134.778624216716,
136.991131754497, 140.420940666186, 143.257827228986, 132.213765487819,
144.671172276421, 134.703176752174, 136.744212473486, 137.187637284245,
139.788226018039, 139.372617199359, 136.112484488985, 142.809097034809,
137.799370430979, 138.482493403385, 135.236982575217, 136.251777781494,
130.768356509183, 138.248554728086, 139.77894292052, 134.25405167366,
147.680687116943, 131.351711991517, 132.84274608728, 129.925216236015,
133.47206414316, 143.339607103893, 145.341236691691, 139.200187547183,
142.775409342827, 140.276696563388, 130.623979847275, 140.899814366103,
136.839389290019, 137.239125319, 133.5265281641, 139.356927352471,
130.278640163464, 144.604061001983, 135.286715550332, 134.465744849174,
131.37612790407, 131.830655714309, 140.69724979219, 142.88152043774,
135.253839945611, 127.349434776131, 129.499730399113, 128.447533754611,
130.916853702805, 134.599575929218, 140.761701916093, 136.870661473033,
138.253066182015, 140.403627077024, 134.522643679098, 124.842978178703,
131.803059455053, 125.886786494664, 133.013566701611, 136.940299158936,
133.263913979648, 144.695171321015, 149.541020434399, 144.503845528521,
136.086324063453, 139.530943158798, 138.421460162451, 133.180943784947,
142.166796633818, 142.676541730822, 135.723943440339, 143.957996114985,
145.712158558794, 138.38937502716, 140.535304753392, 142.140619481175,
131.379414509756, 144.949299702964, 133.349854687882, 139.470639804255,
140.160558367008, 137.130662662612, 145.692632562344, 131.870848869966,
136.391733804566, 134.219740661271, 139.021827550389, 147.958038547157]
)
),
New Column( "Johnson Sl Transform PNP3",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Property( "Notes", "Fitted Johnson Sl" ),
Formula(
(Log( (:PNP3 - 44.6529505888426) / 1 ) * 15.3554291860315 + (
-69.5611150866502)) * 1
)
)
);
/***********************************************************************/
/* */
/* The getformula column retrieves the formula from the translation */
/* column and replaces the Original Column name in the formula with */
/* string "__value__". The value of this variable is what will be */
/* evaluated in the successive approximations done by the script. */
/* */
/***********************************************************************/
getformula = Function( {ColName, FormulaColName},
{ColName, FormulaColName, TheFormula, coloncolname},
//__value__ = .;
// Get the transformed data columns formula as a literal string
TheFormula=Column( FormulaColName ) << Get Formula ;
// Check to see that a formula was found
If( Is Empty( TheFormula ) == 1 ,
Dialog(
" The column specified as",
"the Transformed Column does",
" not contain a formula. ",
" ",
" Please rerun and select",
" the correct column"
);
Throw();
);
TheFormula=char( Column( FormulaColName ) << Get Formula );
// Get the actual name of the orignal column since
// the upper,lower case and spacing is critical in determining
// where in the formula the column name actually occurs
ColName = Column( ColName ) << Get Name;
// Determine if the reference to the column name in the
// formula is a simple :colname reference or a complex
// reference :Name(\!"colname\!")
// If the column name isn't found set the return code to -1
If(
Contains( TheFormula, ":" || ColName ), ColonColName = ":" || ColName, // Else
Contains( TheFormula, ":Name(\!"" || ColName || "\!")" ), ColonColName = ":Name(\!"" || ColName || "\!")", // Else
rc = -1
);
// Replace all of the column references in the formula with
// the string "(__value__)" so that when the formula is
// evaluated later, it will take the then value of the memory
// variable called __value__ and use it in the formula
If( Contains( TheFormula, ColonColName ) > 0,
While( Contains( TheFormula, ColonColName ) > 0, TheFormula = Munger( TheFormula, 1, ColonColName, "(__Value__)" ) ),
Dialog(
" The column specified as",
"the Transformed Column does",
" not contain a reference",
" to the original column.",
" in it's formula.",
" ",
" Please rerun and select",
" the correct column"
);
Throw();
);
TheFormula;
);
/***********************************************************************/
/* */
/* The gettrans function evaluates the formula in the transformed */
/* and converts the formula into a generic form for repeated use in */
/* running of the script. */
/* */
/***********************************************************************/
gettrans = Function( {ColName, FormulaColName, TheTarget, Theformula},
//colname="PNP3";formulacolname="Johnson Sl Transform PNP3"; Thetarget=johnsonmean;theformula=myformula;
{ColName, FormulaColName, TheFormula, High, Low, TheTarget, TheMax, Themin, __value__},
// The program uses successive approximations to determine the different
// parametrics. The way it works is that it calculates the needed parameter
// such as Mean, or Standard Deviation, and then by using successive
// approximations from the original column's values, and passing those
// values through the columns formula, when the approximation value matches
// the calculated value from the transformed column, the retransformed value
// has been found
// Set the extreem values
High = Col Maximum( If( Excluded( Row State( Empty() ) ) == 0, Column( ColName ), . ) );
Low = Col Minimum( If( Excluded( Row State( Empty() ) ) == 0, Column( ColName ), . ) );
// Make a guess at the first value
__value__ = Mean( High, Low );
// Iterate the guessing for up to 100 times, adjusting by 1/2 on each loop
For( i = 1, i <= 100, i++,
TheResult = Eval( Parse( theformula ) );
If(
TheResult > TheTarget, High = __value__,
TheResult < TheTarget, Low = __value__,
Break()
);
If( High == Low, Break() );
__value__ = Mean( High, Low );
);
__value__; // Expose the return value
); // End of function gettrans
myFormula = getformula( "PNP3","Johnson Sl Transform PNP3" );
JohnsonMean = Col Mean(dt:Johnson Sl Transform PNP3);
show(JohnsonMean,colMean(:PNP3),Gettrans("PNP3","Johnson Sl Transform PNP3",JohnsonMean,myFormula));
回复:正態分佈和變換感謝您分享這個。
我只是一個腳本初學者,所以目前有點太複雜,我不知道如何使用它!
回复:正態分佈和變換這是我從正在運行的系統中提取的一個函數,它使用連續近似來獲取解析值
/***********************************************************************/
/* */
/* The getformula column retrieves the formula from the translation */
/* column and replaces the Original Column name in the formula with */
/* string "__value__". The value of this variable is what will be */
/* evaluated in the successive approximations done by the script. */
/* */
/***********************************************************************/
getformula = Function( {ColName, FormulaColName},
{ColName, FormulaColName, TheFormula, coloncolname},
//__value__ = .;
// Get the transformed data columns formula as a literal string
TheFormula=Column( FormulaColName ) << Get Formula ;
// Check to see that a formula was found
If( Is Empty( TheFormula ) == 1 ,
Dialog(
" The column specified as",
"the Transformed Column does",
" not contain a formula. ",
" ",
" Please rerun and select",
" the correct column"
);
Throw();
);
TheFormula=char( Column( FormulaColName ) << Get Formula );
// Get the actual name of the orignal column since
// the upper,lower case and spacing is critical in determining
// where in the formula the column name actually occurs
ColName = Column( ColName ) << Get Name;
// Determine if the reference to the column name in the
// formula is a simple :colname reference or a complex
// reference :Name(\!"colname\!")
// If the column name isn't found set the return code to -1
If(
Contains( TheFormula, ":" || ColName ), ColonColName = ":" || ColName, // Else
Contains( TheFormula, ":Name(\!"" || ColName || "\!")" ), ColonColName = ":Name(\!"" || ColName || "\!")", // Else
rc = -1
);
// Replace all of the column references in the formula with
// the string "(__value__)" so that when the formula is
// evaluated later, it will take the then value of the memory
// variable called __value__ and use it in the formula
If( Contains( TheFormula, ColonColName ) > 0,
While( Contains( TheFormula, ColonColName ) > 0, TheFormula = Munger( TheFormula, 1, ColonColName, "(__Value__)" ) ),
Dialog(
" The column specified as",
"the Transformed Column does",
" not contain a reference",
" to the original column.",
" in it's formula.",
" ",
" Please rerun and select",
" the correct column"
);
Throw();
);
TheFormula;
);
。
/***********************************************************************/
/* */
/* The gettrans function evaluates the formula in the transformed */
/* and converts the formula into a generic form for repeated use in */
/* running of the script. */
/* */
/***********************************************************************/
gettrans = Function( {ColName, FormulaColName, TheTarget, Theformula},
{ColName, FormulaColName, TheFormula, High, Low, TheTarget, TheMax, Themin, __value__},
// The program uses successive approximations to determine the different
// parametrics. The way it works is that it calculates the needed parameter
// such as Mean, or Standard Deviation, and then by using successive
// approximations from the original column's values, and passing those
// values through the columns formula, when the approximation value matches
// the calculated value from the transformed column, the retransformed value
// has been found
// Set the extreem values
High = Col Maximum( If( Excluded( Row State( Empty() ) ) == 0, Column( ColName ), . ) );
Low = Col Minimum( If( Excluded( Row State( Empty() ) ) == 0, Column( ColName ), . ) );
Highm = 999999999999999999999999;
Lowm = -999999999999999999999999;
If( Highm > High,
High = Highm
);
If( Lowm < Low, low = lowm );
// Make a guess at the first value
__value__ = Mean( High, Low );
// Iterate the guessing for up to 100 times, adjusting by 1/2 on each loop
For( i = 1, i <= 100, i++,
TheResult = Eval( Parse( theformula ) );
If(
TheResult > TheTarget, High = __value__,
TheResult < TheTarget, Low = __value__,
Break()
);
If( High == Low, Break() );
__value__ = Mean( High, Low );
);
__value__; // Expose the return value
); // End of function gettrans
回复:正態分佈和變換嗨吉姆,
我有同樣的問題。 我對一些 Johnson Si 轉換後的數據進行了建模,並得到了一個預測模型。 我嘗試使用逆函數將預測數據轉換回來,但它不起作用。 您能否提供有關編寫腳本來執行此操作的更多指導? 在對 DOE 實驗的響應進行建模時,我不斷遇到這些類型的分佈,因此了解如何將數據傳回非常有用。
非常感謝!
克里斯特爾
回复:正態分佈和變換我想我沒有抓住你問題的重點。 如果您想根據概率計算“帶”,那麼這些帶的位置將根據您擁有的分佈類型而有所不同。 你的號碼68-95-99.7 不是標準差,而是與基於正態分佈平均值的 1、2、3 個標準差距離的“帶”相關的概率。 如果沒有正態分佈,問題不在於標準差的計算,而在於概率的轉換。 如果您想要 +/- 3 個標準差帶,那麼您就假設分佈是正態的,或者至少是對稱的。 根據您想要執行的操作,您可以計算不對稱帶(JMP 不僅具有正態分佈的概率分佈,還具有所有分佈的概率分佈),或者您必須執行轉換以標準化數據(然後在任何時候都進行反向轉換)您想轉換回自然指標)。 我的偏好是使用不對稱帶並使用 JOHNSON SU 函數來計算它們。
網上幫助
回复:正態分佈和變換謝謝你的回复吉姆! 我會嘗試一下。回复:正態分佈和變換這就是我所做的。 為了對原始數據設置限制,根據轉換後的數據值,我從轉換後的數據中獲取標準差,計算 1、2、3 等標準差的平均值之上和之下的值,然後反轉轉換回原始數據。 在某些情況下,例如 Johnson SU,沒有一種簡單的方法可以將值轉換回來,然後我所做的就是運行一個小腳本,通過原始轉換傳遞一個值,檢查目標 std 的值,然後迭代該值直到有匹配項。 然後,您在原始數據中找到了值,轉換後會產生轉換後的值目標值。 請記住,執行此操作時,原始數據中高於平均值和低於平均值的距離將不同。回复:正態分佈和變換哦,不過,我認為這對標準差確實很重要。 例如,68-95-99.7(三個標準差)規則用於查找正態分佈中均值周圍區域內的值。 但是,如果我的數據不正常,那麼使用它可能沒有意義。 例如,如果我的晶體管的導通電阻不正常,並且我想查看與平均值相差 3 個標準差的值,我可能會得到一個負值或一個非常低的值,實際上沒有任何意義。
抱歉,如果我感到困惑或誤解了某些東西,我從大學開始就開始重新學習統計學!
回复:正態分佈和變換謝謝你,我明白它是怎麼做到的。 現在我看到數據是正常的,我怎樣才能用它來找到標準差呢? 它在摘要統計中表示一個基於轉換有意義的值,但我想知道原始數據的標準差是多少。 也許我不明白轉換數據的目的。
回复:正態分佈和變換娜塔莉
方差和標準差的公式不對分佈的形狀做出任何假設。 這只是代數(就像平均值的計算不對分佈類型做出任何假設一樣)。
回复:正態分佈和變換娜塔莉,
您應該能夠簡單地將轉換保存到新列,然後在該列上運行分佈。
吉姆
回覆:常態分佈與變換你好大衛和大家,
我是 JMP 新手,我想知道資料轉換的問題。
與資料轉換相比,如果我們使用資料擬合來獲得常態分佈,有哪些優點/缺點?
另外,在轉換後,如果我沒有良好的 p 值,我是否應該考慮我的轉換?
謝謝
回覆:常態分佈與變換Kowa,首先歡迎來到社區。您的疑問在此論壇中無法充分解答。我建議你從這裡開始:
https://www.ime.usp.br/~abe/lista/pdfQWaCMboK68.pdf
進行轉型有兩個主要原因:
1. 滿足平均值為 0 且一致變異數 (NID(0,變異) 的常態獨立分佈殘差的定量假設。如果不滿足這些假設,那麼您應該質疑所提出的模型。
2. Box 博士多年前告訴我,轉型的唯一原因是簡化模型…本質上是讓模型更可用。