Linear mixed model: Returning exactly the same values even when omitting some data?!

Hi.
I'm having some problems with a linear mixed model. Specifically, when I re-run the model after removing some values, the degrees of freedom and the F value I get are identical, which doesn't seem right. First example is with the full data:


(also the error message is a bit worrysome, haven't really found a solution to it).
Next: removing outliers
image
Re-run the data:

I get the exact same values.
Any ideas why? Thanks!!

My data:

data.frame(
stringsAsFactors = FALSE,
Currentid = c("Acraea issoria",
"Acytolepis puspa","Ancistroides nigrita","Appias albina",
"Appias lyncida","Appias pandione","Argyreus hyperbius",
"Ariadne ariadne","Athyma selenophora","Byasa polyeuctes",
"Catochrysops strabo","Catopsilia pomona",
"Catopsilia pyranthe","Cepora nadina","Cethosia biblis",
"Cethosia cyane","Cirrochroa tyche","Colias fieldii",
"Cyrestis thyodamas","Danaus chrysippus","Danaus genutia",
"Delias hyparete","Delias pasithoe","Dichorragia nesimachus",
"Discophora sondaica","Elymnias malelas","Euploea eunice",
"Euploea midamus","Euploea mulciber","Eurema hecabe",
"Eurema laeta","Euripus nyctelius","Euthalia aconthea",
"Graphium agamemnon","Graphium antiphates",
"Graphium cloanthus","Graphium eurypylus","Graphium sarpedon",
"Hebomoia glaucippe","Hestina assimilis",
"Hypolimnas bolina","Ideopsis similis","Jamides alecto","Junonia almana",
"Junonia atlites","Junonia iphita","Junonia orithya",
"Kaniska canace","Lethe confusa","Lethe rohria",
"Lethe verma","Lexias pardalis","Melanitis leda",
"Melanitis phedima","Moduza procris","Neptis hylas",
"Neptis sappho","Neptis soma","Pachliopta aristolochiae",
"Papilio bianor","Papilio clytia","Papilio demoleus",
"Papilio helenus","Papilio memnon","Papilio nephelus",
"Papilio paris","Papilio polytes","Papilio protenor",
"Papilio xuthus","Parantica aglea","Parantica melaneus",
"Parantica sita","Parnara ganga","Parnara guttata",
"Parthenos sylvia","Pelopidas agna","Pieris brassicae",
"Pieris canidia","Pieris rapae","Polyura athamas","Pontia edusa",
"Prioneris thestylis","Pseudozizeeria maha",
"Stibochiona nicea","Sumalia daraxa","Symbrenthia lilaea",
"Tirumala limniace","Tirumala septentrionis","Troides aeacus",
"Troides helena","Udaspes folus","Vanessa cardui",
"Vanessa indica","Vindula erota","Ypthima baldus",
"Zemeros flegyas"),
meanintra = c(99.7575,99.0042105263158,
92.6455555555556,99.4816666666667,99.7863636363636,97.33,
99.44,98.8542857142857,99.8016666666667,
99.2966666666667,99.966,99.8140974212034,99.849776119403,
99.8333333333333,96.45,99.9568181818182,97.909375,
99.6640909090909,99.84,99.8497222222222,99.5908571428571,
99.4739534883721,99.8663333333333,99.3516666666667,99.34,100,
98.508,98.415,99.663,98.9443617021277,96.217,
98.4883333333333,97.03,98.5044444444444,97.4057142857143,
98.96,94.312,95.7022580645161,99.5466666666667,100,
99.9606306306306,97.925,99.94625,99.9432653061225,
99.9616666666667,97.2338888888889,98.8584745762712,
99.5766666666667,99.71,99.18,99.4635714285714,98.433,
99.9149230769231,99.001,99.872,97.89425,97.092,
99.6166666666667,99.71075,99.2979166666667,99.7325,99.36675,
99.8704761904762,99.8289473684211,98.4763636363636,
99.3990384615385,99.538275862069,99.4282692307692,
99.7946666666667,99.62,99.746,96.345,95.698,94.38,99.5905,
92.321,99.7016455696203,99.9629268292683,99.9309803921569,
96.8333333333333,100,99.645,99.9317333333333,98.865,
99.325,99.836,99.451,99.838,99.6785789473684,99.563,
99.5890909090909,100,99.9764285714286,
94.7991666666667,95.1902702702703,99.0566666666667),
AreaGIS_km2 = c(1783568.93076621,
3275.98457821652,296848.660148346,3115038.07142233,2158637.14806088,
0,10156997.8401261,475497.212075748,1160679.2632406,
0,4086682.37596723,2983253.18133791,6543067.35584105,
0,0,716082.819568266,1492097.49719273,
345994.747514011,25.6788932974267,17195221.7188624,5719205.39572268,
1053653.84034716,152497.643088911,1683069.88703279,
618920.84598519,0,178076.148942535,0,1469419.0908183,
6696888.85382788,3598723.33782763,1197221.02657378,0,
3689068.49016641,155723.274652033,0,215075.835673909,
5409957.64718388,2281706.00100437,773442.49600883,
2022168.0840819,90000.7176853023,1331381.465945,
3125683.98747347,1725675.8545991,5164738.49189549,
5986753.89637294,9621969.6171934,0,0,272348.649398921,
319991.575051374,2001638.48002639,1034248.08855894,82261.1618443926,
1720188.09183717,2476273.02199699,0,1064834.94588788,
771640.21753114,374409.584755347,7765960.67585992,
1163985.35450551,23348195.9764159,1962509.56693851,
954.375022488508,3217385.21558002,946.263919644786,
986175.527870068,1095374.94411262,177308.546336041,0,
141.921430010768,52974.8700362146,1697734.1421934,
2179.42015642161,4422614.44800715,2741365.76148382,
98495848.0465467,474.050716221042,1139820.99541647,0,
987688.072421282,0,0,481691.738520829,5389838.74841337,
324896.00193401,784117.631282731,287098.874628432,1698649.28202469,
47694026.6299694,3376337.47646523,308949.607137551,
331581.924011902,1068881.08057802)
)

the statistics dont change because the error when constructing your model cause the model fit to fail, and therefore you are repeatedly seeing statistics of some earlier model that you succeeded in fitting that isnt a model that gives the error you quoted. i.e. the failed model fit doesnt destory/remove the existing model object, it leaves it unchanged.

You can use forcats package which is part of tidyverse suite of packages, and includes convenience functions that facilitated dropping of unused levels, it seems you have more levels defined than rows of data, perhaps because you are working with a subset of a larger original dataset.

Ok, thanks. Ill take a look at it.
I have the exact same number of levels as rows of data (both 96)

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.