我有一個多元線性迴歸,如下所示,包含互動條款,其中一些條款是因子變量(季節,月份,假日,工作日,weathersit)轉換後的二次變量和因子變量之間的多重線性迴歸互動
regwithint=lm(casual~season:temp+season:month+year:temp+
month:temp+holiday:temp+weekday:hum+season+
month+holiday+weekday+weathersit+temp+windspeed
,data=training)
然而,變量臨時和風速轉化到(臨時^ 3)和(風速^ 2)。在交互項
尋找,我有溫度之間的相互作用:平日 其中溫度是臨時^ 3和工作日是因子變量。
我知道大多數情況下,我應該使用我(溫度^ 3),但確實它與因子變量配對的意思是我應該使用聚(溫度,3,原料= T)事實代替?
謝謝。
這個問題似乎很奇怪熟悉。 –