regressão linear pelo origem

Pessoal mais uma vez procuroa juda de vc's, bom a verdade é pra um colega ele é novo com o R, se alguem puder ajudar. Estou precisando da ajuda de você, sou novo no grupo e estou tentando fazer um grafico de regressao linear simples ajustando o intercepto da reta deve passar pela origem dos eixos (0,0) mas não estou conseguindo. O CMR que estou trabalhando é o seguinte. # REGRESSÃO EI30 VS DS require(XLConnect) reg<-loadWorkbook("Estadistica Final.xls", create= FALSE) reg1<-readWorksheet(reg, sheet="Plan1") reg1 attach(reg1) cor.test(EI30, DS, alternative = c("two.sided"), method = c("pearson"), conf.level = 0.95) reglin1<-lm(DS~EI30, data=reg1) anova(reglin1) reglin1 summary(reglin1) # GRAFICOS par(mfrow = c(3,1), mar=c(4.5,5,2,2)) plot(EI30,DS, type="p", pch=15, lwd=1.5, ylim=c(0,100), xlim=c(0,50), cex.main=1.2, cex.lab=0.9, cex.axis=0.9, xlab="", ylab="",cex.lab=2, main="Descoberto", font.main=2) abline(reglin1, lwd=2.0, col="black", lty=1) ## pode-se usar lty=9 legend("bottomright", bty="n", lwd=c(1.5), pch=c(15), col=c("black"), legend=c(expression(y=='1,516x'~+~'9,241'~','~R^2=='0,58'^'*')), cex=1) plot(EI30, LS, pch=16, col="black", ylim=c(0,3), xlim=c(0,50), cex.main=1.2, cex.lab=0.9, cex.axis=0.9, xlab="", ylab=expression(bold(Perda~do~solo~(g~L^{-1}))), font.lab=2, main="Liteira", font.main=2) abline(reglin2, lwd=2.0, col="black", lty=2) legend("bottomright", bty="n", lwd=c(1.5), pch=c(16), col=c("black"), legend=c(expression(y=='0,018x'~+~'0,323'~','~R^2=='0,16'^'*')), cex=1) Aguardo suas consideraçoes. Att. Omar Cubas Encinas Instituto Nacional de Pesquisas da Amazônia / INPA Aluno de Mestrado em Agricultura do Tropico Úmido / ATU Manaus - AM - Brasil (092) 9102-2542 -- MSc. Gilson Sánchez Chia Laboratório de Fisiologia Vegetal Embrapa Amazônia Ocidental Fone: (92) 3303-7841 --- Antes de imprimir, pense na sua responsabilidade com o Meio Ambiente. Please consider the environment before printing this email. Renew, Reduce and Recycle. The Planet Knows.

Use dentro da fórmula alguma dessas especificações para remover o intercepto lm(y~-1+x...) lm(y~0+x) À disposição. Walmes. ========================================================================== Walmes Marques Zeviani LEG (Laboratório de Estatística e Geoinformação, 25.450418 S, 49.231759 W) Departamento de Estatística - Universidade Federal do Paraná fone: (+55) 41 3361 3573 VoIP: (3361 3600) 1053 1173 e-mail: walmes@ufpr.br twitter: @walmeszeviani homepage: http://www.leg.ufpr.br/~walmes linux user number: 531218 ==========================================================================

Value Walmes deu certo obrigado.... ---------- Forwarded message ---------- From: Gilson Sanchez <gilsonsch@gmail.com> Date: 2011/7/8 Subject: regressão linear pelo origem To: Grupo R-Br <r-br@listas.c3sl.ufpr.br> Pessoal mais uma vez procuroa juda de vc's, bom a verdade é pra um colega ele é novo com o R, se alguem puder ajudar. Estou precisando da ajuda de você, sou novo no grupo e estou tentando fazer um grafico de regressao linear simples ajustando o intercepto da reta deve passar pela origem dos eixos (0,0) mas não estou conseguindo. O CMR que estou trabalhando é o seguinte. # REGRESSÃO EI30 VS DS require(XLConnect) reg<-loadWorkbook("Estadistica Final.xls", create= FALSE) reg1<-readWorksheet(reg, sheet="Plan1") reg1 attach(reg1) cor.test(EI30, DS, alternative = c("two.sided"), method = c("pearson"), conf.level = 0.95) reglin1<-lm(DS~EI30, data=reg1) anova(reglin1) reglin1 summary(reglin1) # GRAFICOS par(mfrow = c(3,1), mar=c(4.5,5,2,2)) plot(EI30,DS, type="p", pch=15, lwd=1.5, ylim=c(0,100), xlim=c(0,50), cex.main=1.2, cex.lab=0.9, cex.axis=0.9, xlab="", ylab="",cex.lab=2, main="Descoberto", font.main=2) abline(reglin1, lwd=2.0, col="black", lty=1) ## pode-se usar lty=9 legend("bottomright", bty="n", lwd=c(1.5), pch=c(15), col=c("black"), legend=c(expression(y=='1,516x'~+~'9,241'~','~R^2=='0,58'^'*')), cex=1) plot(EI30, LS, pch=16, col="black", ylim=c(0,3), xlim=c(0,50), cex.main=1.2, cex.lab=0.9, cex.axis=0.9, xlab="", ylab=expression(bold(Perda~do~solo~(g~L^{-1}))), font.lab=2, main="Liteira", font.main=2) abline(reglin2, lwd=2.0, col="black", lty=2) legend("bottomright", bty="n", lwd=c(1.5), pch=c(16), col=c("black"), legend=c(expression(y=='0,018x'~+~'0,323'~','~R^2=='0,16'^'*')), cex=1) Aguardo suas consideraçoes. Att. Omar Cubas Encinas Instituto Nacional de Pesquisas da Amazônia / INPA Aluno de Mestrado em Agricultura do Tropico Úmido / ATU Manaus - AM - Brasil (092) 9102-2542 -- MSc. Gilson Sánchez Chia Laboratório de Fisiologia Vegetal Embrapa Amazônia Ocidental Fone: (92) 3303-7841 --- Antes de imprimir, pense na sua responsabilidade com o Meio Ambiente. Please consider the environment before printing this email. Renew, Reduce and Recycle. The Planet Knows. -- MSc. Gilson Sánchez Chia Laboratório de Fisiologia Vegetal Embrapa Amazônia Ocidental Fone: (92) 3303-7841 --- Antes de imprimir, pense na sua responsabilidade com o Meio Ambiente. Please consider the environment before printing this email. Renew, Reduce and Recycle. The Planet Knows.

