




版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡介
1、課程安排回歸模型與相關(guān)分析方差分析屬性數(shù)據(jù)分析生存數(shù)據(jù)分析實(shí)驗(yàn)設(shè)計(jì)全基因組關(guān)聯(lián)分析課程安排 第1,2,3,5次Experimental Design and Data Analysis for Biologists Gerry P. Quinn and Michael J. Keough Cambridge University Press, Cambridge, 2019.2.Biostatistical Design and Analysis Using R: A Practical Guide Murray LoganWiley-Blackwell, Chichester, West S
2、ussex, 2019.第4次3. Survival Analysis: A Self-Learning Text, 2nd edition David G. Kleinbaum and Mitchel Klein, Springer, 2019第6次ABEL tutorialYurii Aulchenko, 2019參考書 第1,2,3,5次參考書回歸分析和相關(guān)分析生物統(tǒng)計(jì)學(xué)研究所 張洪線性回歸1.1回歸直線1.2參數(shù)估計(jì)方法:最小二乘估計(jì)1.3 參數(shù)推斷:F-檢驗(yàn)、t-檢驗(yàn)、區(qū)間估計(jì)1.4 回歸模型的診斷:殘差分析1.5 多重線性回歸1.6 Box-Cox變換2. 相關(guān)分析2.1 Pear
3、son相關(guān)系數(shù) 2.2 相關(guān)系數(shù)的統(tǒng)計(jì)推斷:z-檢驗(yàn)、區(qū)間估計(jì)2.3 偏相關(guān)系數(shù)2.4 秩相關(guān)與多重相關(guān)3 實(shí)例分析回歸分析和相關(guān)分析與函數(shù)關(guān)系的區(qū)別:同一身高可以體重不同,體重隨身高增加的關(guān)系不是嚴(yán)格成立,只是有這種趨勢總的趨勢:隨著身高增加,體重也跟著增加為什么?因?yàn)樯砀咧荒芙忉岓w重的一部分原因,還有其他未被考慮的因素,如飲食、地域、人種等與函數(shù)關(guān)系的區(qū)別:總的趨勢:為什么?線性回歸目標(biāo):建立一個(gè)連續(xù)型因變量X(身高)與自變量Y(體重)之間的關(guān)系因變量自變量隨機(jī)誤差: 未被身高解釋的部分: 飲食、種族、地域截距斜率: (1) 0 正相關(guān) (2) fit = lm(weightheight,
4、 data=dat); print(fit);Call:lm(formula = weight height, data = dat)Coefficients:(Intercept) height -88.6774 0.8902 最小二乘估計(jì)dat 是一個(gè)data frame,有兩個(gè)變量:height 和 weightR中線性模型擬合(2) 最小一乘估計(jì)估計(jì)方法R代碼輸出的結(jié)果 print(fit$coef); Coefficients:(Intercept) x -88.6774 0.8902幾個(gè)有用的函數(shù):summary、names觀測值: fit = lm(weightheight, 1
5、.3 參數(shù)推斷預(yù)測值:總平方和SStot自由度=n-1回歸平方和SSreg自由度=1殘差平方和SSerr自由度=n-2回歸平方和占總平方和的比重越大,則X能解釋Y的部分越大!回歸方程越好! summary(fit)$r.squared1 0.693347方差分解度量方法1.3 參數(shù)推斷總平方和SStot回歸平方和SSreg殘差平F檢驗(yàn)適用條件:誤差e1,en獨(dú)立同分布,服從正態(tài)分布。 anova(fit)Analysis of Variance TableResponse: y Df Sum Sq Mean Sq F value Pr(F) x 1 523.71 523.71 29.393 0
6、.0001168 *Residuals 13 231.63 17.82 -Signif. codes: 0 * 0.001 * 0.01 * 0.05 . 0.自由度平方和平均平方FP-值如果誤差獨(dú)立同分布服從正態(tài)分布,則零假設(shè)成立時(shí),F(xiàn)服從自由度為1和n-2的F分布方差分析表回歸部分殘差部分F統(tǒng)計(jì)量F檢驗(yàn)適用條件:誤差e1,en獨(dú)立同分布,服從正態(tài)分布。t 檢驗(yàn): 回歸系數(shù)的顯著性檢驗(yàn)零假設(shè):回歸系數(shù)等于0 summary(fit)$coef Estimate Std. Error t value Pr(|t|)(Intercept) -88.6774259 28.3051787 -3.13
7、2905 0.0079283231x 0.8901553 0.1641884 5.421548 0.0001167570參數(shù)估計(jì)標(biāo)準(zhǔn)差T 統(tǒng)計(jì)量p-值零假設(shè)成立且誤差獨(dú)立同分布且服從正態(tài)分布時(shí),T 服從自由度為n-2的t分布tn-2適用條件:誤差 e 獨(dú)立同分布服從正態(tài)分布樣本量不太小時(shí),誤差分布偏離正態(tài)分布不是很大時(shí)仍適用,即對正態(tài)性假設(shè)不是很敏感當(dāng)樣本量大時(shí)總是適用的,因?yàn)榇藭r(shí) T 依分布收斂于標(biāo)準(zhǔn)正態(tài)分布與tn-2接近(不管正態(tài)假設(shè)成立與否)。t 檢驗(yàn): 回歸系數(shù)的顯著性檢驗(yàn) summary(fit)區(qū)間估計(jì) confint(fit) 2.5% 97.5% (Intercept) -14
8、9.8270467 -27.527805x 0.5354479 1.244863置信系數(shù) 的雙側(cè)置信區(qū)間, 常取為0.05結(jié)論: 的95%置信區(qū)間是 (0.5354479, 1.244863)落在(0.5354479, 1.244863)的概率是95%?錯(cuò)!樣本的兩重性:抽樣前是隨機(jī)的,抽樣后是非隨機(jī)的。區(qū)間估計(jì) confint(fit)置信系數(shù) 1.4 回歸模型的診斷:殘差分析誤差項(xiàng)獨(dú)立同分布且服從正態(tài)分布嗎?有沒有需要剔除的 強(qiáng)影響點(diǎn)?par(mfrow=c(2,2);plot(fit);滿足下述條件則 回歸模型適用:殘差沒有明顯的趨勢殘差的QQ圖表明正態(tài)性成立Cook距離1 且lever
9、age1或 leverage2p/n為強(qiáng)影響點(diǎn)殘差散點(diǎn)圖發(fā)現(xiàn)并剔除殘差大的強(qiáng)影響點(diǎn)有些強(qiáng)影響點(diǎn)殘差不大,不應(yīng)被提出有些殘差大的點(diǎn)不是強(qiáng)影響點(diǎn),剔除與否關(guān)系不大 dat1 = rbind(dat,c(180,200); fit1 = lm(weightheight,data=dat1); fit1.hat = lm.influence(fit1)$hat; influence1 = cbind(dat1,lev=fit1.hat); print(influence1fit1.hat2/n,);杠桿(leverage),由“帽子矩陣”計(jì)算得到,其值越大對回歸方程的影響力越大。 height wei
10、ght lev1 180 68 0.10842272 160 51 0.249673011 165 57 0.135888012 185 76 0.203897514 164 58 0.154459816 190 200 0.3516872第16個(gè)觀測值杠桿很大發(fā)現(xiàn)并剔除殘差大的強(qiáng)影響點(diǎn) dat1 = rbind(da穩(wěn)健回歸法:最小一乘估計(jì) (最小絕對偏差,LAD)黑線為LAD回歸直線 require(quantreg); fit1.lad = rq(weightheight,data=dat1);警告信息:In rq.fit.br(x, y, tau = tau, .) : Solutio
11、n may be nonunique lines(dat1$height, fit1.lad$coef1+ fit1.lad$coef2*dat1$height, type=l,lwd=2,col=black);穩(wěn)健回歸法:最小一乘估計(jì) (最小絕對偏差,LAD)黑線為LA最小二乘估計(jì)最小一乘估計(jì)優(yōu)點(diǎn)計(jì)算簡單解唯一最有效(模型假設(shè)成立時(shí))可給出方差分析表對模型假定穩(wěn)健對奇異值不敏感缺點(diǎn)對正態(tài)性假定高要求方差一致性對于奇異值敏感計(jì)算復(fù)雜度較高解可能不唯一會(huì)損失一些效率目前的方差分析不成熟沒有一個(gè)方法可以完全打敗其他的方法,需要在實(shí)踐中根據(jù)具體情況選擇最合適的方法最小二乘估計(jì)最小一乘估計(jì)優(yōu)點(diǎn)計(jì)算簡單
12、對模型假定穩(wěn)健缺點(diǎn)對正態(tài)1.5 多重線性回歸 多個(gè)自變量 X1,Xpdat = data.frame(y,x1,x2,x3,x4);fit = lm(y.4, data=dat);fit.aic = step (fit);變量過多:降低估計(jì)的效率,可能使得那些真正對因變量有貢獻(xiàn)的 自變量的效應(yīng)不顯著,過度擬合也會(huì)降低預(yù)測的準(zhǔn)確性(overfit).變量選擇:將真正有對因變量有貢獻(xiàn)的自變 量選出來。準(zhǔn)則 Akaike Information Criterion (AIC)準(zhǔn)則;Bayesian Information Criterion (BIC)準(zhǔn)則;篩選方法:逐步法理論上可以選出任意階交互效
13、應(yīng),階數(shù)小于等于自變量的個(gè)數(shù)。自變量越多,擬合的殘差越小1.5 多重線性回歸 多個(gè)自變量 X1,Xpdat = 1.6 Box-Cox變換通過殘差診斷發(fā)現(xiàn)殘差不太正態(tài)時(shí),可以考慮進(jìn)行Box-Cox變換(power transformation),使得因變量變換后進(jìn)行回歸分析的殘差更正態(tài),統(tǒng)計(jì)分析結(jié)果更可信。require(MASS);bc = boxcox(weight., data=dat, lambda=seq(-1,2,0.1);lambda = bc$xwhich.max(bc$y);# install.packages(TeachingDemos);require(TeachingD
14、emos);weight.bc = bct(dat$weight,lambda); 用變換后的因變量代替原有因變量給出不同 lambda值對應(yīng)的似然值最大似然值對應(yīng)的lambdaBox-Cox變換1.6 Box-Cox變換通過殘差診斷發(fā)現(xiàn)殘差不太正態(tài)時(shí),可2. 相關(guān)分析2.1 Pearson相關(guān)系數(shù)2.2 相關(guān)系數(shù)的統(tǒng)計(jì)推斷2.3 偏相關(guān)系數(shù)2.4 秩相關(guān)、多重相關(guān)2. 相關(guān)分析2.1 Pearson相關(guān)系數(shù)X 與 Y 的Pearson 相關(guān)系數(shù)Pearson相關(guān)系數(shù)與回歸系數(shù)的關(guān)系2.1 Pearson 相關(guān)系數(shù)樣本Pearson 相關(guān)系數(shù)度量兩個(gè)變量的相關(guān)程度X 與 Y 的Pearson
15、相關(guān)系數(shù)Pearson相關(guān)系數(shù)2.2 相關(guān)系數(shù)的統(tǒng)計(jì)推斷零假設(shè):檢驗(yàn)統(tǒng)計(jì)量(Fisher 變換):z 漸近正態(tài) cortest = cor.test( dat$height,dat$weight, conf.level=0.95, alternative=two.sided); print(cortest$estimate); # rcor 0.8326746 print(cortest$statistic); # z t 5.421548alternative可選項(xiàng):”two.sided”, “l(fā)ess”, “greater” print(cortest$p.value); # p-值1 0
16、.0001167570 print(cortest$); # 置信區(qū)間1 0.5587423 0.9427914attr(,conf.level)1 0.952.2 相關(guān)系數(shù)的統(tǒng)計(jì)推斷零假設(shè):檢驗(yàn)統(tǒng)計(jì)量(Fisher 2.3 偏相關(guān)系數(shù)控制分層等混雜因素的影響R代碼下載:/pcor.htmlpcor.test(x, y, z) 控制Z(可以是多維的)的影響下估計(jì)/檢驗(yàn)X與Y的相關(guān)系數(shù)2.3 偏相關(guān)系數(shù)控制分層等混雜因素的影響R代碼下載:yil2.4 秩相關(guān)、多重相關(guān)秩相關(guān)系數(shù):X與Y的Spearman秩(大小次序)的Pearson相關(guān)系數(shù) 不需要
17、正態(tài)性假設(shè)對奇異值不敏感Pearson相關(guān)系數(shù)的統(tǒng)計(jì)推斷基于正態(tài)性假設(shè),且對奇異值敏感 cortest.spearman = cor.test(dat$height,dat$weight, method=spearman);警告信息:In cor.test.default(dat$height, dat$weight, method = spearman) : 無法給連結(jié)計(jì)算精確p值 print(cortest.spearman$estimate); rho 0.7791741 print(cortest.spearman$statistic); S 123.6625 print(cortes
18、t.spearman$p.value); 1 0.0006173036 秩相關(guān)2.4 秩相關(guān)、多重相關(guān)秩相關(guān)系數(shù):X與Y的Spearmanmul.fit = lm(ca+b);cor.mul = cor.test(c, fitted(mul.fit);多重相關(guān) Y (一元的) 與 X (可以是多元的)的多重相關(guān)系數(shù) (復(fù)相關(guān)系數(shù))定義為因變量 Y 與其基于 X 的預(yù)測值 的相關(guān)系數(shù),X 是一元時(shí)退化為 X 與 Y 的相關(guān)系數(shù)乘以一個(gè)符號。 c與(a,b)的復(fù)相關(guān)系數(shù)及檢驗(yàn)X與Y是向量mul.fit = lm(ca+b);多重相關(guān) Y (一元3 實(shí)例分析Paruelo and Lauenroth
19、 (2019) investigated the geographic (latitude and longitude) and climatic (mean annual temperature, means annual precipitation and the proportion of the mean annual precipitation that fall in the periods June-August and December-February) patterns in the relative abundance of C3 plants throughout 73
20、 sites across North America.自變量: MAP, MAT, JJAMAP, DJFMAP (氣候), LONG , LAT (地理)因變量:C3 例13 實(shí)例分析Paruelo and Lauenroth (2大部分自變量基本服從正態(tài)分布,但是因變量正(右)偏scatter plot+ box plotC3與MAP及LAT相關(guān)性大大部分自變量基本服從正態(tài)分布,但是因變量正(右)偏scattdat - read.csv(paruelo.csv);require(car);scatterplot.matrix(C3 + MAP + MAT + JJAMAP + DJFMA
21、P + LONG + LAT, data = dat, diag=boxplot);Indescriptive statistics, abox plotorboxplot(also known as abox-and-whisker diagramorplot) is a convenient way of graphically depicting groups of numerical data through theirfive-number summaries. A boxplot may also indicate which observations, if any, might
22、 be consideredoutliers. The spacings between the different parts of the box help indicate the degree ofdispersion(spread) andskewnessin the data.圖例dat print(cor(dat, 3:8); MAP MAT JJAMAP DJFMAP LONG LATMAP 1.0000000 0.355090766 0.11225905 -0.404512409 -0.73368703 -0.24650582MAT 0.3550908 1.000000000
23、 -0.08077131 0.001478037 -0.21310910 -0.83859041JJAMAP 0.1122590 -0.080771307 1.00000000 -0.791540381 -0.49155774 0.07417497DJFMAP -0.4045124 0.001478037 -0.79154038 1.000000000 0.77074399 -0.06512485LONG -0.7336870 -0.213109100 -0.49155774 0.770743994 1.00000000 0.09655281LAT -0.2465058 -0.83859041
24、3 0.07417497 -0.065124848 0.09655281 1.00000000 print(cor(dat, 3:8);Paruelo & Lauenroth (2019) separated the predictors into two groups for their analyses. One group included LAT and LONG and the other included MAP, MAT, JJAMAP and DJFMAP.情形一:自變量只包含LAT, LONG模型1:C3 LAT + LONG 模型2:C3 LAT + LONG + LAT
25、* LONG情形二:自變量包含所有變量(變量選擇)Paruelo & Lauenroth (2019) sep回歸分析與相關(guān)分析精選課件dat$cLAT = scale(dat$LAT);dat$cLONG = scale(dat$LONG);fit1 = lm(log10(C3 + 0.1) cLAT + cLONG, data = dat);fit2 = lm(log10(C3 + 0.1) cLAT * cLONG, data = dat);require(MASS);par(mfrow=c(1,2);qqnorm(stdres(fit1),main=不含交互效應(yīng)的殘差QQ圖,xlab=
26、標(biāo)準(zhǔn)正態(tài)分布分位數(shù), ylab=殘差分位數(shù));qqline(stdres(fit1), col = 2);qqnorm(stdres(fit2),main=含交互效應(yīng)的殘差QQ圖,xlab=標(biāo)準(zhǔn)正態(tài)分布分位數(shù), ylab=殘差分位數(shù));qqline(stdres(fit2), col = 2);以上為個(gè)性化作圖,可以控制顏色、x軸與y軸等。也可以用 plot(fit1,which=2); plot(fit2,which=2)代替,但是無法控制作圖參數(shù)。dat$cLAT = scale(dat$LAT);以上為個(gè)正態(tài)性基本成立方差齊次性不成立沒有強(qiáng)影響點(diǎn)par(mfrow=c(2,2);plot
27、(fit2);正態(tài)性基本成立par(mfrow=c(2,2);為什么要用 scale(標(biāo)準(zhǔn)化:減去平均值后再除以標(biāo)準(zhǔn)差)? fit0=lm(log10(C3 + 0.1) LONG * LAT, data = dat); print(1/vif(fit0); # 容忍度:小于0.2認(rèn)為共線性性大 LONG LAT LONG:LAT 0.014973575 0.003249445 0.002494144 fit2 = lm(log10(C3 + 0.1) cLAT * cLONG, data = dat); print(1/vif(fit2); # 容忍度:現(xiàn)在容忍度變大多了 cLAT cLON
28、G cLAT:cLONG 0.8268942 0.9799097 0.8195915 tmp1 = data.frame(LAT=dat$LAT,LONG=dat$LONG,LAT.LONG=dat$LAT*dat$LONG); tmp2 = data.frame(cLAT=dat$cLAT,cLONG=dat$cLONG,cLAT.cLONG=dat$cLAT*dat$cLONG); print(cor(tmp1); LAT LONG LAT.LONGLAT 1.00000000 0.09655281 0.9137741LONG 0.09655281 1.00000000 0.4894850
29、LAT.LONG 0.91377412 0.48948498 1.0000000 print(cor(tmp2); cLAT cLONG cLAT.cLONGcLAT 1.00000000 0.09655281 -0.4140077cLONG 0.09655281 1.00000000 -0.1344310cLAT.cLONG -0.41400770 -0.13443102 1.0000000vif: variance inflation factor為什么要用 scale(標(biāo)準(zhǔn)化:減去平均值后再除以標(biāo)準(zhǔn)差)? print(summary(fit2)$coef); Estimate Std.
30、Error t value Pr(|t|)(Intercept) -0.55294158 0.02746785 -20.1304997 1.356751e-30cLAT 0.25664114 0.03025181 8.4834978 2.610338e-12cLONG -0.01659533 0.02778966 -0.5971763 5.523443e-01cLAT:cLONG 0.07686131 0.02988419 2.5719723 1.226881e-02 print(summary(fit2)$coef); dat1 = dat,c(1,3:8); # 1: 因變量C3, 3-8
31、: 協(xié)變量 dat1$C3 = log10(dat1$C3+0.1); fit3 = lm(C3., data=dat1); aic.both = step(fit3,scale=0.1, direction=both, trace = FALSE); aic.backward = step (fit3,scale=0.1,direction=backward, trace = FALSE); aic.forward = step (fit3,scale=0.1,direction=forward, trace = FALSE);情形二:自變量包含所有協(xié)變量(變量選擇)scale越大,選到的變
32、量個(gè)數(shù)越多。 dat1 = dat,c(1,3:8); # 1 print(summary(aic.both)$coef); Estimate Std. Error t value Pr(|t|)(Intercept) -1.72472260 0.305824641 -5.639580 3.461079e-07JJAMAP -1.00198375 0.433027213 -2.313905 2.365729e-02DJFMAP -1.00534103 0.485632099 -2.070170 4.218135e-02LAT 0.04230919 0.005266712 8.033321 1.
33、737289e-11 print(summary(aic.forward)$coef); Estimate Std. Error t value Pr(|t|)(Intercept) -2.6886133013 1.2391496271 -2.1697245 3.363296e-02MAP 0.0002743328 0.0002175062 1.2612639 2.116537e-01MAT -0.0008468391 0.0116261123 -0.0728394 9.421542e-01JJAMAP -0.8338535725 0.4750796169 -1.7551870 8.38677
34、4e-02DJFMAP -0.9618361455 0.7163072633 -1.3427703 1.839463e-01LONG 0.0069235895 0.0100330182 0.6900804 4.925631e-01LAT 0.0434331291 0.0099284778 4.3746010 4.424396e-05 print(summary(aic.backward)$coef); Estimate Std. Error t value Pr(|t|)(Intercept) -1.72472260 0.305824641 -5.639580 3.461079e-07JJAM
35、AP -1.00198375 0.433027213 -2.313905 2.365729e-02DJFMAP -1.00534103 0.485632099 -2.070170 4.218135e-02LAT 0.04230919 0.005266712 8.033321 1.737289e-11 print(summary(aic.both)$coefLoyn (1987) selected 56 forest patches in southeastern Victoria, Australia, and related the abundance of forest birds in
36、each patch (因變量) to six predictor variables: 1) patch area (ha), 2) distance to nearest patch (km), 3) distance to nearest larger patch (km), 4) grazing stock (1 to 5 indicating light to heavy), 5) altitude (m) and 6) years since isolation (years). Three of the predictor variables (patch area, dista
37、nce to nearest patch or dist, distance to nearest larger patch or ldist) were highly skewed, producing observations with high leverage, so these variables were transformed to log10. A correlation matrix indicated some moderate correlations between predictors, especially between log10(dist) and log10
38、(ldist), log10(area) and graze, and graze and years.例 2Loyn (1987) selected 56 forest回歸分析與相關(guān)分析精選課件 print(cor(dat,-1); YR.ISOL GRAZE ALT L10DIST L10LDIST L10AREAYR.ISOL 1.00000000 -0.63556710 0.2327154 -0.01957223 -0.16111611 0.2784145GRAZE -0.63556710 1.00000000 -0.4071671 -0.14263922 -0.03399082 -0
39、.5590886ALT 0.23271541 -0.40716705 1.0000000 -0.21900701 -0.27404380 0.2751428L10DIST -0.01957223 -0.14263922 -0.2190070 1.00000000 0.60386637 0.3021666L10LDIST -0.16111611 -0.03399082 -0.2740438 0.60386637 1.00000000 0.3824795L10AREA 0.27841452 -0.55908864 0.2751428 0.30216662 0.38247952 1.0000000
40、print(1/vif(fit); # 容忍度 YR.ISOL GRAZE ALT L10DIST L10LDIST L10AREA 0.5540876 0.3960688 0.6812282 0.6043930 0.4975746 0.5231454 print(cor(dat,-1); print回歸分析與相關(guān)分析精選課件負(fù)偏(左偏):紅色曲線左邊多出一塊。負(fù)偏(左偏):紅色曲線Box-Cox變換require(MASS);dat1 = dat;lambda = 0.4;dat1$ABUND = bct( dat$ABUND, lambda); fit1=lm(ABUND ., data
41、= dat1);par(mfrow=c(2,2);plot(fit1);Box-Cox變換require(MASS); print(summary(fit1)$coef); Estimate Std. Error t value Pr(|t|)(Intercept) -187.99449889 99.88060702 -1.8821922 6.575550e-02YR.ISOL 0.10835940 0.04924116 2.2019860 3.250884e-02GRAZE -1.46916033 1.01297157 -1.4503471 1.533332e-01ALT 0.0251944
42、5 0.02609860 0.9653563 3.391068e-01L10DIST -0.79187819 2.91466964 -0.2716871 7.870040e-01L10LDIST -0.49433899 2.31225972 -0.2137904 8.315976e-01L10AREA 7.41795158 1.59571239 4.6486771 2.550921e-05 print(summary(fit1)$coef);考慮2階交互效應(yīng) dat2 = dat1; dat2,-1=apply(dat2,-1,2,scale); fit2=lm(ABUND (YR.ISOL+
43、GRAZE+L10AREA)2, data = dat2); print(1/vif(fit2); YR.ISOL GRAZE L10AREA YR.ISOL:GRAZE YR.ISOL:L10AREA GRAZE:L10AREA 0.3371914 0.3874801 0.5306881 0.3621688 0.4133117 0.5117608 print(c(summary(fit1)$r.squared,summary(fit2)$r.squared);1 0.6675484 0.7689699 print(summary(fit2)$coef); Estimate Std. Erro
44、r t value Pr(|t|)(Intercept) 30.5290605 1.173432 26.016907 2.442374e-30YR.ISOL -0.9326085 1.346090 -0.692828 4.916883e-01GRAZE -4.3720196 1.255705 -3.481723 1.057595e-03L10AREA 6.9622399 1.072982 6.488682 4.112168e-08YR.ISOL:GRAZE 3.8649862 1.345259 2.873043 5.994109e-03YR.ISOL:L10AREA 3.0593008 1.3
45、32670 2.295618 2.601664e-02GRAZE:L10AREA 4.4983000 1.067310 4.214613 1.071019e-04考慮2階交互效應(yīng) print(c(summary(fit回歸分析與相關(guān)分析精選課件 fit3=lm(ABUND (YR.ISOL+GRAZE+L10AREA)3, data = dat2); print(summary(fit3)$coef); Estimate Std. Error t value Pr(|t|)(Intercept) 30.5394183 1.189513 25.6738765 1.084511e-29YR.ISOL -0.9976824 1.493243 -0.6681314 5.072499e-01GRAZE -4.3808491 1.271331 -3.4458762 1.192371e-03L10AREA 6.8879568 1.292601 5.3287573 2.608908e-06YR.ISOL:GRAZE 3.8684438 1.359437 2.8456213 6.499732e-03YR.ISOL:L10AREA 3.0487675 1.350021 2.2583105 2.850907e-02GRAZE:L10AREA 4
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 上市法律風(fēng)險(xiǎn)評估合同書
- 合資經(jīng)營餐廳合同協(xié)議范本專業(yè)版
- 家庭房產(chǎn)贈(zèng)與合同樣本
- 大型戶外海報(bào)張貼合同
- 如何有效降低合同糾紛風(fēng)險(xiǎn)
- 國際市場拓展代理合同
- 終止合伙合同協(xié)議書模板
- 杭州市股權(quán)轉(zhuǎn)讓合同范文
- 房屋建筑工程承包合同
- Unit 1 Friendship-Reading 教學(xué)設(shè)計(jì) 2024-2025學(xué)年滬教版英語七年級上冊
- 生而為贏自燃成陽-開學(xué)第一課發(fā)言稿
- 公司外派學(xué)習(xí)合同范例
- 2025年中國國投高新產(chǎn)業(yè)投資集團(tuán)招聘筆試參考題庫含答案解析
- 安徽省合肥市包河區(qū) 2024-2025學(xué)年九年級上學(xué)期期末道德與法治試卷(含答案)
- 2024年湖南鐵路科技職業(yè)技術(shù)學(xué)院高職單招數(shù)學(xué)歷年參考題庫含答案解析
- 年產(chǎn)10噸功能益生菌凍干粉的工廠設(shè)計(jì)改
- 臺球俱樂部助教制度及待遇
- 醫(yī)師聘用證明.doc
- 核物理實(shí)驗(yàn)方法全冊配套最完整精品課件
- 理論力學(xué)課件00796
- 學(xué)習(xí)疊層母排必須知道的電力知識
評論
0/150
提交評論