[R-br] (sem assunto)
Ari Clecius
ari072000 em yahoo.com.br
Sexta Outubro 24 09:01:55 BRST 2014
Caros colegas, uso alguns modelos de isotermas de adsorção, para o modelo de Langmuir existem algumas linearizações, como faço para avaliar no R se o modelo não linear é melhor que o modelo linearizado?
Att,
Ari Clecius Alves de Lima
Engenheiro Químico
Me. Engenharia Civil
(085)88412345
(085)33669042
#CRM
ce=c(0.66450,0.92395,1.22510,1.53040,12.89600,32.44400,70.93000,135.54800)
qe=c(0.65864,0.83815,1.09135,1.42049,11.57060,15.42198,16.41500,20.42020)
#########Modelo linear####################
ce_inv=1/ce
qe_inv=1/qe
Langmuir_Linear=lm(qe_inv~ce_inv)
summary(Langmuir_Linear)
names(Langmuir_Linear)
Langmuir_Linear$coefficients
Langmuir_Linear$coefficients[1]
qmax_L=1/Langmuir_Linear$coefficients[1]
qmax_L
kl_L=1/qmax*Langmuir_Linear$coefficients[2]
kl_L
qe_est_L=qmax_L* kl_L*ce/(1+ kl_L *ce)
plot(ce,qe)
lines(ce,qe_est_L,col="blue")
##########################################
library(nlstools)
adsorption=list(ce,qe)
langmuir<-nls(qe~qmax*kl*ce/(1+kl*ce),adsorption,start=list(qmax=30,kl=0.02))
summary(langmuir)
qe_Est_NL=21.40602* 0.07498 *ce/(1+ 0.07498 *ce)
qe_Est_NL
plot(ce,qe)
lines(ce,qe_Est_NL,col="red")
legend("top",legend=c("LangmuirExp","Langmuir_Est_NL"), lty=c(NA,1), col=c("black","red"),pch=c(3,NA),cex=0.6)
########################################
#############################################
plot(ce,qe)
lines(ce,qe_est_L,col="blue")
lines(ce,qe_Est_NL,col="red")
legend("topleft",legend=c("LangmuirExp","Langmuir_Est_L","Langmuir_Est_NL"), lty=c(NA,1,1), col=c("black","blue","red"),pch=c(3,NA,NA),cex=0.6)
#####################################################
-------------- Próxima Parte ----------
Um anexo em HTML foi limpo...
URL: <http://listas.inf.ufpr.br/pipermail/r-br/attachments/20141024/9ec98273/attachment-0001.html>
Mais detalhes sobre a lista de discussão R-br