dear members, Yesterday, Duncan identified a silly mistake in an nls call...in the list of starting values, one of the names of the variable was getting repeated. But I am experiencing the same problem again, with a different formula:> formulaDH3HM1 ~ (a + (b * ((HM2 + 0.3)^(1/3)))) * (c * log(HM3 + 27)) here HM1 is the response variable, and HM2 and HM3 are predictors.....> nonlin_modDH3 <- nls(formulaDH3, start = list(a = 0.43143, b = 0.68173,c = 0.02954))Error in nlsModel(formula, mf, start, wts) : singular gradient matrix at initial parameter estimates> nonlin_modDH3 <- nlsLM(formulaDH3, start = list(a = 0.43143, b = 0.68173,c = 0.02954))Error in nlsModel(formula, mf, start, wts) : singular gradient matrix at initial parameter estimates I am using nlsLM function from the minpack.lm package which says that it will converge when nls fails with singular gradient matrix error... Is there again a silly mistake(pardon me again if there is one!), or is the problem serious? If it is serious, any pointers towards a solution? very many thanks for your time and effort.... yours sincerely, AKSHAY M KULKARNI [[alternative HTML version deleted]]
dear members, I think Duncan's solution is not working...I've checked the function again:> formulaDH5 <- as.formula(HM1 ~ (a + (b * ((HM2 + 0.3)^(1/2)))) + (A*sin(w*HM3 + c) + C)) > nonlin_modDH5 <- nls(formulaDH5, start = list(a = 0.43143, b = 0.68173,A = 0.09,w = 0.8,c = 0.01,C = 0.94))Error in nlsModel(formula, mf, start, wts) : singular gradient matrix at initial parameter estimates> nonlin_modDH5 <- nlsLM(formulaDH5, start = list(a = 0.43143, b = 0.68173,A = 0.09,w = 0.8,c = 0.01,C = 0.94))Error in nlsModel(formula, mf, start, wts) : singular gradient matrix at initial parameter estimates I've checked the Internet for a method of getting the starting values, but they are not comprehensive....any resources for how to find the starting values?> dput(HM1)c(1.01484280343579, 0.977004104656811, 1.02448653468064, 1.01562102015533, 0.968359321714289, 0.99105072887847, 0.99384582083167, 1.00579414727333, 0.967593120445675, 1.04694148058855, 1.03832347454026, 0.971040156128456, 0.976967848281943, 0.990386686964446, 1.02257020722784, 0.994529161072552, 1.05361176882747, 0.988021514764882, 0.998909692369571, 1.04933819895509, 0.988354009297047, 0.878584020586706, 1.01438895222572, 1.01522203155842, 0.999979601913003, 0.975862934766315, 1.03948445565434, 1.02493339899053, 0.972267168470219, 0.971001051421653, 1.03066167719129, 0.967898970631469, 0.976606662010519, 0.990061873979734, 1.03398666689317, 1.05491455733517, 0.995997711923663, 0.991213393857838, 0.9903216916016, 1.06850794640807, 1.01345738121581, 0.877847194198055, 0.992124544661245, 1.00927272338804, 0.988196514422814, 0.987504905313256, 0.990274516132497, 1.01484624802751, 0.9800176904083, 0.969321725342799, 1.07407427451262, 1.02023130729371, 0.975827723120998, 0.988260886231393, 1.05116598585815, 0.977996171738906, 0.985118207891832, 0.98243346941999, 0.991380612684958, 1.00960741365585, 1.03062446605116, 1.04176358759364, 1.02494798972349, 1.04645592406625, 0.999998705820515, 0.972161829098397, 0.991313521356105, 1.0211561076261, 0.971257832217016, 1.00935026461508, 0.997140402835885, 1.00719609467891, 0.97483865743955, 0.987491380127905, 1.0643888147255, 1.00804564512905, 0.989366232219398, 0.942042386899482, 1.0140328534339, 0.98812919092058, 1.04584882138055, 0.970586857498767, 1.0098232311784, 1.02237732533005, 0.99306513943649, 0.963808401790738, 1.03577231048959, 1.00540101137939, 0.970458918298484, 0.973460294926879, 0.992676651187501, 1.04079931972326, 0.988928168736541, 0.986376934855979, 1.04117941173535, 1.01252015337269, 0.920578394310677, 0.98933093765412, 0.98116698970429, 0.995498900493761, 0.96463760451942, 1.1059686605887, 1.03366353582116, 0.981256131441973, 1.0152599452654, 0.995362080418312, 0.997276311537458, 0.943438355295013, 1.04025117202718, 1.03102737097366, 1.02096902615856, 1.02506560388494, 0.959364103040633, 0.987217067188943, 1.00454456275356, 1.03517749036747, 1.0148342900634, 0.974518005568706, 1.02515903830848, 1.00435361604303, 0.973400954462685, 0.981702992961201, 1.0155969247203, 1.01064154947471, 0.957131570492054, 0.88504625471737, 1.01849907662046, 1.01503806358198, 0.987004149653273, 0.974485857983481, 0.987572979379099, 1.0037529762248, 0.976026658183349, 0.983176178747953, 1.03812943411666, 1.01828203593425, 0.984139742592733, 1.00377243020886, 1.02118652563454, 1.01115776483144, 0.98387406692053, 0.985919715423209, 0.989550590454508, 1.01845373071313, 1.00394660346757, 0.949076679285431, 1.06094051230739, 0.981940494629297, 0.982812578115724, 0.929673163266673, 1.05359335975355, 1.03498999963467, 0.989218608625026, 0.994412680504384, 1.03162650392014, 1.04359975620911, 0.96938669600183, 0.987150178669349, 0.990503131271205, 1.01120231626779, 0.977334529946535, 0.966013274319284, 1.04966722359666, 1.04745672849702, 0.960799643211444, 0.866626315091455, 1.01316731305781, 1.02919067036911, 0.988567285725018, 0.978702298855537, 1.0186604054056, 1.01398864226215, 0.985492431198792, 1.03982326960775, 1.02287049736119, 1.02357106122821, 0.977519287403578, 0.993818572820706, 1.01139405704906, 1.02683235508704, 0.943370973180458, 0.970153991236375, 0.970746163945049, 1.00996886938921, 0.970599365922215, 1.03230385881209, 1.02072718512322, 1.0161024503161, 0.987718207880278, 0.987512809150475, 1.04108232940019, 1.0153758143276, 1.03916475100072, 0.959776942350879, 1.01739288375256, 1.05438479662213, 0.970479916939806, 0.979826128477137, 0.982800613999074, 0.977050857426291, 0.977474025608337, 0.972905352371901, 1.02191626900472, 1.02737043327345, 0.987565251408109, 0.93131925605196, 0.991469304659888, 0.949708678221412, 0.948662234856045, 0.938158485016718, 1.02342896552764, 1.01869899424866, 1.01244484998263, 0.990637832491416, 1.04591108144934, 0.951244278685872, 0.977265525807748, 0.942206977147219, 1.09440128638859, 1.02935716108991, 0.978428723706514, 1.08589930790608, 1.0015813231405, 1.07512822987239, 0.976356469419301, 0.972775004620642, 1.00954673593815, 0.992551447194369, 0.985819189451289, 0.975310750212573, 1.05999783258221, 1.07815688799274, 0.959648862885262, 1.03418767541976, 1.07207529899183, 1.04949264142055, 0.966872387358102, 0.963564695272614, 1.01310836328613, 0.996622968927382, 1.00202486063801, 0.948215304098709, 1.02845448262427, 0.987124642586768, 0.999269328077687, 0.964674178364545, 0.991913103743918, 0.970556592778505, 0.979495816235886, 0.949160643807912, 0.999611005677085, 1.01697727168167, 0.966362681248743, 0.938703012004999, 1.01394761650376, 1.011369485146, 0.975929406359934, 0.97111480362557, 1.0581474202687, 1.03965938660391, 0.990447147628825, 0.967286377976687, 0.968162001740811, 1.00573452177125, 0.974628505381728, 0.983183640545729, 1.08185959707149, 0.976533333333333, 0.932582771965921, 1.02205682784386, 1.02162002635618, 1.00634335266967, 1.03045302554561, 1.05015537832235, 1.0238800474742, 1.0151188247761, 0.951176244898346, 0.937999477475998, 0.986664690881963, 1.00889938014614, 0.972546365957459, 0.937560562249233, 0.953227957137494, 0.964284336810156, 0.977909815090698, 0.988068102557503, 1.04429493287078, 1.01803069781624, 0.957632272450841, 0.971991500790857, 0.98209395086599, 1.02815448263624, 0.947227198465786, 0.941538843776026, 1.05745885548346, 1.01671992454154, 0.983992269183969, 0.951511089781983, 1.0110983382201, 1.00912039359684, 1.14741321154181, 0.985344569298617, 0.986725720078838, 1.03117619992574, 1.21391930217405, 0.997217690041687, 1.07387278335981, 1.02108776576674, 1.10313006343474, 1.10905015571117, 1.03999508931616, 1.03976033898847, 1.02524837903366, 0.984818521675578, 1.04179889608739, 0.975154632188378, 0.969607959579886, 1.02781726918172, 0.999963290601752, 1.01515310515696, 1.00520167771997, 0.984550628692601, 1.01902810624565, 1.00685219196689, 0.982173452231062, 0.999629285915004, 0.970558368481076, 0.995716235126211, 1.01314341676203, 1.02075675497478, 1.01128668171558, 1.05844449406008, 1.02510935720045, 0.983720171349822, 0.844396082698583, 1.05810846093782, 0.99048977314373, 0.971262209252963, 0.968530578900656, 1.04638759101296, 1.1799017507928, 0.898448146333193, 1.01160891745375, 1.01132611427775, 0.973840647644128, 1.04683923857471, 0.990344793003927, 1.0068683076688, 0.992798241837764, 0.99368375299494, 1.01200003722717, 1.0294016781563, 1.01547984207734, 1.04807175686468, 0.981737356425208, 1.06169292627851, 1.00518291863648, 0.976808854545251, 0.999321592083517, 0.97527078961014, 0.904376968942001, 0.987807226191329, 1.0350293488462, 1.02802944623052, 0.963692701708712, 0.998027399233401, 1.01762747994825, 1.0361812777154, 0.988298193013531, 1.04174794125517, 0.970839140069407, 1.0011387710754, 0.961691863428911, 1.02272120871699, 1.00519180537531, 0.999331326197155, 0.988055521308447, 1.00078630058504, 1.03915754537212, 0.971719181925134, 0.947846525645955, 0.955178087494908, 1.0019107391621, 1.01160524115586, 0.984958748948305, 0.967579294820259, 1.00552471207069, 1.04518978636097, 1.01810784117456, 0.993552343701494, 1.03535983577691, 0.982973964981781, 0.976175417305875, 0.971173421374951, 1.02622192154044, 1.06169292627851, 0.980316131595686, 0.98802873807095, 1.02522486330609, 1.01920704714191, 0.987730950969463, 0.972320506142784, 1.02950031603837, 1.01481027236895, 1.05066348592531, 0.941412086703545, 1.00426249434292, 0.997599618540051, 0.9727707483253, 0.987822018689403, 1.00496006171741, 1.00365488022554, 0.982021737672154, 0.946014836456916, 0.977232083157459, 1.04246004468132, 0.981228463109654, 0.971195860055527, 0.957569129533581, 0.987312165664453, 0.955583610052133, 0.991173211015633, 0.988434021882053, 0.94971029297998, 1.02260060019826, 0.986729432665294, 1.00044978044626, 1.00283798105021, 0.97876379280085, 0.948623031823408, 1.02317511219612, 1.02274213461243, 0.952138762776323, 0.974014522860041, 1.02874293788325, 1.02108205408977, 0.950582622331241, 0.986098109021331, 1.00098916530354, 1.05435029523389, 0.999921440746985, 0.964778188342829, 1.02087753056688, 1.0295810738595, 0.981181990342875, 0.94981916198993, 1.00828646284387, 1.01127872412662, 0.976192285243012, 0.95032633282931, 1.02884118341175, 1.01603776783957, 0.952947066257398, 0.988924105443658, 1.02727453593468, 1.02944328284254, 0.970561666318556, 0.982859453938812, 0.995886713501412, 1.04330648532137, 0.991844865771659, 0.99159250467833, 1.0332159700053, 0.993864541664301, 0.952716253755034, 0.960889912140351, 0.945669021854222, 0.985578531230794, 0.975053113912155, 0.999552576905685, 1.02526821151208, 1.00450298718514, 0.948193972002236, 0.99358065264941, 1.04855364680554, 0.982181523974446, 0.957570494265717, 0.989249667650167, 1.01928030167592, 0.977392376116208, 0.98989833978368, 0.950312758756191, 1.01179069272545, 1.03630963397181, 0.997439452068598, 0.981793158114732, 0.98560918506727, 1.0497573745934, 1.06729226949522, 0.987962794653476, 1.05655507163022, 1.01896087310511, 0.985627836611195, 1.03148215915346, 1.07268555224398, 1.00116324087534, 1.0353274520202, 0.965843323254256, 0.981731445105197, 1.01927876056569, 0.999117162412819, 0.984262994383997, 1.0058994935294, 1.03100765642408, 0.970000664632288, 0.974667000854514, 1.02683721041632, 1.00224180239507, 0.976488446884133, 0.989129579180466, 1.01111944121172, 1.01081759149299, 0.990822520380867, 0.951849309560414, 1.0533258785109, 1.02605855087945, 0.993203883495146, 1.01231349444546, 1.05040134097269, 0.988195090931879, 0.998324259112233, 0.955268105597824, 1.01179535756103, 1.00923640076821, 1.01018973127051, 0.97727388908476, 1.0163531272719, 1.03445181115965, 0.922709820364792, 1.05034425545701, 0.971929096725562, 1.01600521659268, 0.989307124797035, 0.966327502991904, 1.0148486097639, 1.00804453317389, 0.986688556832374, 1.01100519377607, 1.07022911567444, 1.01751745478207, 1.00395256916996, 1.02666291685486, 1.04306886282915, 0.976284796774505, 0.873912939480404, 0.985956634379203, 0.966005821428092, 1.01911378235808, 0.989971040708023, 0.948518684869746, 0.964578663605958, 1.00130118816861, 1.14681217078448, 0.989198271209915, 0.975831372743337, 0.87134009583841, 0.999320371256267, 1.04366317607907, 1.0941742251269, 1.04912747347822, 0.873169695550468, 0.9946703855144, 1.02687904508206, 1.01557590029223, 0.979039928979583, 0.978199700239161, 0.988038704848986, 0.944583404359117, 0.97831517569251, 0.9881631354812, 0.990553852862955, 1.05139702349736, 0.987315661692795, 0.973936995140175, 1.06038641236987, 1.0651525599012, 0.997891074790299, 0.979657304627723, 0.976638433723023, 0.981157058049022, 0.974773098042751, 1.04814547433216, 1.02327857487465, 1.01725074945885, 0.978364366421386, 1.02726007295919, 1.02997589351422, 1.0208112362723, 0.965389721633011, 1.01152741033802, 1.00352090319123, 0.981151102088714, 0.986010324656192, 0.97990659165448, 0.990503768576242, 0.985301104774446, 0.976384165205197, 0.983887706958686, 0.992885571845564, 0.985757622165226, 0.946874017209482, 0.990962963812142, 1.04319324396693, 1.07354098057006, 0.984597785175012, 0.97845443949194, 0.963960215777945, 1.06584156194012, 1.15623372835712, 0.94928101059165, 1.05512096334013, 1.00899261027951, 1.00760894032175, 0.989021593753401, 1.01442722705518, 1.04495346859144, 1.00095646335122, 0.958907195434402, 1.02045280866442, 1.00659622664478, 0.980590749755976, 1.01197688939839, 0.998468538022796, 1.040625279257, 0.934164344256759, 0.992160161968429, 0.998594942355232, 1.0532781805963, 0.974144103277039, 0.946253316413415, 1.00623102828924, 0.988787044999963, 0.987541467770869, 0.999140303075891, 1.05429436081972, 1.01617267860198, 1.17044068684611, 1.05663112916056, 1.01681282884482, 1.02872692218644, 1.00738468152863, 1.0222081131894, 1.01817103171172, 1.01222250929532, 0.97386289237006, 0.987701353725335, 1.00418624697519, 1.0183108729199, 0.956852868616883, 1.05440980534023, 1.01562402108019, 1.00083274000183, 0.945641654423597, 0.966367379950251, 1.02020174816679, 1.01151664724635, 0.940072052642951, 0.991027873457432, 0.984568985852697, 1.02373049431651, 0.985887377562884, 1.05498951399906, 0.98672427011774, 1.02570399134917, 1.06987898201568, 1.02648218241568, 0.971175525661877, 1.03211886190237, 0.992647697074835, 0.986388969656675, 1.02097305537141, 1.04518978636097, 0.987300416455667, 0.985182286987375, 1.02373433952904, 1.01376295257605, 0.992398195656577, 0.983765510339449, 1.06154013507033, 1.01312319643703 )> dput(HM3)c(0.196622289085315, -0.0436031046458981, 0.000820037203846464, 0.392758326108918, 0.0445839547736504, 0.223969403187679, -0.070152338130932, 0.197471312884591, 0.0498910549108242, -0.620322188497616, 0.488037411730214, 0.0461937792271113, 0.0051066586622384, 0.413877974790452, -0.154637441642314, 0.229802002983503, 0.509904610124243, 0.126452664534026, 0.583037470359474, 0.470621010682895, -0.00578078533090776, -0.457074922218691, -0.0506356375273661, -0.767302691971105, -0.000822439375515026, -0.170080770417037, -0.0638533091192526, 0.218492017287635, -0.088210288825341, -0.389219867379597, 1.23355646106213, -1.78773586807154, 0.0117401974737664, -0.154882548871051, -2.11547741687211, -0.0638533091192526, -8.18190789706224, 0.282699360997887, 0.0383693451361519, -0.0638533091192526, 0.832793868600698, 0.894379977535782, -0.302329357989944, 0.573489523345283, -0.223540700260161, 0.229802002983503, 0.0239731624923989, 0.556201388601996, -0.112552578411774, -0.0438764575701239, 0.470621010682895, -4.92500180132548, 0.00309129784132211, 0.172407876390051, 0.229802002983503, 0.061799194890529, -0.000864150216291216, -0.0683834224257835, -1.42874041532869, 0.654009227783557, -0.620322188497616, 0.272034153890376, -0.00558557185457871, 0.229802002983503, -1.53118563423569e-05, 0.470621010682895, -0.736608540541868, -1.47747441666374, -0.00291475050109709, -1.56966101463791, 0.362334298169537, -1.41867286052432, -0.0062864890624406, -0.223090980170635, 0.229802002983503, 0, 0.0147973092972513, 0.757637727251206, 0.332227874554666, -0.620322188497616, -0.0638533091192526, -0.0638533091192526, 1.59477829009842, -0.247635059505396, -0.0638533091192526, 0.384123364351151, -0.909542286753924, -1.61643290186366, -0.00969493151693274, -0.0638533091192526, 0.335128597413319, 0.229802002983503, -3.36005853184083, -1.77772450660144, -0.223359097040026, -4.75082975711953, 0.545441153017038, -0.0181047188208818, 0.229802002983503, 0.718505786757723, -0.199075726922584, 0.0779145211225284, 0.0981591683724576, -0.0638533091192526, 0.771585236053205, -0.124873344480422, -0.143455357050914, -0.982192613814533, 0.840325570227771, -0.0639597669819456, 0.272309718636627, 0.470621010682895, 0.000149945344883234, 0.0179651303218593, 0.586470204231886, 1.12661379530659, 0.587538739887084, -0.389219867379597, 0.231816913894395, -2.32942853843292, 0.229802002983503, 0.470621010682895, 7.7137219916985, 3.14411367083572, 0.0371415305209129, 0.109258089720235, 0.0744990417275174, 0.978949955731298, 0.0046627432182197, 0.0778534035355464, -0.258075504911111, 0.428481177165365, 0.470621010682895, 0.0118295358531435, 0.601929630798962, 0.677233238299559, -0.620322188497616, 0.901650947775265, 0.229802002983503, 0.114385813284502, -0.287236365991277, 0.00362108510216535, 0.54836513813854, -0.360900820378516, 0.901102331983843, 0.303232126663717, -0.389219867379597, -0.389219867379597, -0.0638533091192526, 0.0172621246134547, -0.0638533091192526, 0.036790744537595, 0.0267711437261105, 0.229802002983503, 2.31402345437609, 0.229802002983503, -0.620322188497616, 0.470621010682895, -0.0638533091192526, 0, -0.0638533091192526, 0.683308812634821, 0.598730940691975, 0.229802002983503, 0.697360153425382, 0.00772365161682687, -4.74600966429007, 0.593589435095411, -0.152099577506429, 0.0064938252361837, -0.108940122157535, 0.0514396263381645, 1.10452888209261, 0.229802002983503, -0.0638533091192526, 0, 0.0362637715949993, -2.79167649513235, 0.0221979095188955, 0.122798837911884, -3.07802860403649, 0.887963749928486, -0.0638533091192526, -2.59080601794078, -0.0638533091192526, -0.0720032601992142, 0.188653367126112, -0.390900634446388, 0.00626262322890335, 0.10449726079375, 0.190234594305548, 0.229802002983503, 0.470621010682895, 0.441447072301397, 0.710575973379983, 0.424723018059659, 0.0242933124111495, -0.0638533091192526, 0.221839916416526, 0.470621010682895, -0.0108657434161119, 0.734169111179744, 0.465629851897761, 0.0252290916908343, -0.0261736586703599, 0.470621010682895, 0.00872967160561454, 0.820007851307147, -0.0638533091192526, 0.162601634884078, 0.15876421059534, 0.276805180633414, -0.386980840708979, 0.10228170638373, 0.0199458385530109, 0.470621010682895, 0.360613568422605, 0.0398196823378306, -0.389219867379597, -0.00269176292387149, 0.553663817786709, 0.00803266728255501, 0.470621010682895, -0.389219867379597, 0.0531985700905557, -0.00966390653254687, 0.948851286517476, 0, -0.0889303986002686, -0.289482205789089, 0.470621010682895, -0.620322188497616, -1.33981685878991, 0.0183827591576367, 0.011135182844728, -0.0638533091192526, 2.32607985155626, -0.138083520720171, 0.00471455153770216, 0.158058381916342, 0.00450504854498247, 0.0789824876681455, 0.0704699239866158, -2.19086590383429, 0.0809155162971262, -0.0638533091192526, 0.0329404929656065, 0.0281676116282727, -0.389219867379597, 0.012790919597435, -0.00704771101800125, 0.0403529797537856, 0.0558406758822688, 0.164832137315436, -0.165567865123191, -0.11103429903157, -0.0355024172803945, 9.48260587090123e-05, 0.470621010682895, -0.0495357136064147, 0.229802002983503, 0.0637860580674806, -0.620322188497616, -0.0226657756569641, -0.389219867379597, -0.316625748304681, 0.229802002983503, 0, 0.364124775102099, -0.0310987139252845, 0.492424057922772, -0.224535737231339, -0.133435578504748, 0.229802002983503, 0.184389526960601, -3.97960671764283, 0.223470481648489, -0.620322188497616, 1.57339312469411, -3.97007919079201, 0.028292556618311, -0.0208634007145496, 0.253055735744466, -0.0638533091192526, -1.93884051014153, 0.0301349400625612, -0.0638533091192526, 0.000295057056987376, 0, 0.286160612098488, 0.101207913446722, 0.374419900839882, -0.106217410937095, 0.229802002983503, 2.31067381143729, 2.09201022549168, 0.00385297198146129, 0.0512938203984638, -1.74049624153457, 0.426702921643898, -0.0638533091192526, 0.018935028523515, 0.23126745462646, 0.00767373530818363, 0.229802002983503, 3.84024898682852, -0.0638533091192526, 0.389584248100691, 0.0449003257302091, 1.02228506672615, 0.229802002983503, -0.0638533091192526, -0.0829134652872339, 3.50596545804498, -0.389219867379597, 0.9170368554337, -0.0638533091192526, 0.393117195150408, 0.228802985129773, 0.380899253549764, 0.232617830598094, -0.389219867379597, 0.0459161417216973, 1.31722638132631, -0.151301202089443, -0.116990991708309, 0.927131393095724, 0.287762794679405, 0.53782819173468, -0.389219867379597, 0, 0.778671412967675, -0.389219867379597, -0.0683403974328925, 0, 0.229802002983503, 0.473035927661744, -0.620322188497616, 0.994155024290692, 0.229802002983503, 0.470621010682895, -0.194201456791898, 0.735175033053973, 0, 8.3894395202509, -2.71421951365695, 1.63476338054133, 0, -0.358533993792374, -0.180900357181005, 0.464964929465083, 0.828110705634323, 0.290014059095831, 0.0265807736784206, 0.913325706925416, -0.620322188497616, 0.482569085367064, 0, 0.999426501553857, -0.0638533091192526, -0.894190901951266, 0.0608976332239153, -0.389219867379597, 0.000920175777920006, 0.0444241832790267, -0.389219867379597, 1.77775509259178, 0.00731201645980821, 0, -0.620322188497616, 0.229802002983503, 5.07464022484589, 1.48600912617683, 0.037030406316896, 5.19861898546793, 0.614580107047209, 0.140671508556198, -0.0638533091192526, 0.470621010682895, 1.44599607789379, 0.229802002983503, 0.0337669838054181, -0.339507807487096, -0.227604499761264, -0.0126140839785072, 0.329583322374931, -0.348480271857373, 0.229802002983503, 0.220851780815745, -0.00466286305694716, 0.470621010682895, 1.94004188027446, 0.00769634829635375, 0.229802002983503, 0.229802002983503, -0.0638533091192526, 0.00196933273638366, 0.362886861307995, -0.010895368171175, 0.00517992475169629, 0.0121875763733234, 0.229802002983503, -0.389219867379597, -0.000556322059116982, 0.229802002983503, 0.00260711445755056, -0.58609877956866, 0, 0.173845846564558, 0.050042474875399, -0.608356727049781, 1.29406201978428, -0.0207947874733201, 0.00589643228835565, 0.720668560955405, -0.0638533091192526, 0.0325689306223551, -0.620322188497616, -0.389219867379597, -0.0638533091192526, -0.620322188497616, 0.0384932081048732, -0.0349291605765668, 0.00798065241516178, -0.134723236994354, -0.0638533091192526, 0.281152548562933, 0.785134308633961, 0.00911501343278954, 0.0290625580516694, 0.229802002983503, 0.0364502381509222, 0.0200267754432485, 0.470621010682895, -2.30392713054924, 0.0133977174531081, 0.0313438687192373, -0.453629796591262, -0.444456614744397, 0.470621010682895, -0.00419309963021769, 0.229802002983503, 0.781666390558601, 0.263209713357162, -0.00288720581609739, 0.0157812058748433, 0.377266856994834, 0.211102246795362, -0.0244674117557579, 0.502934845080243, 0.470621010682895, -0.620322188497616, 0.119508324298399, 0.68156448564652, -0.389219867379597, 0.344388633359758, 0.541519544456095, 0.348203898915403, -0.617865773083779, -0.620322188497616, -0.389219867379597, -0.630469325697215, -0.389219867379597, -0.00185171176208817, 0.470621010682895, -0.0638533091192526, 0.0384110765023374, -0.476268477810135, 0.0275459003440332, -0.377613497242655, 0.480114279740138, 0.208177472628734, 0.0388621060580001, 0.314810488790625, -0.389219867379597, 0.622343433254446, 0.229802002983503, 0, 0.0116064532794852, 0.640880718848922, 0.0159256710348949, 0.0294218642201815, -0.11922554805783, 0.470621010682895, 0.0719964703043177, 0.176673405801693, -0.216160070123196, -0.620322188497616, 0.263287565296575, 0.334468720690456, -0.389219867379597, -0.389219867379597, 0, -0.0638533091192526, -0.0638533091192526, 0.328005934417359, 1.98345092754637, -0.0638533091192526, -0.322569885555602, 0.343583272797935, -0.0131035846556284, -0.0638533091192526, 0.332049938227108, 0.229802002983503, -0.184471568949188, 0.0738083137554319, 0.295094806935004, 2.00072915211246, 0.0524057350651284, -0.394994587233133, 0.11082820395266, 0.0470433275207449, -0.0244714107059427, -0.19392136026585, -0.389219867379597, 1.54447845601115, 0, 1.50461847711675, 0.470621010682895, -2.19230689436821, -2.15372326763204, 0.0602893383146939, -0.350076259362557, -0.389219867379597, -0.0491349223300808, -0.347427839125497, -0.125793370606986, -0.389219867379597, 0.218492017287635, -0.389219867379597, -2.19203559916863, 0.470621010682895, -0.0756276343860818, -0.620322188497616, 0.039618360679447, 0.229802002983503, 0.342229794086586, 1.22342842687211, -0.0638533091192526, -0.389219867379597, 0, -0.121360237566266, 0.470621010682895, 0.203522177713664, -2.66081323726908, 0.164981226545032, 0.208989371873146, 0.178977127763616, 0.00534834375159016, 0.0259183781780568, -0.0638533091192526, -0.620322188497616, 3.77342257919255, 0.077694414226668, -0.0638533091192526, -2.76001789665019, 0.93498899883197, 0.229802002983503, 0.229802002983503, -0.189889234701173, -0.878128024239223, 0.229802002983503, -0.971246200836784, 0.00238384747429768, -0.620322188497616, 0.440261892604354, 3.76354782684596, 0.470621010682895, 3.86172131986622, 0.575298756860043, 12.9023010859722, 0.470621010682895, 0.378503973417637, 0.474891582933229, 0, -0.389219867379597, 0.520087612011093, 0.00160600701629905, -1.70670322718237, 0.229802002983503, -0.0349116284595025, -0.389219867379597, 0.229802002983503, -0.0638533091192526, 0.0138641669555371, -1.76999545498462, 0.470621010682895, -0.0638533091192526, 0.470621010682895, 0.568835467760944, 0.196290116211879, 0.00657090150018764, 1.15108667563071, 0.229802002983503, 1.39616453144586, -0.0847185084207546, -0.063387618790934, 0.470621010682895, 0.111214507604595, -0.0859882232308096, 0.229802002983503, 0.00453833599472268, 0.334589717726727, 0.470621010682895, -0.390600326717378, 0.254343160688718, -0.951335732362531, -0.0638533091192526, -0.389219867379597, 0.185995171841162, -0.0638533091192526, 0.0161178324221534, -0.702070844948495, -0.466435025160672, 0.470621010682895, 0.470621010682895, -0.383876151221017, -0.0638533091192526, -0.0638533091192526, 0.470621010682895, -0.389219867379597, -0.0123155655016255, -0.386709341729674, 0.229802002983503, -0.620322188497616, 0.187872106293471, 1.0998198175547, 0.229802002983503, -0.0111456829865045, -0.620322188497616, -0.620322188497616, 0.0484181771965215, 0.29713373197861, 1.03416257683562, 0.470621010682895, -1.14286511426204, -0.620322188497616, -0.620322188497616, 3.57860778510592, 0.229802002983503, -0.62520946847561, 0.290707988341369, 0.0924839451700828, -0.292199030679553, 0.275232409230032, -0.0884019891746591, -0.613845322077624, 0.470621010682895, 0.27263770155515, 0.229802002983503, 0.470621010682895, -0.616577036861926, -0.0638533091192526, 0.229802002983503, 0.103227620279027, 0.000325827725882409, -0.389219867379597, -0.0213033086486025, 1.1517268134498, -0.0027549233829829, -5.20036700047062, -0.389219867379597, 1.38009140442044, 0.188112123387496, -0.389219867379597, -0.0715310034898503, 0.229802002983503, -1.42113754281828, 0.0671280483594289, -0.866540256758301, -0.389219867379597, -0.389219867379597, 0.112435457850701, -0.162158911168545, 0.470621010682895, 0.470621010682895, 0.0211915910476394, -0.00153721649859708, -0.0638533091192526, -0.102776844490052)> dput(HM2)c(0.016497438441392, -0.0121005433105642, 0.0340103138875006, 0.0393128837416979, 0.144718671661076, 0.0775923152157973, 0.000894372752462123, 0.0129080340603581, -0.0022179741964203, 0.0540058630486591, 0.0383234745402589, -0.0142841740056228, -0.0113383036972718, 0.00764362896437113, 0.022570207227843, 0.0892462240318431, 0.060498120257716, 0.0432525311181986, 0.00222557516581898, 0.0493381989550945, -0.0116459907029527, -0.112480015005373, 0.0182691285457092, 0.0248597234825647, 0.00754701511666922, 0.0471476327719148, 0.0625841102244406, 0.0303698631973417, 0.00781124380799404, -0.0168950573556397, 0.0473901805181147, 0.00740505106540693, -0.0152639817574294, 0.00916841478852549, 0.0409730632910991, 0.0625866632066982, 0.00664005076885597, 0.0103946833001679, 0.0243728672440622, 0.0722309706115829, 0.0174699387206196, -0.088714507487996, -0.00504535647738195, 0.00927272338803572, -0.00707755664004029, 0.209001332673238, 0.0280975011236682, 0.0185107628508926, -0.0152895488479284, 0.0293166958720994, 0.0839281669393395, 0.0350355281775659, -0.0214691529922399, -0.00698847060167527, 0.069853381162298, 0.00880702674287574, 0.0440111442331915, 0.0576762465158807, 0.0180025302908308, 0.0104372279684426, 0.0399937793788931, 0.0484415593089806, 0.0359627022827372, 0.0610406756211853, 0.0400425377047152, 0.00783749255154968, 0.0033626359803225, 0.0253846624900874, 0.028956317299215, 0.0220327419434368, 0.0055491218235435, 0.021359789760335, 0.0053563472471669, 0.00770764128276149, 0.120606533813112, 0.0338481150043749, 0.00480652155775551, -0.0208260153687132, 0.0264346940874102, 0.0254170849175835, 0.0549828722223003, -0.0197153554154837, 0.0146319132316291, 0.0223773253300461, 0.046744336162787, 0.0439389840326429, 0.0730303072697907, 0.0157399337823011, 0.0189220332073482, 0.0332902036920697, -0.00629466834494764, 0.0674012192688983, 0.0200657055355507, 0.0101015050127517, 0.0425927774526406, 0.0282767872201141, 0.00648039037553307, 0.0515174537352363, 0.128342038159934, 0.0432170296083376, 0.01871577325763, 0.122157724187454, 0.0336635358211635, 0.0225239126708406, 0.0183439669703353, 0.134384074630845, 0.00984528984402488, -0.049573212443543, 0.0459003250172428, 0.0354638054442889, 0.0209690261585554, 0.0252976241664904, -0.0211582204487595, 0.00564472281613363, 0.0148258737510351, 0.0428454717776024, 0.0315492077820927, 0.0628515089974484, 0.034599813272583, 0.00983450218873532, 0.0790661896510682, 0.076097511515163, 0.015596924720301, 0.010641549474715, 0.00626447132858588, -0.0752885625254798, 0.0263105739632706, 0.0336726716607009, 0.0873459584037158, 0.0137508559242068, -0.00705208890843943, 0.0673463675870221, -0.000264192225152525, 0.0181803111819752, 0.0415821927667122, 0.0258248658300624, 0.0697171115138401, 0.0609029360829605, 0.0252388531172213, 0.0120346601757736, 0.0231724225476939, 0.00664147935356364, 0.00364229190085414, 0.0221357760157817, 0.00873744091784354, -0.0243757212939979, 0.0609405123073909, -0.0110205054092022, 0.0570746855530399, -0.0541885933947211, 0.0790835216830754, 0.0443624834606028, 0.010803474486455, 0.012658784733822, 0.0407444149396382, 0.0758344977136341, 0.0249648665726016, 0.0706224364244773, 0.0617623493482699, 0.0157667711676134, 0.159594212558186, 0.10429461374287, 0.0575594583605458, 0.0629746059562333, 0.187704355999386, -0.121475803700469, 0.0316944060343089, 0.0446672218032357, 0.0144595666502411, 0.0581713078328564, 0.0240501430003371, 0.0169003110123663, -0.00441905663049872, 0.0398232696077516, 0.0488599473848877, 0.0333193570494318, -0.0165383461076467, 0.0908431754234104, 0.0145316828198416, 0.0268323550870429, -0.00807316790584186, 0.0643886942067867, 0.0132605944827886, 0.0225125532638365, -0.029400634077785, 0.0470539042942522, 0.0266903807836804, 0.0216184350463828, -0.00196619725935374, -0.00896821424676157, 0.0471292741982513, 0.0153758143276018, 0.0391647510007153, 0.0638918758798112, 0.0350540963584708, 0.0621376260090577, -0.0235965026923011, 0.0722625556919611, -0.00136537610871872, 0.00876826451613888, 0.0314000163087439, 0.0327764509794023, 0.0416905332713813, 0.0287500712769455, 0.0363887020395213, -0.00500079481628151, 0.0284155664844784, -0.0252462616989099, 0.0448399729520494, 0.000185492290551008, 0.0334348196455053, 0.0875709173367935, 0.0351964196451633, 0.232571060368655, 0.1090264053299, 0.0617423514625135, 0.0768976100544436, -0.0546347871751927, 0.0996882491247678, 0.0381052389461968, 0.0652248201643501, 0.0858993079060812, 0.0666492513259647, 0.0751282298723881, -0.0192055466287929, 0.0869162270419438, 0.0162427091867147, 0.0351089781252477, 0.0226340139536196, 0.0652987163108841, 0.0779638975412273, 0.117722278377793, -0.0394478774616255, 0.0438529807975176, 0.0881967320593799, 0.0588214648998437, -0.0184036676567495, 0.0140741349441621, 0.0161750696830995, 0.0118833913020066, 0.00937605882553054, -0.0455051243509685, 0.0418377741899513, -0.0112867686098609, 0.0101123419174794, -0.00470124454451681, 0.000956333395138531, -0.013981828106854, 0.05549118128867, -0.0224186715153298, 0.0186897582435067, 0.0169772716816739, -0.0179058332425567, -0.00353064879469387, 0.0269073443173487, 0.011369485145996, 0.0753871802564881, 0.184940758413157, 0.0962788588369411, 0.12233382584365, 0.0542611920398092, 0.0470414915942155, 0.0303505098818263, 0.00573452177124659, 0.00764243118994532, 0.0586726631015619, 0.106336058543696, -0.0222151019972231, 0.00630121965465554, 0.0624011763113852, 0.0372172786669568, 0.0226016288240546, 0.0939930244398409, 0.0767415904317717, 0.0238800474741997, 0.0151188247761029, 0.134843980893931, -0.0023819116674762, 0.00287890065299971, 0.0303739452657181, -0.00394798169311598, -0.00886454847938266, 0.0530899335995167, -0.00526457886952308, 0.100251697020821, 0.0651999010773084, 0.0618461082131486, 0.0746686396348302, 0.0225108225108226, -0.0228981338001482, -0.00958321904192527, 0.0301744325038945, 0.0510329188455982, -0.0184730200018259, 0.0702506964772114, 0.0167199245415362, 0.0790156649374397, -0.028524529551306, 0.0133581966776628, 0.025585253422798, 0.172427142313816, 0.0675994203009362, 0.00336311873127013, 0.0493948607018135, 0.218437612231768, 0.0214594460427004, 0.0907841657749202, 0.0333163617639509, 0.177206388698409, 0.126401976128862, 0.0399950893161636, 0.0501927169716304, 0.0893264027232592, 0.0157983828191964, 0.0615798877852506, -0.0197129750106304, -0.0108884320377597, 0.0480698262099342, 0.00512957625928131, 0.0157721009527848, 0.00576798852432315, 0.132233222996491, 0.0427798891731844, 0.0213946620292803, 0.137026176169503, 0.106996875883653, -0.0054111837253851, 0.0251880361118362, 0.0253902053162975, 0.0270577225980805, 0.0124293785310734, 0.0743211614709804, 0.0322779541039503, -0.000515082314443601, -0.15098468271335, 0.0705935165241118, 0.00396949242984507, 0.00570413156689748, -0.028337357038222, 0.067618643584239, 0.215558122382694, -0.0902178675044036, 0.0116089174537522, 0.0163203173112244, 0.053199024052846, 0.190954107085158, -0.00965520699607334, 0.0137508862783826, 0.0551559553375383, 0.0522566319201845, 0.0120000372271673, 0.0661660238047397, 0.0393034160850182, 0.0519061657312619, -0.0104570268884604, 0.0691173523364065, 0.0161805435668569, 0.017889600764444, 0.00112726390517828, 0.0127812045951454, -0.0689255559600801, 0.0231502379228566, 0.0350293488462002, 0.0474816278264511, -0.00418170038125466, 0.0353685604292087, 0.0176274799482486, 0.0430171958669913, 0.0875537735181209, 0.070485815496694, 0.0135133879845454, 0.0128708660489427, 0.051611788565405, 0.0227212087169909, 0.0073359858475243, 0.00404515320751896, -0.00440846200360685, 0.0659739938613625, 0.0460166710841459, 0.0164323471803848, -0.00986110969267727, -0.0393527714903421, 0.0187532041738799, 0.0120528540944261, 0.048649745777751, -0.016576662520347, 0.00722036925799145, 0.0532607499622092, 0.0287269581620362, 0.098387602988942, 0.0515373332109274, -0.00594807446048738, -0.012996698372473, 0.186569861135154, 0.030123906032987, 0.0853131761769354, 0.0031929989708665, 0.0555338071316984, 0.0330892102352149, 0.0325300150784036, -0.00129426068643155, 0.0964465282035648, 0.0748083984068019, 0.014810272368951, 0.0727362482346641, -0.022994161418619, 0.0176067452321714, 0.0316353702314177, 0.0366753960255026, 0.132973503081211, 0.00537653915699314, 0.0293447867014306, 0.00587487992108688, -0.0465459905172109, -0.0208313288728689, 0.0461567115064294, -0.00992439500984909, 0.0478692174283319, 0.15870237135342, 0.0555146507925898, 0.0929129911374694, 0.136269426745194, 0.032515127489143, -0.0177415950997095, 0.0242936475495824, 0.0128679606829178, 0.00550255711518526, 0.00950135633958283, -0.0171614203848253, -0.0480106149706695, 0.0436386144400421, 0.030020737993979, -0.0207207590715261, 0.118800465447344, 0.0287429378832495, 0.0277036046980229, -0.0326376675279461, 0.0111603851297697, 0.0168167717634637, 0.0543502952338948, 0.0268780423509474, 0.0244551896836229, 0.0330102007094411, 0.049560008022367, 0.0830113020712642, -0.0360281667532304, 0.0254731639150768, 0.019583911716062, 0.0311623362566958, 0.00306244869413074, 0.0687257755440167, 0.0205871906806436, -0.00980792960340933, 0.0430516082564022, 0.0402780110730929, 0.0705036986824154, 0.025854270339128, 0.108621667399996, 0.00718685874587846, 0.0571556864539545, 0.109159849895189, -0.00840749532166959, 0.0463361727990188, 0.0651635196532618, 0.107210781390985, 0.134765229575272, 0.00173368529272275, -0.0123735133796356, -0.0136090591818897, 0.0534703507636681, 0.0252682115120829, 0.0045029871851435, -0.032195767437093, 0.0467488481089099, 0.0538227606085845, -0.0118386798369731, -0.0280299494295351, 0.0140538628567341, 0.0305966571267272, -0.00988880417457172, -0.00202667375935174, -0.0227460178374512, 0.0117906927254463, 0.0508373391209442, 0.20565913566541, 0.079177499709108, 0.0422151179934303, 0.084419174697904, 0.0672922694952164, -0.00562397110021092, 0.0565550716302232, 0.0189608731051132, 0.0453269153630163, 0.0409743262622376, 0.0726855522439788, 0.0185422373323943, 0.0700699839671905, -0.00222797184477677, -0.00250681151008622, 0.0255048645524291, 0.000885511372841601, 0.0788210113117177, 0.0116542476851704, 0.031007656424076, 0.011572121687957, 0.00197091513991245, 0.0332881463280234, 0.0115574465474555, -0.0156436963370336, 0.224908551812914, 0.0160024082692785, 0.0108175914929918, 0.0850714918317297, -0.0209549958807167, 0.0649434433474199, 0.0572507308261867, 0.0108695652173913, 0.0149885395421411, 0.0504013409726928, 0.000985727295810551, 0.00206155161241882, -0.0273818619348245, 0.0117953575610268, 0.0160740457598691, 0.0439509870338097, 0.000374131432729126, 0.030965232935552, 0.0680925204656592, -0.040084138491466, 0.0579554457139488, -0.0280709032744379, 0.0245619981154038, 0.0332658264722017, 0.0307493365246973, 0.0663529386077719, 0.0108866234143253, 0.0504739490524921, 0.0110051937760747, 0.114486710683534, 0.0885070446505914, 0.00713719270420306, 0.027840282585194, 0.0502624411934901, -0.0237152032254946, -0.0783599699259493, 0.00584404515799187, -0.031333005510123, 0.0191137823580835, 0.00399073109721866, -0.00489024968946272, -0.00926327094032102, 0.00380235683181465, 0.157304505375375, 0.0200440859609643, -0.0241686272566629, -0.0800316610669412, 0.0239679002814968, 0.0538951680014091, 0.0941742251268998, 0.0521115186872178, -0.123540922378836, 0.0542314864434063, 0.0343854708502029, 0.0238689195785379, 0.123488443091325, 0.00983601617163751, -0.00112278368930967, -0.0210112398529677, -0.0179204649311611, -0.00187219424504028, -0.0094461471370453, 0.0616047615895669, 0.0582469526595368, 0.00304799229604126, 0.0674836370082559, 0.0853131761769354, 0.0358226068729712, 0.00994622612345991, -0.0217167015464964, 0.0526997601984295, -0.0232294161006039, 0.100227237031891, 0.0294429036389532, 0.0172507494588479, 0.0034823068051, 0.0322430509250401, 0.0401401293054765, 0.0208112362723038, 0.00561429336771978, 0.037707481438362, 0.00862436025594276, 0.00476662316192879, 0.15812712691603, 0.0472541237269534, -0.00949623142375768, 0.00855607871651576, -0.00281567087439197, 0.0397525174385432, -0.00711442815443551, -0.00131577619047549, 0.106909062371648, 0.025164340439287, 0.0577629820111593, 0.0939246700745592, 0.00391223125066969, 0.0124049752133815, -0.0275935528232096, 0.0762231355953777, 0.181010165393349, -0.0347198712523113, 0.0678716698457551, 0.0120798630452986, 0.0245162767779995, 0.0498518908504713, 0.0144272270551826, 0.0449534685914403, 0.000956463351216132, 0.0460805768375294, 0.0483340329448637, 0.0192578144013228, 0.0713319833154848, 0.0664774807491022, 0.0136479583643586, 0.047338990736079, -0.00984473290135361, 0.0791372581960931, 0.0256142818179614, 0.0598611692250246, 0.0265350466465605, 0.068670703501864, 0.00623102828923622, -0.00469207491878694, 0.157504094271494, 0.116984111424978, 0.0875878669508734, 0.0161726786019788, 0.175935713544914, 0.0637705286819113, 0.0197080817743348, 0.0452129305548087, 0.0233338613388849, 0.0936152099345934, 0.0199808837233982, 0.0274312796611153, 0.0721161218673364, 0.17082095580651, 0.034052131044711, 0.0512562246908417, 0.0487107440041036, 0.153481867586958, 0.0213458465510684, 0.0133431492518521, 0.119009291067923, 0.0253607374472143, 0.0202017481667936, 0.011516647246353, 0.0339052007553662, 0.0313036367875989, -0.00639827115782904, 0.0237304943165091, 0.00669172141737004, 0.0854219038259585, 0.0181012761967982, 0.0372169953336968, 0.219164421366707, 0.0387279347673063, -0.00326722366281047, 0.0611109647647912, 0.0724982521544455, 0.0114916829563205, 0.0264328043306142, 0.100227237031891, 0.0694579153964423, 0.0256998227540187, 0.0937017943889341, 0.0137629525760519, -0.0046036224834336, 0.0270242177828994, 0.0650551686301645, 0.01402255124967) very many thanks for your time and effort... yours sincerely AKSHAY M KULKARNI ________________________________________ From: R-help <r-help-bounces at r-project.org> on behalf of akshay kulkarni <akshay_e4 at hotmail.com> Sent: Wednesday, March 20, 2019 1:32 PM To: R help Mailing list Subject: [R] problem with nlsLM..... dear members, Yesterday, Duncan identified a silly mistake in an nls call...in the list of starting values, one of the names of the variable was getting repeated. But I am experiencing the same problem again, with a different formula:> formulaDH3HM1 ~ (a + (b * ((HM2 + 0.3)^(1/3)))) * (c * log(HM3 + 27)) here HM1 is the response variable, and HM2 and HM3 are predictors.....> nonlin_modDH3 <- nls(formulaDH3, start = list(a = 0.43143, b = 0.68173,c = 0.02954))Error in nlsModel(formula, mf, start, wts) : singular gradient matrix at initial parameter estimates> nonlin_modDH3 <- nlsLM(formulaDH3, start = list(a = 0.43143, b = 0.68173,c = 0.02954))Error in nlsModel(formula, mf, start, wts) : singular gradient matrix at initial parameter estimates I am using nlsLM function from the minpack.lm package which says that it will converge when nls fails with singular gradient matrix error... Is there again a silly mistake(pardon me again if there is one!), or is the problem serious? If it is serious, any pointers towards a solution? very many thanks for your time and effort.... yours sincerely, AKSHAY M KULKARNI [[alternative HTML version deleted]] ______________________________________________ R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. [[alternative HTML version deleted]]
On Wed, 20 Mar 2019 08:02:45 +0000 akshay kulkarni <akshay_e4 at hotmail.com> wrote:> formulaDH5 <- as.formula(HM1 ~ (a + (b * ((HM2 + 0.3)^(1/2)))) + > (A*sin(w*HM3 + c) + C))The problem with this formula is simple: the partial derivative with respect to `a` is the same as the partial derivative with respect to `C`. This makes the regression problem have an infinite number of solutions, all of them satisfying equation \lambda_1 * a + \lambda_2 * C + \lambda_3 = 0 for some values of \lambda_i. Gradient-based optimizers (which both nls and nlsLM are) don't like problems with non-unique solutions, especially when the model function has same partial derivative with respect to different variables, making them indistinguishable. Solution: remove one of the variables.> > formulaDH3 > HM1 ~ (a + (b * ((HM2 + 0.3)^(1/3)))) * (c * log(HM3 + 27))The problem with this formula is similar, albeit slightly different. Suppose that (a, b, c) is a solution. Then (\lambda * a, \lambda * b, c / \lambda) is also a solution for any real \lambda. Once again, removing `c` should get rid of ambiguity.> I've checked the Internet for a method of getting the starting > values, but they are not comprehensive....any resources for how to > find the starting values?Starting values depend on the particular function you are trying to fit. The usual approach seems to be in transforming the formula and getting rid of parts you can safely assume to be small until it looks like linear regression, or applying domain specific knowledge (e.g. when trying to it a peak function, look for the biggest local maximum in the dataset). If you cannot do that, there also are global optimization algorithms (see `nloptr`), though they still perform better on some problems and worse on others. It certainly helps to have upper and lower bounds on all parameter values. I've heard about a scientific group creating a pool of many initial Levenberg-Marquardt parameter estimates, then improving them using a genetic algorithm. The whole thing "converged overnight" on a powerful desktop computer. -- Best regards, Ivan
dear Ivan, THanks for the reply...... But doesn't removing some of the parameters reduce the precision of the relationship between the response variable and the predictors(inefficient estimates of the coefficients)? very many thanks for your time and effort.... yours sincerely, AKSHAY M KULKARNI ________________________________ From: Ivan Krylov <krylov.r00t at gmail.com> Sent: Wednesday, March 20, 2019 3:06 PM To: akshay kulkarni Cc: R help Mailing list Subject: Re: [R] problem with nlsLM..... On Wed, 20 Mar 2019 08:02:45 +0000 akshay kulkarni <akshay_e4 at hotmail.com> wrote:> formulaDH5 <- as.formula(HM1 ~ (a + (b * ((HM2 + 0.3)^(1/2)))) + > (A*sin(w*HM3 + c) + C))The problem with this formula is simple: the partial derivative with respect to `a` is the same as the partial derivative with respect to `C`. This makes the regression problem have an infinite number of solutions, all of them satisfying equation \lambda_1 * a + \lambda_2 * C + \lambda_3 = 0 for some values of \lambda_i. Gradient-based optimizers (which both nls and nlsLM are) don't like problems with non-unique solutions, especially when the model function has same partial derivative with respect to different variables, making them indistinguishable. Solution: remove one of the variables.> > formulaDH3 > HM1 ~ (a + (b * ((HM2 + 0.3)^(1/3)))) * (c * log(HM3 + 27))The problem with this formula is similar, albeit slightly different. Suppose that (a, b, c) is a solution. Then (\lambda * a, \lambda * b, c / \lambda) is also a solution for any real \lambda. Once again, removing `c` should get rid of ambiguity.> I've checked the Internet for a method of getting the starting > values, but they are not comprehensive....any resources for how to > find the starting values?Starting values depend on the particular function you are trying to fit. The usual approach seems to be in transforming the formula and getting rid of parts you can safely assume to be small until it looks like linear regression, or applying domain specific knowledge (e.g. when trying to it a peak function, look for the biggest local maximum in the dataset). If you cannot do that, there also are global optimization algorithms (see `nloptr`), though they still perform better on some problems and worse on others. It certainly helps to have upper and lower bounds on all parameter values. I've heard about a scientific group creating a pool of many initial Levenberg-Marquardt parameter estimates, then improving them using a genetic algorithm. The whole thing "converged overnight" on a powerful desktop computer. -- Best regards, Ivan [[alternative HTML version deleted]]
Of course, you might just try a more powerful approach. Duncan responded to the obvious issue earlier, but the second problem seems to need the analytic derivatives of the nlsr package. Note that nlsLM uses the SAME very simple forward difference derivative approximation for the Jacobian. Optimization folk will generally say "singular Jacobian" and the singular values reported by nlsr show how bad the case is here. Note that the nlsr output summary seems to imply that the singular values are associated with specific parameters. My bad -- I wanted to keep the summary tidy. The sv's apply to the problem in general, but there are as many of them as parameters, so they fit on the page nicely where I've put them. The singularity leads to no standard errors, of course. JN>> library(nlsr) >> nonlin_modDH5 <- nlxb(formulaDH5, start = list(a = 0.43143, b = 0.68173,A = 0.09,w = 0.8,c = 0.01,C = 0.94)) > vn:[1] "HM1" "a" "b" "HM2" "A" "w" "HM3" "c" "C" > no weights >> nonlin_modDH5 > nlsr object: x > residual sumsquares = 0.66987 on 680 observations > after 15 Jacobian and 20 function evaluations > name coeff SE tstat pval gradient JSingval > a 0.0929101 NA NA NA -5.817e-07 42.97 > b 0.541246 NA NA NA -3.359e-07 7.043 > A 0.00921275 NA NA NA 9.42e-08 0.984 > w 0.545654 NA NA NA -8.693e-09 0.195 > c -0.770181 NA NA NA -5.2e-09 0.07464 > C 0.60148 NA NA NA -5.817e-07 7.567e-14 >>On 2019-03-20 4:20 a.m., akshay kulkarni wrote:> dear members, > I think Duncan's solution is not working...I've checked the function again: > >> formulaDH5 <- as.formula(HM1 ~ (a + (b * ((HM2 + 0.3)^(1/2)))) + (A*sin(w*HM3 + c) + C)) >> nonlin_modDH5 <- nls(formulaDH5, start = list(a = 0.43143, b = 0.68173,A = 0.09,w = 0.8,c = 0.01,C = 0.94)) > Error in nlsModel(formula, mf, start, wts) : > singular gradient matrix at initial parameter estimates >> nonlin_modDH5 <- nlsLM(formulaDH5, start = list(a = 0.43143, b = 0.68173,A = 0.09,w = 0.8,c = 0.01,C = 0.94)) > Error in nlsModel(formula, mf, start, wts) : > singular gradient matrix at initial parameter estimates > > > I've checked the Internet for a method of getting the starting values, but they are not comprehensive....any resources for how to find the starting values? > >> dput(HM1) > c(1.01484280343579, 0.977004104656811, 1.02448653468064, 1.01562102015533, > 0.968359321714289, 0.99105072887847, 0.99384582083167, 1.00579414727333, > 0.967593120445675, 1.04694148058855, 1.03832347454026, 0.971040156128456, > 0.976967848281943, 0.990386686964446, 1.02257020722784, 0.994529161072552, > 1.05361176882747, 0.988021514764882, 0.998909692369571, 1.04933819895509, > 0.988354009297047, 0.878584020586706, 1.01438895222572, 1.01522203155842, > 0.999979601913003, 0.975862934766315, 1.03948445565434, 1.02493339899053, > 0.972267168470219, 0.971001051421653, 1.03066167719129, 0.967898970631469, > 0.976606662010519, 0.990061873979734, 1.03398666689317, 1.05491455733517, > 0.995997711923663, 0.991213393857838, 0.9903216916016, 1.06850794640807, > 1.01345738121581, 0.877847194198055, 0.992124544661245, 1.00927272338804, > 0.988196514422814, 0.987504905313256, 0.990274516132497, 1.01484624802751, > 0.9800176904083, 0.969321725342799, 1.07407427451262, 1.02023130729371, > 0.975827723120998, 0.988260886231393, 1.05116598585815, 0.977996171738906, > 0.985118207891832, 0.98243346941999, 0.991380612684958, 1.00960741365585, > 1.03062446605116, 1.04176358759364, 1.02494798972349, 1.04645592406625, > 0.999998705820515, 0.972161829098397, 0.991313521356105, 1.0211561076261, > 0.971257832217016, 1.00935026461508, 0.997140402835885, 1.00719609467891, > 0.97483865743955, 0.987491380127905, 1.0643888147255, 1.00804564512905, > 0.989366232219398, 0.942042386899482, 1.0140328534339, 0.98812919092058, > 1.04584882138055, 0.970586857498767, 1.0098232311784, 1.02237732533005, > 0.99306513943649, 0.963808401790738, 1.03577231048959, 1.00540101137939, > 0.970458918298484, 0.973460294926879, 0.992676651187501, 1.04079931972326, > 0.988928168736541, 0.986376934855979, 1.04117941173535, 1.01252015337269, > 0.920578394310677, 0.98933093765412, 0.98116698970429, 0.995498900493761, > 0.96463760451942, 1.1059686605887, 1.03366353582116, 0.981256131441973, > 1.0152599452654, 0.995362080418312, 0.997276311537458, 0.943438355295013, > 1.04025117202718, 1.03102737097366, 1.02096902615856, 1.02506560388494, > 0.959364103040633, 0.987217067188943, 1.00454456275356, 1.03517749036747, > 1.0148342900634, 0.974518005568706, 1.02515903830848, 1.00435361604303, > 0.973400954462685, 0.981702992961201, 1.0155969247203, 1.01064154947471, > 0.957131570492054, 0.88504625471737, 1.01849907662046, 1.01503806358198, > 0.987004149653273, 0.974485857983481, 0.987572979379099, 1.0037529762248, > 0.976026658183349, 0.983176178747953, 1.03812943411666, 1.01828203593425, > 0.984139742592733, 1.00377243020886, 1.02118652563454, 1.01115776483144, > 0.98387406692053, 0.985919715423209, 0.989550590454508, 1.01845373071313, > 1.00394660346757, 0.949076679285431, 1.06094051230739, 0.981940494629297, > 0.982812578115724, 0.929673163266673, 1.05359335975355, 1.03498999963467, > 0.989218608625026, 0.994412680504384, 1.03162650392014, 1.04359975620911, > 0.96938669600183, 0.987150178669349, 0.990503131271205, 1.01120231626779, > 0.977334529946535, 0.966013274319284, 1.04966722359666, 1.04745672849702, > 0.960799643211444, 0.866626315091455, 1.01316731305781, 1.02919067036911, > 0.988567285725018, 0.978702298855537, 1.0186604054056, 1.01398864226215, > 0.985492431198792, 1.03982326960775, 1.02287049736119, 1.02357106122821, > 0.977519287403578, 0.993818572820706, 1.01139405704906, 1.02683235508704, > 0.943370973180458, 0.970153991236375, 0.970746163945049, 1.00996886938921, > 0.970599365922215, 1.03230385881209, 1.02072718512322, 1.0161024503161, > 0.987718207880278, 0.987512809150475, 1.04108232940019, 1.0153758143276, > 1.03916475100072, 0.959776942350879, 1.01739288375256, 1.05438479662213, > 0.970479916939806, 0.979826128477137, 0.982800613999074, 0.977050857426291, > 0.977474025608337, 0.972905352371901, 1.02191626900472, 1.02737043327345, > 0.987565251408109, 0.93131925605196, 0.991469304659888, 0.949708678221412, > 0.948662234856045, 0.938158485016718, 1.02342896552764, 1.01869899424866, > 1.01244484998263, 0.990637832491416, 1.04591108144934, 0.951244278685872, > 0.977265525807748, 0.942206977147219, 1.09440128638859, 1.02935716108991, > 0.978428723706514, 1.08589930790608, 1.0015813231405, 1.07512822987239, > 0.976356469419301, 0.972775004620642, 1.00954673593815, 0.992551447194369, > 0.985819189451289, 0.975310750212573, 1.05999783258221, 1.07815688799274, > 0.959648862885262, 1.03418767541976, 1.07207529899183, 1.04949264142055, > 0.966872387358102, 0.963564695272614, 1.01310836328613, 0.996622968927382, > 1.00202486063801, 0.948215304098709, 1.02845448262427, 0.987124642586768, > 0.999269328077687, 0.964674178364545, 0.991913103743918, 0.970556592778505, > 0.979495816235886, 0.949160643807912, 0.999611005677085, 1.01697727168167, > 0.966362681248743, 0.938703012004999, 1.01394761650376, 1.011369485146, > 0.975929406359934, 0.97111480362557, 1.0581474202687, 1.03965938660391, > 0.990447147628825, 0.967286377976687, 0.968162001740811, 1.00573452177125, > 0.974628505381728, 0.983183640545729, 1.08185959707149, 0.976533333333333, > 0.932582771965921, 1.02205682784386, 1.02162002635618, 1.00634335266967, > 1.03045302554561, 1.05015537832235, 1.0238800474742, 1.0151188247761, > 0.951176244898346, 0.937999477475998, 0.986664690881963, 1.00889938014614, > 0.972546365957459, 0.937560562249233, 0.953227957137494, 0.964284336810156, > 0.977909815090698, 0.988068102557503, 1.04429493287078, 1.01803069781624, > 0.957632272450841, 0.971991500790857, 0.98209395086599, 1.02815448263624, > 0.947227198465786, 0.941538843776026, 1.05745885548346, 1.01671992454154, > 0.983992269183969, 0.951511089781983, 1.0110983382201, 1.00912039359684, > 1.14741321154181, 0.985344569298617, 0.986725720078838, 1.03117619992574, > 1.21391930217405, 0.997217690041687, 1.07387278335981, 1.02108776576674, > 1.10313006343474, 1.10905015571117, 1.03999508931616, 1.03976033898847, > 1.02524837903366, 0.984818521675578, 1.04179889608739, 0.975154632188378, > 0.969607959579886, 1.02781726918172, 0.999963290601752, 1.01515310515696, > 1.00520167771997, 0.984550628692601, 1.01902810624565, 1.00685219196689, > 0.982173452231062, 0.999629285915004, 0.970558368481076, 0.995716235126211, > 1.01314341676203, 1.02075675497478, 1.01128668171558, 1.05844449406008, > 1.02510935720045, 0.983720171349822, 0.844396082698583, 1.05810846093782, > 0.99048977314373, 0.971262209252963, 0.968530578900656, 1.04638759101296, > 1.1799017507928, 0.898448146333193, 1.01160891745375, 1.01132611427775, > 0.973840647644128, 1.04683923857471, 0.990344793003927, 1.0068683076688, > 0.992798241837764, 0.99368375299494, 1.01200003722717, 1.0294016781563, > 1.01547984207734, 1.04807175686468, 0.981737356425208, 1.06169292627851, > 1.00518291863648, 0.976808854545251, 0.999321592083517, 0.97527078961014, > 0.904376968942001, 0.987807226191329, 1.0350293488462, 1.02802944623052, > 0.963692701708712, 0.998027399233401, 1.01762747994825, 1.0361812777154, > 0.988298193013531, 1.04174794125517, 0.970839140069407, 1.0011387710754, > 0.961691863428911, 1.02272120871699, 1.00519180537531, 0.999331326197155, > 0.988055521308447, 1.00078630058504, 1.03915754537212, 0.971719181925134, > 0.947846525645955, 0.955178087494908, 1.0019107391621, 1.01160524115586, > 0.984958748948305, 0.967579294820259, 1.00552471207069, 1.04518978636097, > 1.01810784117456, 0.993552343701494, 1.03535983577691, 0.982973964981781, > 0.976175417305875, 0.971173421374951, 1.02622192154044, 1.06169292627851, > 0.980316131595686, 0.98802873807095, 1.02522486330609, 1.01920704714191, > 0.987730950969463, 0.972320506142784, 1.02950031603837, 1.01481027236895, > 1.05066348592531, 0.941412086703545, 1.00426249434292, 0.997599618540051, > 0.9727707483253, 0.987822018689403, 1.00496006171741, 1.00365488022554, > 0.982021737672154, 0.946014836456916, 0.977232083157459, 1.04246004468132, > 0.981228463109654, 0.971195860055527, 0.957569129533581, 0.987312165664453, > 0.955583610052133, 0.991173211015633, 0.988434021882053, 0.94971029297998, > 1.02260060019826, 0.986729432665294, 1.00044978044626, 1.00283798105021, > 0.97876379280085, 0.948623031823408, 1.02317511219612, 1.02274213461243, > 0.952138762776323, 0.974014522860041, 1.02874293788325, 1.02108205408977, > 0.950582622331241, 0.986098109021331, 1.00098916530354, 1.05435029523389, > 0.999921440746985, 0.964778188342829, 1.02087753056688, 1.0295810738595, > 0.981181990342875, 0.94981916198993, 1.00828646284387, 1.01127872412662, > 0.976192285243012, 0.95032633282931, 1.02884118341175, 1.01603776783957, > 0.952947066257398, 0.988924105443658, 1.02727453593468, 1.02944328284254, > 0.970561666318556, 0.982859453938812, 0.995886713501412, 1.04330648532137, > 0.991844865771659, 0.99159250467833, 1.0332159700053, 0.993864541664301, > 0.952716253755034, 0.960889912140351, 0.945669021854222, 0.985578531230794, > 0.975053113912155, 0.999552576905685, 1.02526821151208, 1.00450298718514, > 0.948193972002236, 0.99358065264941, 1.04855364680554, 0.982181523974446, > 0.957570494265717, 0.989249667650167, 1.01928030167592, 0.977392376116208, > 0.98989833978368, 0.950312758756191, 1.01179069272545, 1.03630963397181, > 0.997439452068598, 0.981793158114732, 0.98560918506727, 1.0497573745934, > 1.06729226949522, 0.987962794653476, 1.05655507163022, 1.01896087310511, > 0.985627836611195, 1.03148215915346, 1.07268555224398, 1.00116324087534, > 1.0353274520202, 0.965843323254256, 0.981731445105197, 1.01927876056569, > 0.999117162412819, 0.984262994383997, 1.0058994935294, 1.03100765642408, > 0.970000664632288, 0.974667000854514, 1.02683721041632, 1.00224180239507, > 0.976488446884133, 0.989129579180466, 1.01111944121172, 1.01081759149299, > 0.990822520380867, 0.951849309560414, 1.0533258785109, 1.02605855087945, > 0.993203883495146, 1.01231349444546, 1.05040134097269, 0.988195090931879, > 0.998324259112233, 0.955268105597824, 1.01179535756103, 1.00923640076821, > 1.01018973127051, 0.97727388908476, 1.0163531272719, 1.03445181115965, > 0.922709820364792, 1.05034425545701, 0.971929096725562, 1.01600521659268, > 0.989307124797035, 0.966327502991904, 1.0148486097639, 1.00804453317389, > 0.986688556832374, 1.01100519377607, 1.07022911567444, 1.01751745478207, > 1.00395256916996, 1.02666291685486, 1.04306886282915, 0.976284796774505, > 0.873912939480404, 0.985956634379203, 0.966005821428092, 1.01911378235808, > 0.989971040708023, 0.948518684869746, 0.964578663605958, 1.00130118816861, > 1.14681217078448, 0.989198271209915, 0.975831372743337, 0.87134009583841, > 0.999320371256267, 1.04366317607907, 1.0941742251269, 1.04912747347822, > 0.873169695550468, 0.9946703855144, 1.02687904508206, 1.01557590029223, > 0.979039928979583, 0.978199700239161, 0.988038704848986, 0.944583404359117, > 0.97831517569251, 0.9881631354812, 0.990553852862955, 1.05139702349736, > 0.987315661692795, 0.973936995140175, 1.06038641236987, 1.0651525599012, > 0.997891074790299, 0.979657304627723, 0.976638433723023, 0.981157058049022, > 0.974773098042751, 1.04814547433216, 1.02327857487465, 1.01725074945885, > 0.978364366421386, 1.02726007295919, 1.02997589351422, 1.0208112362723, > 0.965389721633011, 1.01152741033802, 1.00352090319123, 0.981151102088714, > 0.986010324656192, 0.97990659165448, 0.990503768576242, 0.985301104774446, > 0.976384165205197, 0.983887706958686, 0.992885571845564, 0.985757622165226, > 0.946874017209482, 0.990962963812142, 1.04319324396693, 1.07354098057006, > 0.984597785175012, 0.97845443949194, 0.963960215777945, 1.06584156194012, > 1.15623372835712, 0.94928101059165, 1.05512096334013, 1.00899261027951, > 1.00760894032175, 0.989021593753401, 1.01442722705518, 1.04495346859144, > 1.00095646335122, 0.958907195434402, 1.02045280866442, 1.00659622664478, > 0.980590749755976, 1.01197688939839, 0.998468538022796, 1.040625279257, > 0.934164344256759, 0.992160161968429, 0.998594942355232, 1.0532781805963, > 0.974144103277039, 0.946253316413415, 1.00623102828924, 0.988787044999963, > 0.987541467770869, 0.999140303075891, 1.05429436081972, 1.01617267860198, > 1.17044068684611, 1.05663112916056, 1.01681282884482, 1.02872692218644, > 1.00738468152863, 1.0222081131894, 1.01817103171172, 1.01222250929532, > 0.97386289237006, 0.987701353725335, 1.00418624697519, 1.0183108729199, > 0.956852868616883, 1.05440980534023, 1.01562402108019, 1.00083274000183, > 0.945641654423597, 0.966367379950251, 1.02020174816679, 1.01151664724635, > 0.940072052642951, 0.991027873457432, 0.984568985852697, 1.02373049431651, > 0.985887377562884, 1.05498951399906, 0.98672427011774, 1.02570399134917, > 1.06987898201568, 1.02648218241568, 0.971175525661877, 1.03211886190237, > 0.992647697074835, 0.986388969656675, 1.02097305537141, 1.04518978636097, > 0.987300416455667, 0.985182286987375, 1.02373433952904, 1.01376295257605, > 0.992398195656577, 0.983765510339449, 1.06154013507033, 1.01312319643703 > ) > > >> dput(HM3) > c(0.196622289085315, -0.0436031046458981, 0.000820037203846464, > 0.392758326108918, 0.0445839547736504, 0.223969403187679, -0.070152338130932, > 0.197471312884591, 0.0498910549108242, -0.620322188497616, 0.488037411730214, > 0.0461937792271113, 0.0051066586622384, 0.413877974790452, -0.154637441642314, > 0.229802002983503, 0.509904610124243, 0.126452664534026, 0.583037470359474, > 0.470621010682895, -0.00578078533090776, -0.457074922218691, > -0.0506356375273661, -0.767302691971105, -0.000822439375515026, > -0.170080770417037, -0.0638533091192526, 0.218492017287635, -0.088210288825341, > -0.389219867379597, 1.23355646106213, -1.78773586807154, 0.0117401974737664, > -0.154882548871051, -2.11547741687211, -0.0638533091192526, -8.18190789706224, > 0.282699360997887, 0.0383693451361519, -0.0638533091192526, 0.832793868600698, > 0.894379977535782, -0.302329357989944, 0.573489523345283, -0.223540700260161, > 0.229802002983503, 0.0239731624923989, 0.556201388601996, -0.112552578411774, > -0.0438764575701239, 0.470621010682895, -4.92500180132548, 0.00309129784132211, > 0.172407876390051, 0.229802002983503, 0.061799194890529, -0.000864150216291216, > -0.0683834224257835, -1.42874041532869, 0.654009227783557, -0.620322188497616, > 0.272034153890376, -0.00558557185457871, 0.229802002983503, -1.53118563423569e-05, > 0.470621010682895, -0.736608540541868, -1.47747441666374, -0.00291475050109709, > -1.56966101463791, 0.362334298169537, -1.41867286052432, -0.0062864890624406, > -0.223090980170635, 0.229802002983503, 0, 0.0147973092972513, > 0.757637727251206, 0.332227874554666, -0.620322188497616, -0.0638533091192526, > -0.0638533091192526, 1.59477829009842, -0.247635059505396, -0.0638533091192526, > 0.384123364351151, -0.909542286753924, -1.61643290186366, -0.00969493151693274, > -0.0638533091192526, 0.335128597413319, 0.229802002983503, -3.36005853184083, > -1.77772450660144, -0.223359097040026, -4.75082975711953, 0.545441153017038, > -0.0181047188208818, 0.229802002983503, 0.718505786757723, -0.199075726922584, > 0.0779145211225284, 0.0981591683724576, -0.0638533091192526, > 0.771585236053205, -0.124873344480422, -0.143455357050914, -0.982192613814533, > 0.840325570227771, -0.0639597669819456, 0.272309718636627, 0.470621010682895, > 0.000149945344883234, 0.0179651303218593, 0.586470204231886, > 1.12661379530659, 0.587538739887084, -0.389219867379597, 0.231816913894395, > -2.32942853843292, 0.229802002983503, 0.470621010682895, 7.7137219916985, > 3.14411367083572, 0.0371415305209129, 0.109258089720235, 0.0744990417275174, > 0.978949955731298, 0.0046627432182197, 0.0778534035355464, -0.258075504911111, > 0.428481177165365, 0.470621010682895, 0.0118295358531435, 0.601929630798962, > 0.677233238299559, -0.620322188497616, 0.901650947775265, 0.229802002983503, > 0.114385813284502, -0.287236365991277, 0.00362108510216535, 0.54836513813854, > -0.360900820378516, 0.901102331983843, 0.303232126663717, -0.389219867379597, > -0.389219867379597, -0.0638533091192526, 0.0172621246134547, > -0.0638533091192526, 0.036790744537595, 0.0267711437261105, 0.229802002983503, > 2.31402345437609, 0.229802002983503, -0.620322188497616, 0.470621010682895, > -0.0638533091192526, 0, -0.0638533091192526, 0.683308812634821, > 0.598730940691975, 0.229802002983503, 0.697360153425382, 0.00772365161682687, > -4.74600966429007, 0.593589435095411, -0.152099577506429, 0.0064938252361837, > -0.108940122157535, 0.0514396263381645, 1.10452888209261, 0.229802002983503, > -0.0638533091192526, 0, 0.0362637715949993, -2.79167649513235, > 0.0221979095188955, 0.122798837911884, -3.07802860403649, 0.887963749928486, > -0.0638533091192526, -2.59080601794078, -0.0638533091192526, > -0.0720032601992142, 0.188653367126112, -0.390900634446388, 0.00626262322890335, > 0.10449726079375, 0.190234594305548, 0.229802002983503, 0.470621010682895, > 0.441447072301397, 0.710575973379983, 0.424723018059659, 0.0242933124111495, > -0.0638533091192526, 0.221839916416526, 0.470621010682895, -0.0108657434161119, > 0.734169111179744, 0.465629851897761, 0.0252290916908343, -0.0261736586703599, > 0.470621010682895, 0.00872967160561454, 0.820007851307147, -0.0638533091192526, > 0.162601634884078, 0.15876421059534, 0.276805180633414, -0.386980840708979, > 0.10228170638373, 0.0199458385530109, 0.470621010682895, 0.360613568422605, > 0.0398196823378306, -0.389219867379597, -0.00269176292387149, > 0.553663817786709, 0.00803266728255501, 0.470621010682895, -0.389219867379597, > 0.0531985700905557, -0.00966390653254687, 0.948851286517476, > 0, -0.0889303986002686, -0.289482205789089, 0.470621010682895, > -0.620322188497616, -1.33981685878991, 0.0183827591576367, 0.011135182844728, > -0.0638533091192526, 2.32607985155626, -0.138083520720171, 0.00471455153770216, > 0.158058381916342, 0.00450504854498247, 0.0789824876681455, 0.0704699239866158, > -2.19086590383429, 0.0809155162971262, -0.0638533091192526, 0.0329404929656065, > 0.0281676116282727, -0.389219867379597, 0.012790919597435, -0.00704771101800125, > 0.0403529797537856, 0.0558406758822688, 0.164832137315436, -0.165567865123191, > -0.11103429903157, -0.0355024172803945, 9.48260587090123e-05, > 0.470621010682895, -0.0495357136064147, 0.229802002983503, 0.0637860580674806, > -0.620322188497616, -0.0226657756569641, -0.389219867379597, > -0.316625748304681, 0.229802002983503, 0, 0.364124775102099, > -0.0310987139252845, 0.492424057922772, -0.224535737231339, -0.133435578504748, > 0.229802002983503, 0.184389526960601, -3.97960671764283, 0.223470481648489, > -0.620322188497616, 1.57339312469411, -3.97007919079201, 0.028292556618311, > -0.0208634007145496, 0.253055735744466, -0.0638533091192526, > -1.93884051014153, 0.0301349400625612, -0.0638533091192526, 0.000295057056987376, > 0, 0.286160612098488, 0.101207913446722, 0.374419900839882, -0.106217410937095, > 0.229802002983503, 2.31067381143729, 2.09201022549168, 0.00385297198146129, > 0.0512938203984638, -1.74049624153457, 0.426702921643898, -0.0638533091192526, > 0.018935028523515, 0.23126745462646, 0.00767373530818363, 0.229802002983503, > 3.84024898682852, -0.0638533091192526, 0.389584248100691, 0.0449003257302091, > 1.02228506672615, 0.229802002983503, -0.0638533091192526, -0.0829134652872339, > 3.50596545804498, -0.389219867379597, 0.9170368554337, -0.0638533091192526, > 0.393117195150408, 0.228802985129773, 0.380899253549764, 0.232617830598094, > -0.389219867379597, 0.0459161417216973, 1.31722638132631, -0.151301202089443, > -0.116990991708309, 0.927131393095724, 0.287762794679405, 0.53782819173468, > -0.389219867379597, 0, 0.778671412967675, -0.389219867379597, > -0.0683403974328925, 0, 0.229802002983503, 0.473035927661744, > -0.620322188497616, 0.994155024290692, 0.229802002983503, 0.470621010682895, > -0.194201456791898, 0.735175033053973, 0, 8.3894395202509, -2.71421951365695, > 1.63476338054133, 0, -0.358533993792374, -0.180900357181005, > 0.464964929465083, 0.828110705634323, 0.290014059095831, 0.0265807736784206, > 0.913325706925416, -0.620322188497616, 0.482569085367064, 0, > 0.999426501553857, -0.0638533091192526, -0.894190901951266, 0.0608976332239153, > -0.389219867379597, 0.000920175777920006, 0.0444241832790267, > -0.389219867379597, 1.77775509259178, 0.00731201645980821, 0, > -0.620322188497616, 0.229802002983503, 5.07464022484589, 1.48600912617683, > 0.037030406316896, 5.19861898546793, 0.614580107047209, 0.140671508556198, > -0.0638533091192526, 0.470621010682895, 1.44599607789379, 0.229802002983503, > 0.0337669838054181, -0.339507807487096, -0.227604499761264, -0.0126140839785072, > 0.329583322374931, -0.348480271857373, 0.229802002983503, 0.220851780815745, > -0.00466286305694716, 0.470621010682895, 1.94004188027446, 0.00769634829635375, > 0.229802002983503, 0.229802002983503, -0.0638533091192526, 0.00196933273638366, > 0.362886861307995, -0.010895368171175, 0.00517992475169629, 0.0121875763733234, > 0.229802002983503, -0.389219867379597, -0.000556322059116982, > 0.229802002983503, 0.00260711445755056, -0.58609877956866, 0, > 0.173845846564558, 0.050042474875399, -0.608356727049781, 1.29406201978428, > -0.0207947874733201, 0.00589643228835565, 0.720668560955405, > -0.0638533091192526, 0.0325689306223551, -0.620322188497616, > -0.389219867379597, -0.0638533091192526, -0.620322188497616, > 0.0384932081048732, -0.0349291605765668, 0.00798065241516178, > -0.134723236994354, -0.0638533091192526, 0.281152548562933, 0.785134308633961, > 0.00911501343278954, 0.0290625580516694, 0.229802002983503, 0.0364502381509222, > 0.0200267754432485, 0.470621010682895, -2.30392713054924, 0.0133977174531081, > 0.0313438687192373, -0.453629796591262, -0.444456614744397, 0.470621010682895, > -0.00419309963021769, 0.229802002983503, 0.781666390558601, 0.263209713357162, > -0.00288720581609739, 0.0157812058748433, 0.377266856994834, > 0.211102246795362, -0.0244674117557579, 0.502934845080243, 0.470621010682895, > -0.620322188497616, 0.119508324298399, 0.68156448564652, -0.389219867379597, > 0.344388633359758, 0.541519544456095, 0.348203898915403, -0.617865773083779, > -0.620322188497616, -0.389219867379597, -0.630469325697215, -0.389219867379597, > -0.00185171176208817, 0.470621010682895, -0.0638533091192526, > 0.0384110765023374, -0.476268477810135, 0.0275459003440332, -0.377613497242655, > 0.480114279740138, 0.208177472628734, 0.0388621060580001, 0.314810488790625, > -0.389219867379597, 0.622343433254446, 0.229802002983503, 0, > 0.0116064532794852, 0.640880718848922, 0.0159256710348949, 0.0294218642201815, > -0.11922554805783, 0.470621010682895, 0.0719964703043177, 0.176673405801693, > -0.216160070123196, -0.620322188497616, 0.263287565296575, 0.334468720690456, > -0.389219867379597, -0.389219867379597, 0, -0.0638533091192526, > -0.0638533091192526, 0.328005934417359, 1.98345092754637, -0.0638533091192526, > -0.322569885555602, 0.343583272797935, -0.0131035846556284, -0.0638533091192526, > 0.332049938227108, 0.229802002983503, -0.184471568949188, 0.0738083137554319, > 0.295094806935004, 2.00072915211246, 0.0524057350651284, -0.394994587233133, > 0.11082820395266, 0.0470433275207449, -0.0244714107059427, -0.19392136026585, > -0.389219867379597, 1.54447845601115, 0, 1.50461847711675, 0.470621010682895, > -2.19230689436821, -2.15372326763204, 0.0602893383146939, -0.350076259362557, > -0.389219867379597, -0.0491349223300808, -0.347427839125497, > -0.125793370606986, -0.389219867379597, 0.218492017287635, -0.389219867379597, > -2.19203559916863, 0.470621010682895, -0.0756276343860818, -0.620322188497616, > 0.039618360679447, 0.229802002983503, 0.342229794086586, 1.22342842687211, > -0.0638533091192526, -0.389219867379597, 0, -0.121360237566266, > 0.470621010682895, 0.203522177713664, -2.66081323726908, 0.164981226545032, > 0.208989371873146, 0.178977127763616, 0.00534834375159016, 0.0259183781780568, > -0.0638533091192526, -0.620322188497616, 3.77342257919255, 0.077694414226668, > -0.0638533091192526, -2.76001789665019, 0.93498899883197, 0.229802002983503, > 0.229802002983503, -0.189889234701173, -0.878128024239223, 0.229802002983503, > -0.971246200836784, 0.00238384747429768, -0.620322188497616, > 0.440261892604354, 3.76354782684596, 0.470621010682895, 3.86172131986622, > 0.575298756860043, 12.9023010859722, 0.470621010682895, 0.378503973417637, > 0.474891582933229, 0, -0.389219867379597, 0.520087612011093, > 0.00160600701629905, -1.70670322718237, 0.229802002983503, -0.0349116284595025, > -0.389219867379597, 0.229802002983503, -0.0638533091192526, 0.0138641669555371, > -1.76999545498462, 0.470621010682895, -0.0638533091192526, 0.470621010682895, > 0.568835467760944, 0.196290116211879, 0.00657090150018764, 1.15108667563071, > 0.229802002983503, 1.39616453144586, -0.0847185084207546, -0.063387618790934, > 0.470621010682895, 0.111214507604595, -0.0859882232308096, 0.229802002983503, > 0.00453833599472268, 0.334589717726727, 0.470621010682895, -0.390600326717378, > 0.254343160688718, -0.951335732362531, -0.0638533091192526, -0.389219867379597, > 0.185995171841162, -0.0638533091192526, 0.0161178324221534, -0.702070844948495, > -0.466435025160672, 0.470621010682895, 0.470621010682895, -0.383876151221017, > -0.0638533091192526, -0.0638533091192526, 0.470621010682895, > -0.389219867379597, -0.0123155655016255, -0.386709341729674, > 0.229802002983503, -0.620322188497616, 0.187872106293471, 1.0998198175547, > 0.229802002983503, -0.0111456829865045, -0.620322188497616, -0.620322188497616, > 0.0484181771965215, 0.29713373197861, 1.03416257683562, 0.470621010682895, > -1.14286511426204, -0.620322188497616, -0.620322188497616, 3.57860778510592, > 0.229802002983503, -0.62520946847561, 0.290707988341369, 0.0924839451700828, > -0.292199030679553, 0.275232409230032, -0.0884019891746591, -0.613845322077624, > 0.470621010682895, 0.27263770155515, 0.229802002983503, 0.470621010682895, > -0.616577036861926, -0.0638533091192526, 0.229802002983503, 0.103227620279027, > 0.000325827725882409, -0.389219867379597, -0.0213033086486025, > 1.1517268134498, -0.0027549233829829, -5.20036700047062, -0.389219867379597, > 1.38009140442044, 0.188112123387496, -0.389219867379597, -0.0715310034898503, > 0.229802002983503, -1.42113754281828, 0.0671280483594289, -0.866540256758301, > -0.389219867379597, -0.389219867379597, 0.112435457850701, -0.162158911168545, > 0.470621010682895, 0.470621010682895, 0.0211915910476394, -0.00153721649859708, > -0.0638533091192526, -0.102776844490052) > >> dput(HM2) > c(0.016497438441392, -0.0121005433105642, 0.0340103138875006, > 0.0393128837416979, 0.144718671661076, 0.0775923152157973, 0.000894372752462123, > 0.0129080340603581, -0.0022179741964203, 0.0540058630486591, > 0.0383234745402589, -0.0142841740056228, -0.0113383036972718, > 0.00764362896437113, 0.022570207227843, 0.0892462240318431, 0.060498120257716, > 0.0432525311181986, 0.00222557516581898, 0.0493381989550945, > -0.0116459907029527, -0.112480015005373, 0.0182691285457092, > 0.0248597234825647, 0.00754701511666922, 0.0471476327719148, > 0.0625841102244406, 0.0303698631973417, 0.00781124380799404, > -0.0168950573556397, 0.0473901805181147, 0.00740505106540693, > -0.0152639817574294, 0.00916841478852549, 0.0409730632910991, > 0.0625866632066982, 0.00664005076885597, 0.0103946833001679, > 0.0243728672440622, 0.0722309706115829, 0.0174699387206196, -0.088714507487996, > -0.00504535647738195, 0.00927272338803572, -0.00707755664004029, > 0.209001332673238, 0.0280975011236682, 0.0185107628508926, -0.0152895488479284, > 0.0293166958720994, 0.0839281669393395, 0.0350355281775659, -0.0214691529922399, > -0.00698847060167527, 0.069853381162298, 0.00880702674287574, > 0.0440111442331915, 0.0576762465158807, 0.0180025302908308, 0.0104372279684426, > 0.0399937793788931, 0.0484415593089806, 0.0359627022827372, 0.0610406756211853, > 0.0400425377047152, 0.00783749255154968, 0.0033626359803225, > 0.0253846624900874, 0.028956317299215, 0.0220327419434368, 0.0055491218235435, > 0.021359789760335, 0.0053563472471669, 0.00770764128276149, 0.120606533813112, > 0.0338481150043749, 0.00480652155775551, -0.0208260153687132, > 0.0264346940874102, 0.0254170849175835, 0.0549828722223003, -0.0197153554154837, > 0.0146319132316291, 0.0223773253300461, 0.046744336162787, 0.0439389840326429, > 0.0730303072697907, 0.0157399337823011, 0.0189220332073482, 0.0332902036920697, > -0.00629466834494764, 0.0674012192688983, 0.0200657055355507, > 0.0101015050127517, 0.0425927774526406, 0.0282767872201141, 0.00648039037553307, > 0.0515174537352363, 0.128342038159934, 0.0432170296083376, 0.01871577325763, > 0.122157724187454, 0.0336635358211635, 0.0225239126708406, 0.0183439669703353, > 0.134384074630845, 0.00984528984402488, -0.049573212443543, 0.0459003250172428, > 0.0354638054442889, 0.0209690261585554, 0.0252976241664904, -0.0211582204487595, > 0.00564472281613363, 0.0148258737510351, 0.0428454717776024, > 0.0315492077820927, 0.0628515089974484, 0.034599813272583, 0.00983450218873532, > 0.0790661896510682, 0.076097511515163, 0.015596924720301, 0.010641549474715, > 0.00626447132858588, -0.0752885625254798, 0.0263105739632706, > 0.0336726716607009, 0.0873459584037158, 0.0137508559242068, -0.00705208890843943, > 0.0673463675870221, -0.000264192225152525, 0.0181803111819752, > 0.0415821927667122, 0.0258248658300624, 0.0697171115138401, 0.0609029360829605, > 0.0252388531172213, 0.0120346601757736, 0.0231724225476939, 0.00664147935356364, > 0.00364229190085414, 0.0221357760157817, 0.00873744091784354, > -0.0243757212939979, 0.0609405123073909, -0.0110205054092022, > 0.0570746855530399, -0.0541885933947211, 0.0790835216830754, > 0.0443624834606028, 0.010803474486455, 0.012658784733822, 0.0407444149396382, > 0.0758344977136341, 0.0249648665726016, 0.0706224364244773, 0.0617623493482699, > 0.0157667711676134, 0.159594212558186, 0.10429461374287, 0.0575594583605458, > 0.0629746059562333, 0.187704355999386, -0.121475803700469, 0.0316944060343089, > 0.0446672218032357, 0.0144595666502411, 0.0581713078328564, 0.0240501430003371, > 0.0169003110123663, -0.00441905663049872, 0.0398232696077516, > 0.0488599473848877, 0.0333193570494318, -0.0165383461076467, > 0.0908431754234104, 0.0145316828198416, 0.0268323550870429, -0.00807316790584186, > 0.0643886942067867, 0.0132605944827886, 0.0225125532638365, -0.029400634077785, > 0.0470539042942522, 0.0266903807836804, 0.0216184350463828, -0.00196619725935374, > -0.00896821424676157, 0.0471292741982513, 0.0153758143276018, > 0.0391647510007153, 0.0638918758798112, 0.0350540963584708, 0.0621376260090577, > -0.0235965026923011, 0.0722625556919611, -0.00136537610871872, > 0.00876826451613888, 0.0314000163087439, 0.0327764509794023, > 0.0416905332713813, 0.0287500712769455, 0.0363887020395213, -0.00500079481628151, > 0.0284155664844784, -0.0252462616989099, 0.0448399729520494, > 0.000185492290551008, 0.0334348196455053, 0.0875709173367935, > 0.0351964196451633, 0.232571060368655, 0.1090264053299, 0.0617423514625135, > 0.0768976100544436, -0.0546347871751927, 0.0996882491247678, > 0.0381052389461968, 0.0652248201643501, 0.0858993079060812, 0.0666492513259647, > 0.0751282298723881, -0.0192055466287929, 0.0869162270419438, > 0.0162427091867147, 0.0351089781252477, 0.0226340139536196, 0.0652987163108841, > 0.0779638975412273, 0.117722278377793, -0.0394478774616255, 0.0438529807975176, > 0.0881967320593799, 0.0588214648998437, -0.0184036676567495, > 0.0140741349441621, 0.0161750696830995, 0.0118833913020066, 0.00937605882553054, > -0.0455051243509685, 0.0418377741899513, -0.0112867686098609, > 0.0101123419174794, -0.00470124454451681, 0.000956333395138531, > -0.013981828106854, 0.05549118128867, -0.0224186715153298, 0.0186897582435067, > 0.0169772716816739, -0.0179058332425567, -0.00353064879469387, > 0.0269073443173487, 0.011369485145996, 0.0753871802564881, 0.184940758413157, > 0.0962788588369411, 0.12233382584365, 0.0542611920398092, 0.0470414915942155, > 0.0303505098818263, 0.00573452177124659, 0.00764243118994532, > 0.0586726631015619, 0.106336058543696, -0.0222151019972231, 0.00630121965465554, > 0.0624011763113852, 0.0372172786669568, 0.0226016288240546, 0.0939930244398409, > 0.0767415904317717, 0.0238800474741997, 0.0151188247761029, 0.134843980893931, > -0.0023819116674762, 0.00287890065299971, 0.0303739452657181, > -0.00394798169311598, -0.00886454847938266, 0.0530899335995167, > -0.00526457886952308, 0.100251697020821, 0.0651999010773084, > 0.0618461082131486, 0.0746686396348302, 0.0225108225108226, -0.0228981338001482, > -0.00958321904192527, 0.0301744325038945, 0.0510329188455982, > -0.0184730200018259, 0.0702506964772114, 0.0167199245415362, > 0.0790156649374397, -0.028524529551306, 0.0133581966776628, 0.025585253422798, > 0.172427142313816, 0.0675994203009362, 0.00336311873127013, 0.0493948607018135, > 0.218437612231768, 0.0214594460427004, 0.0907841657749202, 0.0333163617639509, > 0.177206388698409, 0.126401976128862, 0.0399950893161636, 0.0501927169716304, > 0.0893264027232592, 0.0157983828191964, 0.0615798877852506, -0.0197129750106304, > -0.0108884320377597, 0.0480698262099342, 0.00512957625928131, > 0.0157721009527848, 0.00576798852432315, 0.132233222996491, 0.0427798891731844, > 0.0213946620292803, 0.137026176169503, 0.106996875883653, -0.0054111837253851, > 0.0251880361118362, 0.0253902053162975, 0.0270577225980805, 0.0124293785310734, > 0.0743211614709804, 0.0322779541039503, -0.000515082314443601, > -0.15098468271335, 0.0705935165241118, 0.00396949242984507, 0.00570413156689748, > -0.028337357038222, 0.067618643584239, 0.215558122382694, -0.0902178675044036, > 0.0116089174537522, 0.0163203173112244, 0.053199024052846, 0.190954107085158, > -0.00965520699607334, 0.0137508862783826, 0.0551559553375383, > 0.0522566319201845, 0.0120000372271673, 0.0661660238047397, 0.0393034160850182, > 0.0519061657312619, -0.0104570268884604, 0.0691173523364065, > 0.0161805435668569, 0.017889600764444, 0.00112726390517828, 0.0127812045951454, > -0.0689255559600801, 0.0231502379228566, 0.0350293488462002, > 0.0474816278264511, -0.00418170038125466, 0.0353685604292087, > 0.0176274799482486, 0.0430171958669913, 0.0875537735181209, 0.070485815496694, > 0.0135133879845454, 0.0128708660489427, 0.051611788565405, 0.0227212087169909, > 0.0073359858475243, 0.00404515320751896, -0.00440846200360685, > 0.0659739938613625, 0.0460166710841459, 0.0164323471803848, -0.00986110969267727, > -0.0393527714903421, 0.0187532041738799, 0.0120528540944261, > 0.048649745777751, -0.016576662520347, 0.00722036925799145, 0.0532607499622092, > 0.0287269581620362, 0.098387602988942, 0.0515373332109274, -0.00594807446048738, > -0.012996698372473, 0.186569861135154, 0.030123906032987, 0.0853131761769354, > 0.0031929989708665, 0.0555338071316984, 0.0330892102352149, 0.0325300150784036, > -0.00129426068643155, 0.0964465282035648, 0.0748083984068019, > 0.014810272368951, 0.0727362482346641, -0.022994161418619, 0.0176067452321714, > 0.0316353702314177, 0.0366753960255026, 0.132973503081211, 0.00537653915699314, > 0.0293447867014306, 0.00587487992108688, -0.0465459905172109, > -0.0208313288728689, 0.0461567115064294, -0.00992439500984909, > 0.0478692174283319, 0.15870237135342, 0.0555146507925898, 0.0929129911374694, > 0.136269426745194, 0.032515127489143, -0.0177415950997095, 0.0242936475495824, > 0.0128679606829178, 0.00550255711518526, 0.00950135633958283, > -0.0171614203848253, -0.0480106149706695, 0.0436386144400421, > 0.030020737993979, -0.0207207590715261, 0.118800465447344, 0.0287429378832495, > 0.0277036046980229, -0.0326376675279461, 0.0111603851297697, > 0.0168167717634637, 0.0543502952338948, 0.0268780423509474, 0.0244551896836229, > 0.0330102007094411, 0.049560008022367, 0.0830113020712642, -0.0360281667532304, > 0.0254731639150768, 0.019583911716062, 0.0311623362566958, 0.00306244869413074, > 0.0687257755440167, 0.0205871906806436, -0.00980792960340933, > 0.0430516082564022, 0.0402780110730929, 0.0705036986824154, 0.025854270339128, > 0.108621667399996, 0.00718685874587846, 0.0571556864539545, 0.109159849895189, > -0.00840749532166959, 0.0463361727990188, 0.0651635196532618, > 0.107210781390985, 0.134765229575272, 0.00173368529272275, -0.0123735133796356, > -0.0136090591818897, 0.0534703507636681, 0.0252682115120829, > 0.0045029871851435, -0.032195767437093, 0.0467488481089099, 0.0538227606085845, > -0.0118386798369731, -0.0280299494295351, 0.0140538628567341, > 0.0305966571267272, -0.00988880417457172, -0.00202667375935174, > -0.0227460178374512, 0.0117906927254463, 0.0508373391209442, > 0.20565913566541, 0.079177499709108, 0.0422151179934303, 0.084419174697904, > 0.0672922694952164, -0.00562397110021092, 0.0565550716302232, > 0.0189608731051132, 0.0453269153630163, 0.0409743262622376, 0.0726855522439788, > 0.0185422373323943, 0.0700699839671905, -0.00222797184477677, > -0.00250681151008622, 0.0255048645524291, 0.000885511372841601, > 0.0788210113117177, 0.0116542476851704, 0.031007656424076, 0.011572121687957, > 0.00197091513991245, 0.0332881463280234, 0.0115574465474555, > -0.0156436963370336, 0.224908551812914, 0.0160024082692785, 0.0108175914929918, > 0.0850714918317297, -0.0209549958807167, 0.0649434433474199, > 0.0572507308261867, 0.0108695652173913, 0.0149885395421411, 0.0504013409726928, > 0.000985727295810551, 0.00206155161241882, -0.0273818619348245, > 0.0117953575610268, 0.0160740457598691, 0.0439509870338097, 0.000374131432729126, > 0.030965232935552, 0.0680925204656592, -0.040084138491466, 0.0579554457139488, > -0.0280709032744379, 0.0245619981154038, 0.0332658264722017, > 0.0307493365246973, 0.0663529386077719, 0.0108866234143253, 0.0504739490524921, > 0.0110051937760747, 0.114486710683534, 0.0885070446505914, 0.00713719270420306, > 0.027840282585194, 0.0502624411934901, -0.0237152032254946, -0.0783599699259493, > 0.00584404515799187, -0.031333005510123, 0.0191137823580835, > 0.00399073109721866, -0.00489024968946272, -0.00926327094032102, > 0.00380235683181465, 0.157304505375375, 0.0200440859609643, -0.0241686272566629, > -0.0800316610669412, 0.0239679002814968, 0.0538951680014091, > 0.0941742251268998, 0.0521115186872178, -0.123540922378836, 0.0542314864434063, > 0.0343854708502029, 0.0238689195785379, 0.123488443091325, 0.00983601617163751, > -0.00112278368930967, -0.0210112398529677, -0.0179204649311611, > -0.00187219424504028, -0.0094461471370453, 0.0616047615895669, > 0.0582469526595368, 0.00304799229604126, 0.0674836370082559, > 0.0853131761769354, 0.0358226068729712, 0.00994622612345991, > -0.0217167015464964, 0.0526997601984295, -0.0232294161006039, > 0.100227237031891, 0.0294429036389532, 0.0172507494588479, 0.0034823068051, > 0.0322430509250401, 0.0401401293054765, 0.0208112362723038, 0.00561429336771978, > 0.037707481438362, 0.00862436025594276, 0.00476662316192879, > 0.15812712691603, 0.0472541237269534, -0.00949623142375768, 0.00855607871651576, > -0.00281567087439197, 0.0397525174385432, -0.00711442815443551, > -0.00131577619047549, 0.106909062371648, 0.025164340439287, 0.0577629820111593, > 0.0939246700745592, 0.00391223125066969, 0.0124049752133815, > -0.0275935528232096, 0.0762231355953777, 0.181010165393349, -0.0347198712523113, > 0.0678716698457551, 0.0120798630452986, 0.0245162767779995, 0.0498518908504713, > 0.0144272270551826, 0.0449534685914403, 0.000956463351216132, > 0.0460805768375294, 0.0483340329448637, 0.0192578144013228, 0.0713319833154848, > 0.0664774807491022, 0.0136479583643586, 0.047338990736079, -0.00984473290135361, > 0.0791372581960931, 0.0256142818179614, 0.0598611692250246, 0.0265350466465605, > 0.068670703501864, 0.00623102828923622, -0.00469207491878694, > 0.157504094271494, 0.116984111424978, 0.0875878669508734, 0.0161726786019788, > 0.175935713544914, 0.0637705286819113, 0.0197080817743348, 0.0452129305548087, > 0.0233338613388849, 0.0936152099345934, 0.0199808837233982, 0.0274312796611153, > 0.0721161218673364, 0.17082095580651, 0.034052131044711, 0.0512562246908417, > 0.0487107440041036, 0.153481867586958, 0.0213458465510684, 0.0133431492518521, > 0.119009291067923, 0.0253607374472143, 0.0202017481667936, 0.011516647246353, > 0.0339052007553662, 0.0313036367875989, -0.00639827115782904, > 0.0237304943165091, 0.00669172141737004, 0.0854219038259585, > 0.0181012761967982, 0.0372169953336968, 0.219164421366707, 0.0387279347673063, > -0.00326722366281047, 0.0611109647647912, 0.0724982521544455, > 0.0114916829563205, 0.0264328043306142, 0.100227237031891, 0.0694579153964423, > 0.0256998227540187, 0.0937017943889341, 0.0137629525760519, -0.0046036224834336, > 0.0270242177828994, 0.0650551686301645, 0.01402255124967) > > > very many thanks for your time and effort... > yours sincerely > > AKSHAY M KULKARNI > > > ________________________________________ > From: R-help <r-help-bounces at r-project.org> on behalf of akshay kulkarni <akshay_e4 at hotmail.com> > Sent: Wednesday, March 20, 2019 1:32 PM > To: R help Mailing list > Subject: [R] problem with nlsLM..... > > dear members, > Yesterday, Duncan identified a silly mistake in an nls call...in the list of starting values, one of the names of the variable was getting repeated. But I am experiencing the same problem again, with a different formula: > >> formulaDH3 > HM1 ~ (a + (b * ((HM2 + 0.3)^(1/3)))) * (c * log(HM3 + 27)) > > here HM1 is the response variable, and HM2 and HM3 are predictors..... > >> nonlin_modDH3 <- nls(formulaDH3, start = list(a = 0.43143, b = 0.68173,c = 0.02954)) > Error in nlsModel(formula, mf, start, wts) : > singular gradient matrix at initial parameter estimates >> nonlin_modDH3 <- nlsLM(formulaDH3, start = list(a = 0.43143, b = 0.68173,c = 0.02954)) > Error in nlsModel(formula, mf, start, wts) : > singular gradient matrix at initial parameter estimates > > I am using nlsLM function from the minpack.lm package which says that it will converge when nls fails with singular gradient matrix error... > > > Is there again a silly mistake(pardon me again if there is one!), or is the problem serious? If it is serious, any pointers towards a solution? > > very many thanks for your time and effort.... > yours sincerely, > AKSHAY M KULKARNI > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >