Sign in with Microsoft
Sign in or create an account.
Hello,
Select a different account.
You have multiple accounts
Choose the account you want to sign in with.

執行的 rxLogit() 函式應該可以預期等於 glm() 和 rxGlm() 呼叫在相同的資料超過預期,可能會傳回不同的結果。

在下列的簡單範例中,會比對傳回的 glm() 和 rxGlm() 的係數,但所傳回的 rxLogit() 可能會不同。

 myFormula <- as.formula("y ~ x1 + x2 + x3 ")model <- rxLogit( myFormula, data = sampleData)
modelGLM <- glm(myFormula,family=binomial(logit),data=sampleData)
modelrxGLM <- rxGlm(myFormula,family=binomial(logit), data=sampleData)

關鍵是要設定 initialValues = rxLogit() 中的值為 NA。

為 rxLogit,initialValues 的預設值為 NULL。從 rxLogit 的說明:"的起始值將進行評估的線性迴歸為基礎。這樣可以加快大幅在許多情況下的交集。如果模型無法收斂使用這些值,估計是自動重新啟動的起始值為使用 [NA] 選項 」。如果值為 NA,"參數的起始值則會計算加權的最小平步驟 」。為 rxGlm,initialValues,預設值為 NA

所以如果意外不同 rxLogit 的結果,它可能是模型沒有收斂與 initialValues = NULL,則函數會傳回不同的結果。當執行此範例,使用 initalValues = rxLogit(),所有的結果相符項目中的值為 NA。

Need more help?

Want more options?

探索訂閱權益、瀏覽訓練課程、瞭解如何保護您的裝置等等。

社群可協助您詢問並回答問題、提供意見反應,以及聆聽來自具有豐富知識的專家意見。

Was this information helpful?

How satisfied are you with the translation quality?
What affected your experience?
By pressing submit, your feedback will be used to improve Microsoft products and services. Your IT admin will be able to collect this data. Privacy Statement.

Thank you for your feedback!

×