Pode me passar seu arquivo para rodar este CMR? Pessoal mais uma vez procuroa juda de vc's, bom a verdade é pra um colega ele é novo com o R, se alguem puder ajudar. Estou precisando da ajuda de você, sou novo no grupo e estou tentando fazer um grafico de regressao linear simples ajustando o intercepto da reta deve passar pela origem dos eixos (0,0) mas não estou conseguindo. O CMR que estou trabalhando é o seguinte. # REGRESSÃO EI30 VS DS require(XLConnect) reg<-loadWorkbook("Estadistica Final.xls", create= FALSE) reg1<-readWorksheet(reg, sheet="Plan1") reg1 attach(reg1) cor.test(EI30, DS, alternative = c("two.sided"), method = c("pearson"), conf.level = 0.95) reglin1<-lm(DS~EI30, data=reg1) anova(reglin1) reglin1 summary(reglin1) # GRAFICOS par(mfrow = c(3,1), mar=c(4.5,5,2,2)) plot(EI30,DS, type="p", pch=15, lwd=1.5, ylim=c(0,100), xlim=c(0,50), cex.main=1.2, cex.lab=0.9, cex.axis=0.9, xlab="", ylab="",cex.lab=2, main="Descoberto", font.main=2) abline(reglin1, lwd=2.0, col="black", lty=1) ## pode-se usar lty=9 legend("bottomright", bty="n", lwd=c(1.5), pch=c(15), col=c("black"), legend=c(expression(y=='1,516x'~+~'9,241'~','~R^2=='0,58'^'*')), cex=1) plot(EI30, LS, pch=16, col="black", ylim=c(0,3), xlim=c(0,50), cex.main=1.2, cex.lab=0.9, cex.axis=0.9, xlab="", ylab=expression(bold(Perda~do~solo~(g~L^{-1}))), font.lab=2, main="Liteira", font.main=2) abline(reglin2, lwd=2.0, col="black", lty=2) legend("bottomright", bty="n", lwd=c(1.5), pch=c(16), col=c("black"), legend=c(expression(y=='0,018x'~+~'0,323'~','~R^2=='0,16'^'*')), cex=1) Aguardo suas consideraçoes. Att. Omar Cubas Encinas Instituto Nacional de Pesquisas da Amazônia / INPA Aluno de Mestrado em Agricultura do Tropico Úmido / ATU Manaus - AM - Brasil (092) 9102-2542 -- MSc. Gilson Sánchez Chia Laboratório de Fisiologia Vegetal Embrapa Amazônia Ocidental Fone: (92) 3303-7841 --- Antes de imprimir, pense na sua responsabilidade com o Meio Ambiente. Please consider the environment before printing this email. Renew, Reduce and Recycle. The Planet Knows. -- MSc. Gilson Sánchez Chia Laboratório de Fisiologia Vegetal Embrapa Amazônia Ocidental Fone: (92) 3303-7841 --- Antes de imprimir, pense na sua responsabilidade com o Meio Ambiente. Please consider the environment before printing this email. Renew, Reduce and Recycle. The Planet Knows. ------------------------------------------------------------------------------ _______________________________________________ R-br mailing list R-br@listas.c3sl.ufpr.br https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br Leia o guia de postagem (http://www.leg.ufpr.br/r-br-guia) e forneça código mínimo reproduzível.
participantes (3)
-
Gilson Sanchez
-
Mauro Sznelwar
-
Walmes Zeviani