[R-br] Erro no ajuste usando nls()

Michelle Bau Graczyk mbgraczyk em gmail.com
Quarta Fevereiro 10 18:14:00 BRST 2016


Caros, boa tarde,

Eu estou fazendo um ajuste não linear usando nls mas o resultado que ele dá
é uma curva de ajuste com concavidade invertida da que eu preciso. Já
tentei usar o gnm() mas não consegui, fiquei confusa.
Alguém poderia me dar uma dica?

Muito obrigada,

Michelle

> dput(meanCurtose)
c(12.6411612236072, 12.4796294865894, 11.7837399107729, 9.3366244767958,
8.78234352198318, 8.80804015042667, 7.95307495971197, 7.32343842457161,
8.14299654574164, 7.70975671017602, 8.18694316251001, 7.80329447515565,
7.34631424875244, 7.36272816078658, 7.51141407180884, 7.2984543038216,
7.18798034231446, 7.39050028173958, 7.38081189490019, 6.95713316227877,
7.63791968455754, 7.87986509970493, 7.73055700377501, 7.70222565081336,
7.30022411141346, 7.4083910760296, 8.00578570236547, 7.93193221955052,
6.64327337064239, 6.68647106547987, 6.3000528994051, 6.54137808760309,
7.48995510261887, 6.54309655530203, 7.52087344933623, 7.42164647655176,
6.92162268458166, 7.77143984793159, 7.20394459256519, 7.83235593399696,
6.83302649488445, 7.62258779095348, 6.38055427433855, 8.05998045599357,
7.46958190677157, 7.60765302681021, 8.80234303007986, 6.68187705863027,
8.21926338640429, 7.08617024720737, 7.08317235004987, 7.41892957604937,
7.16982143599, 8.15539571232209, 7.28334499900169, 6.58120042409299,
7.81224922275858, 7.38171333668406, 8.00614692588858, 6.84451553168819,
6.74857828793314, 6.67461633312983, 7.16362668836922, 8.00479494155055,
7.70268389750672, 7.14336039340061, 6.97576022415651, 7.80929673006598,
6.45416855124862, 6.78896259995105, 7.7614373562682, 7.34338936769521,
8.66360167525496, 7.56010811040502, 7.22027035686588, 7.1154305341104,
8.04483181906421, 7.26686896074475, 7.2819554225349, 7.1660546357157,
6.59147414023302, 7.75283390623264, 7.15010401592893, 8.13303971786744,
7.32855414357015, 7.52914612700985, 7.48539350747664, 7.3116359925766,
7.66883205205566, 7.54386649172369, 7.45086562401987, 7.5330535884964,
7.78202225997345, 7.76056734608042, 7.59433966583985, 8.11435339265086,
7.70162351095566, 8.37601740131695, 8.25165697702199, 7.24643615541509,
8.54880044435138, 8.0340772543879, 7.60142401295378, 8.15271059000679,
7.60593160597471, 7.72593944394177, 8.41079717372872, 7.11927697642025,
7.88710645083062, 7.71902768095523, 8.26215306007541, 7.86133931721877,
8.37393605745582, 8.19932022059118, 8.18707328398938, 7.94521059286453,
7.53190992758944, 9.09382323175141, 7.61894746233992, 7.10017784239385,
7.57104786675778, 8.01430433052944, 7.7371487858432, 7.60325496858967,
8.52249282126512, 7.74248433340973, 8.79986883820701, 9.46167401431283,
8.41320689887244, 8.12675091813675, 8.19305074669362, 8.26033026649083,
8.98967698600776, 8.34788307021593, 7.98891745840651, 8.02766826748111,
7.94540270707373, 7.91235184351595, 8.18550024134088, 7.6791216969593,
7.79872542391477, 7.74940943117668, 8.96965964554471, 8.5629016313986,
8.22026114318125, 8.09935379363855, 8.51695691589121, 8.38650625250542,
8.34913902264381, 8.16013457394217, 8.50829038864903, 8.44833145927061,
7.66193460778894, 8.38570214117961, 7.95599813376551, 8.87323589444497,
8.7542820309813, 8.86246741162272, 8.02505832824182, 8.3294679557415,
8.62676738321297, 8.82047798447757, 8.57418113309101, 8.58699004470501,
7.91426791727072, 8.97177329700974, 9.21737012827076, 8.93131253848201,
9.05373040821843, 8.8060047926233, 8.63579398153133, 8.86336549714936,
8.527665790551, 9.09306532526363, 8.28087778847272, 8.60347913720265,
8.86989145702297, 9.0949684712681, 8.9078756146992, 8.46550552582034,
8.67664030286659, 8.20430660038124, 8.81351904607292, 8.37902232147903,
8.14550617357246, 8.87063158098105, 8.97666317275847, 9.27478818986505,
8.1547402409359, 9.47636797667675, 8.7719585836935, 9.10650559618523,
8.74628232738224, 8.66484384581281, 8.89461512012232, 8.94112698262295,
8.88625194909964, 9.16563208180781, 8.95119538370992, 8.18141433709592,
8.76643815564861, 8.11691951072044, 8.59918991951036, 8.49949758795904,
9.03815995715459, 8.96746895317108, 8.25155230561287, 8.99757528829419,
8.38019837587032, 7.89015644871282, 8.40680211022081, 8.18371594452072,
8.30410415342907, 9.20936736591405, 7.65703515300426, 8.51162764995946,
8.6646690100554, 8.73118454744911, 8.14430230247998, 9.35891665431139,
9.06160792496678, 8.44947473873207, 8.71740324034868, 8.84001466116642,
9.00589707824947, 8.43952480018863, 8.66283352173145, 8.1727011762143,
8.57579566514626, 8.93818965665359, 8.15206368488664, 8.33232107289189,
8.341762471693, 9.06623499334649, 9.26537578767064, 7.81307094388884,
8.24572869326094, 8.59586522687647, 9.25576297899288, 8.58797131328683,
8.32067682057009, 8.91930638689767, 8.52526396708155, 8.66723332530741,
8.40559307237315, 8.17799487428929, 8.82784323424394, 9.18465209204581,
9.3587241829983, 8.50637042594598, 8.01927234485536, 9.29896008716075,
8.34070882949313, 8.77293341674818, 8.18474544087248, 8.91510004993898,
8.5566201885022, 8.39486013632365, 7.9046867529931, 7.92430863681382,
8.36021307048988, 7.8417605494278, 8.11914705328606, 9.10171237192372,
8.17450387129867, 8.53448727634444, 8.28989881325439, 9.54818539345608,
8.28338368115583, 7.79002534544918, 7.3242854513379, 7.84079127816179,
6.9410953499969, 8.07876380902682, 7.58591611244066, 8.50453944587674,
7.73770574293502, 7.62996698908472, 7.45841033089338, 8.32542977978427,
8.42312792960234, 9.21829530875374, 8.42984858400488, 8.16205343552221,
7.75295741897613, 8.52015614478337, 7.53969212359461, 8.44365531449399,
8.52590287623014, 8.51149053329986, 8.69193569875344, 7.87514214098904,
8.72564455261839, 8.41118186910311, 8.43201983191773, 8.04652209962358,
8.07673862977229, 7.66548826291252, 6.80349186801062, 7.01637383923338,
8.70616450025012, 7.72444099740669, 6.80701060733422, 6.99815237424822,
7.36641433774333, 7.27795135228736, 7.92905477052055, 7.88735066444516,
7.5016857370229, 6.78728786146448, 7.0532105574119, 7.36774907460969,
7.21358655480566, 7.2330664851842, 6.55433878970998, 7.73491483882012,
7.48043763676256, 7.80308727452244, 8.56098368763194, 7.70955796849379,
7.29653875674424, 7.42506463782188, 7.55914784837445, 7.42273393281136,
7.73515546731259, 7.48590913285387, 7.52434898743792, 7.44438234261102,
6.51597932800007, 6.28377247781507, 7.30133580341582, 6.73090842393085,
7.1361818350794, 6.78857257971843, 7.47023659527815, 7.37037478855289,
7.11798413310505, 7.16775471917832, 7.57517612767556, 7.10452737365334,
7.39660110571226, 7.17465591962981, 7.21164585791059, 7.40357201965638,
6.9947991909269, 7.14911017223732, 7.62484959829372, 6.76931262019786,
7.07638840273463, 7.15180066875616, 7.110350823662, 7.70131655729898,
7.03758321040949, 6.81957650696621, 7.16672630698447, 7.550947643418,
7.18035062270062, 6.83580537458554, 7.53556587395976, 6.31195290707872,
5.83287753761713, 5.81867638752022, 6.83541015330383, 6.52334107459094,
6.11436061339103, 7.10260940620634, 6.98757628158683, 5.89634862010814,
6.64905982592843, 6.10904544483375, 6.59560059326794, 6.62860732208668,
6.34612245052279, 6.5980097843679, 5.78737540356475, 6.38550118181323,
6.79787866750963, 6.12697207250661, 6.79967388180314, 6.47852836132581,
6.32902303599, 6.77030416330563, 6.36992000626642, 6.29767779306828,
5.86680261035713, 6.17573748646501, 5.44879619119357, 5.15153675140756,
4.97657133718324, 10.8727474295956, 11.4568422631567)
> x<-c(1:391)
> xx2<-c(269:380)
> yy2<-meanCurtose[269:380]

> ajuste1<-nls(yy2~9.548-b*(xx2-268)^c,start=list(b=1,c=1))

> plot(x,meanCurtose)
> lines(c(269:380),((predict(ajuste1))),col="blue",lwd=5)
-------------- Próxima Parte ----------
Um anexo em HTML foi limpo...
URL: <http://listas.inf.ufpr.br/pipermail/r-br/attachments/20160210/55512b29/attachment.html>


Mais detalhes sobre a lista de discussão R-br