_覓 | 覦覈襦 | 豕蠏手 | 殊螳 | 譯殊碁 |
FrontPage › れ蠏覿
|
|
[edit]
1 SQL Server 2008 一危 覦 ODBC誤 #--drop table 煙 create table 煙 ( 糾 int , 蟆一 int , int ); insert 煙 values (85, 3, 65) , (74, 7, 50) , (76, 5, 55) , (90, 1, 65) , (85, 3, 55) , (87, 3, 70) , (94, 1, 65) , (98, 2, 70) , (81, 4, 55) , (91, 2, 70) , (76, 3, 50) , (74, 4, 55); ODBC誤 . 一危 覲 企 sql2008襦 .
[edit]
2 R 伎 れ蠏覿 #> # SQL Server 2008 磯 R貊: れ蠏覿 > library("TSodbc") > con <-odbcConnect(dsn = "sql2008") > options(TSconnection = con) > #襷 一危郁 襷る select * from 煙 tablesample(1 percent) 螳 襷 . > result = try(dbGetQuery(con, paste("SELECT 糾, , 蟆一 FROM 煙"))) > model = lm(糾 ~ + 蟆一, result) > summary(model) Call: lm(formula = 糾 ~ + 蟆一, data = result) Residuals: Min 1Q Median 3Q Max -5.348 -2.274 -1.276 2.954 5.673 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 53.6832 14.1808 3.786 0.00431 ** 0.6073 0.1984 3.062 0.01353 * 蟆一 -1.9346 0.9144 -2.116 0.06348 . --- Signif. codes: 0 *** 0.001 ** 0.01 * 0.05 . 0.1 1 Residual standard error: 3.721 on 9 degrees of freedom Multiple R-squared: 0.8289, Adjusted R-squared: 0.7909 F-statistic: 21.8 on 2 and 9 DF, p-value: 0.0003544 > anova(model) #, 螻燕, 螻燕蠏 F螳, Analysis of Variance Table Response: 糾 Df Sum Sq Mean Sq F value Pr(>F) 1 541.69 541.69 39.1297 0.0001487 *** 蟆一 1 61.97 61.97 4.4762 0.0634803 . Residuals 9 124.59 13.84 --- Signif. codes: 0 *** 0.001 ** 0.01 * 0.05 . 0.1 1 > dbDisconnect(con) [1] TRUE > options(TSconnection = NULL) > odbcCloseAll() > [edit]
3 蟆郁骸 伎 #> summary(model) Call: lm(formula = 糾 ~ + 蟆一, data = result) Residuals: Min 1Q Median 3Q Max -5.348 -2.274 -1.276 2.954 5.673 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 53.6832 14.1808 3.786 0.00431 ** 0.6073 0.1984 3.062 0.01353 * 蟆一 -1.9346 0.9144 -2.116 0.06348 . --- Signif. codes: 0 *** 0.001 ** 0.01 * 0.05 . 0.1 1 Residual standard error: 3.721 on 9 degrees of freedom Multiple R-squared: 0.8289, Adjusted R-squared: 0.7909 F-statistic: 21.8 on 2 and 9 DF, p-value: 0.0003544
> anova(model) #, 螻燕, 螻燕蠏 F螳, Analysis of Variance Table Response: 糾 Df Sum Sq Mean Sq F value Pr(>F) 1 541.69 541.69 39.1297 0.0001487 *** 蟆一 1 61.97 61.97 4.4762 0.0634803 . Residuals 9 124.59 13.84 --- Signif. codes: 0 *** 0.001 ** 0.01 * 0.05 . 0.1 1
[edit]
4 れ螻旧(Multicollinearity) #れ螻旧(Multicollinearity) ル 螳 蟯螳 襯 襷. 讀, 覲 x襯 觜手 蠏覿 x 蟯螳 覓 R螳 譟磯 蟆 る 蟆 襷. 讀, 譬覲 譟磯 蟯螻. 讀, "螳 襯 襷 葛" "蟲襷 螳 襷 螻螳れ 襷れ觜譴 " 襦 煙朱 . れ螻旧 覲螳 蟯蟯螻螳 るジ 覲覲企 麹 蟆曙一 . 覲企 覦覯 螻給郁骸 蟯螻覓語 螻給壱 覿覿 谿瑚.
[edit]
5 fRegression-package ##library(fRegression)
#regFit(formula, data, use = "lm", ...) #use = c("lm", "rlm", "glm","gam", "ppr", "nnet", "polymars") model = rlm(NetAMT ~ Playtime + LoginCnt, data, use = "lm")
鏤
|
殊 伎企る 蟆 譬 豺伎螻 譬 襷 螳蟆 覃 襷 覯朱る 蟆. |