<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:8pt"><div><span>Alguém poderia me dizer uma forma mais fácil de fazer um gráfico de pareto para los efeitos significativos de um experimento fatorial? Segue código abaixo.</span></div><div style="color: rgb(0, 0, 0); font-size: 11px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: transparent; font-style: normal;"><span><br></span></div><div style="color: rgb(0, 0, 0); font-size: 11px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: transparent; font-style: normal;"><span>ATtt,</span></div><div></div><div> </div><div><span style="font-weight:bold;font-style:italic;">Ari Clecius Alves de Lima</span><br style="font-weight:bold;font-style:italic;"><span
style="font-weight:bold;font-style:italic;">Engenheiro Químico</span><br style="font-weight:bold;font-style:italic;"><span style="font-weight:bold;font-style:italic;">Me. Engenharia Civil</span><br style="font-weight:bold;font-style:italic;"><span style="font-weight:bold;font-style:italic;">(085)88412345</span><br style="font-weight:bold;font-style:italic;"><span style="font-weight:bold;font-style:italic;">(085)33669042</span></div><div style="color: rgb(0, 0, 0); font-size: 11px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: transparent; font-style: italic;"><span style="font-weight:bold;font-style:italic;"><br></span></div><div style="color: rgb(0, 0, 0); font-size: 11px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: transparent; font-style: italic;"><span
style="font-weight:bold;font-style:italic;">#Código</span></div><div style="background-color: transparent;"><b><i>resp=scan(nmax=8)</i></b></div><div style="background-color: transparent;"><b><i>82.8</i></b></div><div style="background-color: transparent;"><b><i>55.1</i></b></div><div style="background-color: transparent;"><b><i>74.3</i></b></div><div style="background-color: transparent;"><b><i>72.2</i></b></div><div style="background-color: transparent;"><b><i>64.7</i></b></div><div style="background-color: transparent;"><b><i>51.3</i></b></div><div style="background-color: transparent;"><b><i>69.9</i></b></div><div style="background-color: transparent;"><b><i>53.3</i></b></div><div style="background-color: transparent;"><b><i><br></i></b></div><div style="background-color: transparent;"><b><i>#replicated</i></b></div><div style="background-color: transparent;"><b><i>rad=rep(c(+1,-1),time=4,each=1)</i></b></div><div style="background-color:
transparent;"><b><i>rad</i></b></div><div style="background-color: transparent;"><b><i>pH=rep(c(+1,-1),time=2,each=2)</i></b></div><div style="background-color: transparent;"><b><i>pH</i></b></div><div style="background-color: transparent;"><b><i>area=rep(c(+1,-1),each=4)</i></b></div><div style="background-color: transparent;"><b><i>area</i></b></div><div style="background-color: transparent;"><b><i><br></i></b></div><div style="background-color: transparent;"><b><i>order=(1:8)</i></b></div><div style="background-color: transparent;"><b><i>order</i></b></div><div style="background-color: transparent;"><b><i><br></i></b></div><div style="background-color: transparent;"><b><i><br></i></b></div><div style="background-color: transparent;"><b><i>fat=data.frame(rad,pH,area,resp,order)</i></b></div><div style="background-color: transparent;"><b><i>fat</i></b></div><div style="background-color: transparent;"><b><i>aov.2=aov(resp~rad+pH+area,
data=fat)</i></b></div><div style="background-color: transparent;"><b><i>summary(aov.2)</i></b></div><div style="background-color: transparent;"><b><i><br></i></b></div><div style="background-color: transparent;"><b><i>#Gráfico de pareto</i></b></div><div style="background-color: transparent;"><b><i><br></i></b></div><div style="background-color: transparent;"><b><i>MSE=41.7 #Obtido a partir de </i></b></div><div style="background-color: transparent;"><b><i>coef1=c(aov.2$coef[2:4])</i></b></div><div style="background-color: transparent;"><b><i>coef1</i></b></div><div style="background-color: transparent;"><b><i>n=8</i></b></div><div style="background-color: transparent;"><b><i>f1=t(abs(coef1))/(sqrt(MSE/n));f1</i></b></div><div style="background-color: transparent;"><b><i>z=data.frame(f1)</i></b></div><div style="background-color: transparent;"><b><i>names(z)</i></b></div><div style="background-color:
transparent;"><b><i>v1=qt(0.975,8)</i></b></div><div style="background-color: transparent;"><b><i>coef3=sort(abs(coef1))</i></b></div><div style="background-color: transparent;"><b><i>coef3</i></b></div><div style="background-color: transparent;"><b><i>g=barplot(sort(f1),horiz=TRUE,names.arg=c( names(coef3)),col=ifelse(sort(f1)>v1,"blue","gray"))##xlim, ylim</i></b></div><div style="background-color: transparent;"><b><i>box("plot", col="blue") </i></b></div><div style="background-color: transparent;"><b><i><br></i></b></div><div style="background-color: transparent;"><b><i>abline(v=qt(0.975,8),col="red",lty=2)</i></b></div><div style="background-color: transparent;"><b><i>s=format(qt(0.975,8),digits=2)</i></b></div><div style="background-color: transparent;"><b><i>text(2.5,1,label=s,cex=1)</i></b></div><div style="background-color: transparent;"><b><i>mtext("Efeito padronizado", side=3, line=2, cex=1.0, col="blue",
outer=FALSE)</i></b></div><div style="background-color: transparent;"><b><i>p=format(f1,scientific = TRUE)</i></b></div><div style="background-color: transparent;"><b><i><span></span></i></b></div><div style="background-color: transparent;"><b><i>legend(x=6,y=4,cex=0.6,bg="yellow",box.col="blue", legend=c( "Rad=7.475","area=5.650","pH=-1.975" ), col="blue", lwd=1:2, lty=c(NA,NA,NA))</i></b></div><div><br></div></div></body></html>