diff options
-rw-r--r-- | test.log | 32 | ||||
-rw-r--r-- | tests/figs/plotting/plot-errmod-with-focus-c-tc.svg | 128 | ||||
-rw-r--r-- | tests/figs/plotting/plot-errmod-with-focus-d-obs-eigen.svg | 201 | ||||
-rw-r--r-- | tests/testthat/FOCUS_2006_D.csf | 2 | ||||
-rw-r--r-- | tests/testthat/test_nlme.R | 9 | ||||
-rw-r--r-- | tests/testthat/test_plots_summary_twa.R | 10 | ||||
-rw-r--r-- | tests/testthat/test_residuals.R | 9 |
7 files changed, 370 insertions, 21 deletions
@@ -2,34 +2,34 @@ Loading mkin Testing mkin ✔ | OK F W S | Context ✔ | 2 | Export dataset for reading into CAKE -✔ | 13 | Results for FOCUS D established in expertise for UBA (Ranke 2014) [3.5 s] -✔ | 4 | Calculation of FOCUS chi2 error levels [2.2 s] -✔ | 4 | Fitting the SFORB model [1.7 s] +✔ | 13 | Results for FOCUS D established in expertise for UBA (Ranke 2014) [3.7 s] +✔ | 4 | Calculation of FOCUS chi2 error levels [2.3 s] +✔ | 4 | Fitting the SFORB model [1.8 s] ✔ | 5 | Calculation of Akaike weights -✔ | 10 | Confidence intervals and p-values [9.5 s] -✔ | 14 | Error model fitting [37.6 s] +✔ | 10 | Confidence intervals and p-values [10.1 s] +✔ | 14 | Error model fitting [41.3 s] ✔ | 6 | Test fitting the decline of metabolites from their maximum [0.8 s] ✔ | 1 | Fitting the logistic model [0.9 s] ✔ | 1 | Test dataset class mkinds used in gmkin -✔ | 12 | Special cases of mkinfit calls [2.3 s] +✔ | 12 | Special cases of mkinfit calls [2.5 s] ✔ | 9 | mkinmod model generation and printing [0.2 s] ✔ | 3 | Model predictions with mkinpredict [0.4 s] -✔ | 16 | Evaluations according to 2015 NAFTA guidance [4.1 s] -✔ | 3 | Nonlinear mixed-effects models [2.1 s] -✔ | 4 | Calculation of maximum time weighted average concentrations (TWAs) [2.2 s] +✔ | 16 | Evaluations according to 2015 NAFTA guidance [4.3 s] +✔ | 5 | Nonlinear mixed-effects models [11.6 s] +✔ | 4 | Calculation of maximum time weighted average concentrations (TWAs) [2.4 s] ✔ | 3 | Summary -✔ | 11 | Plotting [0.6 s] +✔ | 13 | Plotting [5.1 s] ✔ | 4 | AIC calculation -✔ | 2 | Residuals extracted from mkinfit models -✔ | 2 | Complex test case from Schaefer et al. (2007) Piacenza paper [5.2 s] +✔ | 4 | Residuals extracted from mkinfit models +✔ | 2 | Complex test case from Schaefer et al. (2007) Piacenza paper [5.6 s] ✔ | 1 | Summaries of old mkinfit objects -✔ | 4 | Results for synthetic data established in expertise for UBA (Ranke 2014) [7.0 s] -✔ | 9 | Hypothesis tests [36.7 s] +✔ | 4 | Results for synthetic data established in expertise for UBA (Ranke 2014) [7.7 s] +✔ | 9 | Hypothesis tests [39.7 s] ══ Results ═════════════════════════════════════════════════════════════════════ -Duration: 117.1 s +Duration: 140.8 s -OK: 143 +OK: 149 Failed: 0 Warnings: 0 Skipped: 0 diff --git a/tests/figs/plotting/plot-errmod-with-focus-c-tc.svg b/tests/figs/plotting/plot-errmod-with-focus-c-tc.svg new file mode 100644 index 00000000..8adefc27 --- /dev/null +++ b/tests/figs/plotting/plot-errmod-with-focus-c-tc.svg @@ -0,0 +1,128 @@ +<?xml version='1.0' encoding='UTF-8' ?> +<svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 720.00 576.00'> +<defs> + <style type='text/css'><![CDATA[ + line, polyline, polygon, path, rect, circle { + fill: none; + stroke: #000000; + stroke-linecap: round; + stroke-linejoin: round; + stroke-miterlimit: 10.00; + } + ]]></style> +</defs> +<rect width='100%' height='100%' style='stroke: none; fill: #FFFFFF;'/> +<line x1='69.07' y1='502.56' x2='321.84' y2='502.56' style='stroke-width: 0.75;' /> +<line x1='69.07' y1='502.56' x2='69.07' y2='509.76' style='stroke-width: 0.75;' /> +<line x1='111.20' y1='502.56' x2='111.20' y2='509.76' style='stroke-width: 0.75;' /> +<line x1='153.32' y1='502.56' x2='153.32' y2='509.76' style='stroke-width: 0.75;' /> +<line x1='195.45' y1='502.56' x2='195.45' y2='509.76' style='stroke-width: 0.75;' /> +<line x1='237.58' y1='502.56' x2='237.58' y2='509.76' style='stroke-width: 0.75;' /> +<line x1='279.71' y1='502.56' x2='279.71' y2='509.76' style='stroke-width: 0.75;' /> +<line x1='321.84' y1='502.56' x2='321.84' y2='509.76' style='stroke-width: 0.75;' /> +<text x='65.73' y='528.48' style='font-size: 12.00px; font-family: Liberation Sans;' textLength='6.67px' lengthAdjust='spacingAndGlyphs'>0</text> +<text x='104.52' y='528.48' style='font-size: 12.00px; font-family: Liberation Sans;' textLength='13.34px' lengthAdjust='spacingAndGlyphs'>20</text> +<text x='146.65' y='528.48' style='font-size: 12.00px; font-family: Liberation Sans;' textLength='13.34px' lengthAdjust='spacingAndGlyphs'>40</text> +<text x='188.78' y='528.48' style='font-size: 12.00px; font-family: Liberation Sans;' textLength='13.34px' lengthAdjust='spacingAndGlyphs'>60</text> +<text x='230.91' y='528.48' style='font-size: 12.00px; font-family: Liberation Sans;' textLength='13.34px' lengthAdjust='spacingAndGlyphs'>80</text> +<text x='269.70' y='528.48' style='font-size: 12.00px; font-family: Liberation Sans;' textLength='20.02px' lengthAdjust='spacingAndGlyphs'>100</text> +<text x='311.83' y='528.48' style='font-size: 12.00px; font-family: Liberation Sans;' textLength='20.02px' lengthAdjust='spacingAndGlyphs'>120</text> +<line x1='59.04' y1='486.13' x2='59.04' y2='100.08' style='stroke-width: 0.75;' /> +<line x1='59.04' y1='486.13' x2='51.84' y2='486.13' style='stroke-width: 0.75;' /> +<line x1='59.04' y1='389.62' x2='51.84' y2='389.62' style='stroke-width: 0.75;' /> +<line x1='59.04' y1='293.11' x2='51.84' y2='293.11' style='stroke-width: 0.75;' /> +<line x1='59.04' y1='196.59' x2='51.84' y2='196.59' style='stroke-width: 0.75;' /> +<line x1='59.04' y1='100.08' x2='51.84' y2='100.08' style='stroke-width: 0.75;' /> +<text transform='translate(41.76,489.47) rotate(-90)' style='font-size: 12.00px; font-family: Liberation Sans;' textLength='6.67px' lengthAdjust='spacingAndGlyphs'>0</text> +<text transform='translate(41.76,396.29) rotate(-90)' style='font-size: 12.00px; font-family: Liberation Sans;' textLength='13.34px' lengthAdjust='spacingAndGlyphs'>20</text> +<text transform='translate(41.76,299.78) rotate(-90)' style='font-size: 12.00px; font-family: Liberation Sans;' textLength='13.34px' lengthAdjust='spacingAndGlyphs'>40</text> +<text transform='translate(41.76,203.26) rotate(-90)' style='font-size: 12.00px; font-family: Liberation Sans;' textLength='13.34px' lengthAdjust='spacingAndGlyphs'>60</text> +<text transform='translate(41.76,106.75) rotate(-90)' style='font-size: 12.00px; font-family: Liberation Sans;' textLength='13.34px' lengthAdjust='spacingAndGlyphs'>80</text> +<polyline points='59.04,502.56 329.76,502.56 329.76,59.04 59.04,59.04 59.04,502.56 ' style='stroke-width: 0.75;' /> +<defs> + <clipPath id='cpMC4wMHwzNjAuMDB8NTc2LjAwfDAuMDA='> + <rect x='0.00' y='0.00' width='360.00' height='576.00' /> + </clipPath> +</defs> +<g clip-path='url(#cpMC4wMHwzNjAuMDB8NTc2LjAwfDAuMDA=)'><text x='181.29' y='557.28' style='font-size: 12.00px; font-family: Liberation Sans;' textLength='26.22px' lengthAdjust='spacingAndGlyphs'>Time</text></g> +<g clip-path='url(#cpMC4wMHwzNjAuMDB8NTc2LjAwfDAuMDA=)'><text transform='translate(12.96,306.81) rotate(-90)' style='font-size: 12.00px; font-family: Liberation Sans;' textLength='52.02px' lengthAdjust='spacingAndGlyphs'>Observed</text></g> +<defs> + <clipPath id='cpNTkuMDR8MzI5Ljc2fDUwMi41Nnw1OS4wNA=='> + <rect x='59.04' y='59.04' width='270.72' height='443.52' /> + </clipPath> +</defs> +<circle cx='69.07' cy='75.47' r='2.70pt' style='stroke-width: 0.75;' clip-path='url(#cpNTkuMDR8MzI5Ljc2fDUwMi41Nnw1OS4wNA==)' /> +<circle cx='71.17' cy='206.73' r='2.70pt' style='stroke-width: 0.75;' clip-path='url(#cpNTkuMDR8MzI5Ljc2fDUwMi41Nnw1OS4wNA==)' /> +<circle cx='75.39' cy='341.85' r='2.70pt' style='stroke-width: 0.75;' clip-path='url(#cpNTkuMDR8MzI5Ljc2fDUwMi41Nnw1OS4wNA==)' /> +<circle cx='83.81' cy='415.68' r='2.70pt' style='stroke-width: 0.75;' clip-path='url(#cpNTkuMDR8MzI5Ljc2fDUwMi41Nnw1OS4wNA==)' /> +<circle cx='98.56' cy='439.32' r='2.70pt' style='stroke-width: 0.75;' clip-path='url(#cpNTkuMDR8MzI5Ljc2fDUwMi41Nnw1OS4wNA==)' /> +<circle cx='128.05' cy='454.28' r='2.70pt' style='stroke-width: 0.75;' clip-path='url(#cpNTkuMDR8MzI5Ljc2fDUwMi41Nnw1OS4wNA==)' /> +<circle cx='201.77' cy='466.83' r='2.70pt' style='stroke-width: 0.75;' clip-path='url(#cpNTkuMDR8MzI5Ljc2fDUwMi41Nnw1OS4wNA==)' /> +<circle cx='260.75' cy='467.31' r='2.70pt' style='stroke-width: 0.75;' clip-path='url(#cpNTkuMDR8MzI5Ljc2fDUwMi41Nnw1OS4wNA==)' /> +<circle cx='319.73' cy='483.24' r='2.70pt' style='stroke-width: 0.75;' clip-path='url(#cpNTkuMDR8MzI5Ljc2fDUwMi41Nnw1OS4wNA==)' /> +<polyline points='69.07,88.05 71.60,210.58 74.13,295.40 76.66,354.11 79.19,394.75 81.73,422.88 84.26,442.35 86.79,455.83 89.32,465.15 91.85,471.61 94.39,476.08 96.92,479.18 99.45,481.32 101.98,482.80 104.51,483.83 107.05,484.54 109.58,485.03 112.11,485.37 114.64,485.60 117.17,485.77 119.71,485.88 122.24,485.96 124.77,486.01 127.30,486.05 129.83,486.08 132.37,486.09 134.90,486.11 137.43,486.11 139.96,486.12 142.49,486.12 145.03,486.13 147.56,486.13 150.09,486.13 152.62,486.13 155.15,486.13 157.69,486.13 160.22,486.13 162.75,486.13 165.28,486.13 167.81,486.13 170.35,486.13 172.88,486.13 175.41,486.13 177.94,486.13 180.47,486.13 183.01,486.13 185.54,486.13 188.07,486.13 190.60,486.13 193.13,486.13 195.67,486.13 198.20,486.13 200.73,486.13 203.26,486.13 205.79,486.13 208.33,486.13 210.86,486.13 213.39,486.13 215.92,486.13 218.45,486.13 220.99,486.13 223.52,486.13 226.05,486.13 228.58,486.13 231.11,486.13 233.65,486.13 236.18,486.13 238.71,486.13 241.24,486.13 243.77,486.13 246.31,486.13 248.84,486.13 251.37,486.13 253.90,486.13 256.43,486.13 258.97,486.13 261.50,486.13 264.03,486.13 266.56,486.13 269.09,486.13 271.63,486.13 274.16,486.13 276.69,486.13 279.22,486.13 281.75,486.13 284.29,486.13 286.82,486.13 289.35,486.13 291.88,486.13 294.41,486.13 296.95,486.13 299.48,486.13 302.01,486.13 304.54,486.13 307.07,486.13 309.61,486.13 312.14,486.13 314.67,486.13 317.20,486.13 319.73,486.13 ' style='stroke-width: 0.75;' clip-path='url(#cpNTkuMDR8MzI5Ljc2fDUwMi41Nnw1OS4wNA==)' /> +<rect x='241.17' y='81.22' width='75.06' height='28.80' style='stroke-width: 0.75; fill: #FFFFFF;' clip-path='url(#cpNTkuMDR8MzI5Ljc2fDUwMi41Nnw1OS4wNA==)' /> +<line x1='244.41' y1='95.62' x2='266.01' y2='95.62' style='stroke-width: 0.75;' clip-path='url(#cpNTkuMDR8MzI5Ljc2fDUwMi41Nnw1OS4wNA==)' /> +<circle cx='255.21' cy='95.62' r='2.70pt' style='stroke-width: 0.75;' clip-path='url(#cpNTkuMDR8MzI5Ljc2fDUwMi41Nnw1OS4wNA==)' /> +<g clip-path='url(#cpNTkuMDR8MzI5Ljc2fDUwMi41Nnw1OS4wNA==)'><text x='276.81' y='99.74' style='font-size: 12.00px; font-family: Liberation Sans;' textLength='34.02px' lengthAdjust='spacingAndGlyphs'>parent</text></g> +<defs> + <clipPath id='cpNDE5LjA0fDY4OS43Nnw1MDIuNTZ8NTkuMDQ='> + <rect x='419.04' y='59.04' width='270.72' height='443.52' /> + </clipPath> +</defs> +<defs> + <clipPath id='cpMC4wMHw3MjAuMDB8NTc2LjAwfDAuMDA='> + <rect x='0.00' y='0.00' width='720.00' height='576.00' /> + </clipPath> +</defs> +<line x1='429.07' y1='502.56' x2='650.06' y2='502.56' style='stroke-width: 0.75;' clip-path='url(#cpMC4wMHw3MjAuMDB8NTc2LjAwfDAuMDA=)' /> +<line x1='429.07' y1='502.56' x2='429.07' y2='509.76' style='stroke-width: 0.75;' clip-path='url(#cpMC4wMHw3MjAuMDB8NTc2LjAwfDAuMDA=)' /> +<line x1='484.32' y1='502.56' x2='484.32' y2='509.76' style='stroke-width: 0.75;' clip-path='url(#cpMC4wMHw3MjAuMDB8NTc2LjAwfDAuMDA=)' /> +<line x1='539.56' y1='502.56' x2='539.56' y2='509.76' style='stroke-width: 0.75;' clip-path='url(#cpMC4wMHw3MjAuMDB8NTc2LjAwfDAuMDA=)' /> +<line x1='594.81' y1='502.56' x2='594.81' y2='509.76' style='stroke-width: 0.75;' clip-path='url(#cpMC4wMHw3MjAuMDB8NTc2LjAwfDAuMDA=)' /> +<line x1='650.06' y1='502.56' x2='650.06' y2='509.76' style='stroke-width: 0.75;' clip-path='url(#cpMC4wMHw3MjAuMDB8NTc2LjAwfDAuMDA=)' /> +<g clip-path='url(#cpMC4wMHw3MjAuMDB8NTc2LjAwfDAuMDA=)'><text x='425.73' y='528.48' style='font-size: 12.00px; font-family: Liberation Sans;' textLength='6.67px' lengthAdjust='spacingAndGlyphs'>0</text></g> +<g clip-path='url(#cpMC4wMHw3MjAuMDB8NTc2LjAwfDAuMDA=)'><text x='477.64' y='528.48' style='font-size: 12.00px; font-family: Liberation Sans;' textLength='13.34px' lengthAdjust='spacingAndGlyphs'>20</text></g> +<g clip-path='url(#cpMC4wMHw3MjAuMDB8NTc2LjAwfDAuMDA=)'><text x='532.89' y='528.48' style='font-size: 12.00px; font-family: Liberation Sans;' textLength='13.34px' lengthAdjust='spacingAndGlyphs'>40</text></g> +<g clip-path='url(#cpMC4wMHw3MjAuMDB8NTc2LjAwfDAuMDA=)'><text x='588.14' y='528.48' style='font-size: 12.00px; font-family: Liberation Sans;' textLength='13.34px' lengthAdjust='spacingAndGlyphs'>60</text></g> +<g clip-path='url(#cpMC4wMHw3MjAuMDB8NTc2LjAwfDAuMDA=)'><text x='643.39' y='528.48' style='font-size: 12.00px; font-family: Liberation Sans;' textLength='13.34px' lengthAdjust='spacingAndGlyphs'>80</text></g> +<line x1='419.04' y1='486.13' x2='419.04' y2='112.81' style='stroke-width: 0.75;' clip-path='url(#cpMC4wMHw3MjAuMDB8NTc2LjAwfDAuMDA=)' /> +<line x1='419.04' y1='486.13' x2='411.84' y2='486.13' style='stroke-width: 0.75;' clip-path='url(#cpMC4wMHw3MjAuMDB8NTc2LjAwfDAuMDA=)' /> +<line x1='419.04' y1='392.80' x2='411.84' y2='392.80' style='stroke-width: 0.75;' clip-path='url(#cpMC4wMHw3MjAuMDB8NTc2LjAwfDAuMDA=)' /> +<line x1='419.04' y1='299.47' x2='411.84' y2='299.47' style='stroke-width: 0.75;' clip-path='url(#cpMC4wMHw3MjAuMDB8NTc2LjAwfDAuMDA=)' /> +<line x1='419.04' y1='206.14' x2='411.84' y2='206.14' style='stroke-width: 0.75;' clip-path='url(#cpMC4wMHw3MjAuMDB8NTc2LjAwfDAuMDA=)' /> +<line x1='419.04' y1='112.81' x2='411.84' y2='112.81' style='stroke-width: 0.75;' clip-path='url(#cpMC4wMHw3MjAuMDB8NTc2LjAwfDAuMDA=)' /> +<g clip-path='url(#cpMC4wMHw3MjAuMDB8NTc2LjAwfDAuMDA=)'><text transform='translate(401.76,489.47) rotate(-90)' style='font-size: 12.00px; font-family: Liberation Sans;' textLength='6.67px' lengthAdjust='spacingAndGlyphs'>0</text></g> +<g clip-path='url(#cpMC4wMHw3MjAuMDB8NTc2LjAwfDAuMDA=)'><text transform='translate(401.76,399.48) rotate(-90)' style='font-size: 12.00px; font-family: Liberation Sans;' textLength='13.34px' lengthAdjust='spacingAndGlyphs'>20</text></g> +<g clip-path='url(#cpMC4wMHw3MjAuMDB8NTc2LjAwfDAuMDA=)'><text transform='translate(401.76,306.15) rotate(-90)' style='font-size: 12.00px; font-family: Liberation Sans;' textLength='13.34px' lengthAdjust='spacingAndGlyphs'>40</text></g> +<g clip-path='url(#cpMC4wMHw3MjAuMDB8NTc2LjAwfDAuMDA=)'><text transform='translate(401.76,212.82) rotate(-90)' style='font-size: 12.00px; font-family: Liberation Sans;' textLength='13.34px' lengthAdjust='spacingAndGlyphs'>60</text></g> +<g clip-path='url(#cpMC4wMHw3MjAuMDB8NTc2LjAwfDAuMDA=)'><text transform='translate(401.76,119.49) rotate(-90)' style='font-size: 12.00px; font-family: Liberation Sans;' textLength='13.34px' lengthAdjust='spacingAndGlyphs'>80</text></g> +<polyline points='419.04,502.56 689.76,502.56 689.76,59.04 419.04,59.04 419.04,502.56 ' style='stroke-width: 0.75;' clip-path='url(#cpMC4wMHw3MjAuMDB8NTc2LjAwfDAuMDA=)' /> +<defs> + <clipPath id='cpMzYwLjAwfDcyMC4wMHw1NzYuMDB8MC4wMA=='> + <rect x='360.00' y='0.00' width='360.00' height='576.00' /> + </clipPath> +</defs> +<g clip-path='url(#cpMzYwLjAwfDcyMC4wMHw1NzYuMDB8MC4wMA==)'><text x='529.06' y='557.28' style='font-size: 12.00px; font-family: Liberation Sans;' textLength='50.69px' lengthAdjust='spacingAndGlyphs'>Predicted</text></g> +<g clip-path='url(#cpMzYwLjAwfDcyMC4wMHw1NzYuMDB8MC4wMA==)'><text transform='translate(372.96,326.16) rotate(-90)' style='font-size: 12.00px; font-family: Liberation Sans;' textLength='90.72px' lengthAdjust='spacingAndGlyphs'>Squared residual</text></g> +<defs> + <clipPath id='cpNDE5LjA0fDY4OS43Nnw1MDIuNTZ8NTkuMDQ='> + <rect x='419.04' y='59.04' width='270.72' height='443.52' /> + </clipPath> +</defs> +<circle cx='656.95' cy='454.40' r='2.70pt' style='stroke-width: 0.75;' clip-path='url(#cpNDE5LjA0fDY4OS43Nnw1MDIuNTZ8NTkuMDQ=)' /> +<circle cx='596.86' cy='448.43' r='2.70pt' style='stroke-width: 0.75;' clip-path='url(#cpNDE5LjA0fDY4OS43Nnw1MDIuNTZ8NTkuMDQ=)' /> +<circle cx='520.05' cy='443.17' r='2.70pt' style='stroke-width: 0.75;' clip-path='url(#cpNDE5LjA0fDY4OS43Nnw1MDIuNTZ8NTkuMDQ=)' /> +<circle cx='455.81' cy='373.26' r='2.70pt' style='stroke-width: 0.75;' clip-path='url(#cpNDE5LjA0fDY4OS43Nnw1MDIuNTZ8NTkuMDQ=)' /> +<circle cx='432.21' cy='143.91' r='2.70pt' style='stroke-width: 0.75;' clip-path='url(#cpNDE5LjA0fDY4OS43Nnw1MDIuNTZ8NTkuMDQ=)' /> +<circle cx='429.11' cy='283.82' r='2.70pt' style='stroke-width: 0.75;' clip-path='url(#cpNDE5LjA0fDY4OS43Nnw1MDIuNTZ8NTkuMDQ=)' /> +<circle cx='429.07' cy='411.47' r='2.70pt' style='stroke-width: 0.75;' clip-path='url(#cpNDE5LjA0fDY4OS43Nnw1MDIuNTZ8NTkuMDQ=)' /> +<circle cx='429.07' cy='415.16' r='2.70pt' style='stroke-width: 0.75;' clip-path='url(#cpNDE5LjA0fDY4OS43Nnw1MDIuNTZ8NTkuMDQ=)' /> +<circle cx='429.07' cy='484.45' r='2.70pt' style='stroke-width: 0.75;' clip-path='url(#cpNDE5LjA0fDY4OS43Nnw1MDIuNTZ8NTkuMDQ=)' /> +<polyline points='429.07,384.23 431.35,384.23 433.62,384.23 435.90,384.23 438.18,384.23 440.46,384.23 442.74,384.23 445.02,384.23 447.30,384.23 449.58,384.23 451.85,384.23 454.13,384.23 456.41,384.23 458.69,384.23 460.97,384.23 463.25,384.23 465.53,384.23 467.81,384.23 470.08,384.23 472.36,384.23 474.64,384.23 476.92,384.23 479.20,384.23 481.48,384.23 483.76,384.23 486.04,384.23 488.32,384.23 490.59,384.23 492.87,384.23 495.15,384.23 497.43,384.23 499.71,384.23 501.99,384.23 504.27,384.23 506.55,384.23 508.82,384.23 511.10,384.23 513.38,384.23 515.66,384.23 517.94,384.23 520.22,384.23 522.50,384.23 524.78,384.23 527.05,384.23 529.33,384.23 531.61,384.23 533.89,384.23 536.17,384.23 538.45,384.23 540.73,384.23 543.01,384.23 545.28,384.23 547.56,384.23 549.84,384.23 552.12,384.23 554.40,384.23 556.68,384.23 558.96,384.23 561.24,384.23 563.52,384.23 565.79,384.23 568.07,384.23 570.35,384.23 572.63,384.23 574.91,384.23 577.19,384.23 579.47,384.23 581.75,384.23 584.02,384.23 586.30,384.23 588.58,384.23 590.86,384.23 593.14,384.23 595.42,384.23 597.70,384.23 599.98,384.23 602.25,384.23 604.53,384.23 606.81,384.23 609.09,384.23 611.37,384.23 613.65,384.23 615.93,384.23 618.21,384.23 620.48,384.23 622.76,384.23 625.04,384.23 627.32,384.23 629.60,384.23 631.88,384.23 634.16,384.23 636.44,384.23 638.72,384.23 640.99,384.23 643.27,384.23 645.55,384.23 647.83,384.23 650.11,384.23 652.39,384.23 654.67,384.23 656.95,384.23 ' style='stroke-width: 0.75; stroke-dasharray: 4.00,4.00;' clip-path='url(#cpNDE5LjA0fDY4OS43Nnw1MDIuNTZ8NTkuMDQ=)' /> +<defs> + <clipPath id='cpNTkuMDR8Njg5Ljc2fDUwMi41Nnw1OS4wNA=='> + <rect x='59.04' y='59.04' width='630.72' height='443.52' /> + </clipPath> +</defs> +</svg> diff --git a/tests/figs/plotting/plot-errmod-with-focus-d-obs-eigen.svg b/tests/figs/plotting/plot-errmod-with-focus-d-obs-eigen.svg new file mode 100644 index 00000000..93e90dc5 --- /dev/null +++ b/tests/figs/plotting/plot-errmod-with-focus-d-obs-eigen.svg @@ -0,0 +1,201 @@ +<?xml version='1.0' encoding='UTF-8' ?> +<svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 720.00 576.00'> +<defs> + <style type='text/css'><![CDATA[ + line, polyline, polygon, path, rect, circle { + fill: none; + stroke: #000000; + stroke-linecap: round; + stroke-linejoin: round; + stroke-miterlimit: 10.00; + } + ]]></style> +</defs> +<rect width='100%' height='100%' style='stroke: none; fill: #FFFFFF;'/> +<line x1='69.07' y1='502.56' x2='319.73' y2='502.56' style='stroke-width: 0.75;' /> +<line x1='69.07' y1='502.56' x2='69.07' y2='509.76' style='stroke-width: 0.75;' /> +<line x1='110.84' y1='502.56' x2='110.84' y2='509.76' style='stroke-width: 0.75;' /> +<line x1='152.62' y1='502.56' x2='152.62' y2='509.76' style='stroke-width: 0.75;' /> +<line x1='194.40' y1='502.56' x2='194.40' y2='509.76' style='stroke-width: 0.75;' /> +<line x1='236.18' y1='502.56' x2='236.18' y2='509.76' style='stroke-width: 0.75;' /> +<line x1='277.96' y1='502.56' x2='277.96' y2='509.76' style='stroke-width: 0.75;' /> +<line x1='319.73' y1='502.56' x2='319.73' y2='509.76' style='stroke-width: 0.75;' /> +<text x='65.73' y='528.48' style='font-size: 12.00px; font-family: Liberation Sans;' textLength='6.67px' lengthAdjust='spacingAndGlyphs'>0</text> +<text x='104.17' y='528.48' style='font-size: 12.00px; font-family: Liberation Sans;' textLength='13.34px' lengthAdjust='spacingAndGlyphs'>20</text> +<text x='145.95' y='528.48' style='font-size: 12.00px; font-family: Liberation Sans;' textLength='13.34px' lengthAdjust='spacingAndGlyphs'>40</text> +<text x='187.73' y='528.48' style='font-size: 12.00px; font-family: Liberation Sans;' textLength='13.34px' lengthAdjust='spacingAndGlyphs'>60</text> +<text x='229.51' y='528.48' style='font-size: 12.00px; font-family: Liberation Sans;' textLength='13.34px' lengthAdjust='spacingAndGlyphs'>80</text> +<text x='267.95' y='528.48' style='font-size: 12.00px; font-family: Liberation Sans;' textLength='20.02px' lengthAdjust='spacingAndGlyphs'>100</text> +<text x='309.73' y='528.48' style='font-size: 12.00px; font-family: Liberation Sans;' textLength='20.02px' lengthAdjust='spacingAndGlyphs'>120</text> +<line x1='59.04' y1='486.13' x2='59.04' y2='83.68' style='stroke-width: 0.75;' /> +<line x1='59.04' y1='486.13' x2='51.84' y2='486.13' style='stroke-width: 0.75;' /> +<line x1='59.04' y1='405.64' x2='51.84' y2='405.64' style='stroke-width: 0.75;' /> +<line x1='59.04' y1='325.15' x2='51.84' y2='325.15' style='stroke-width: 0.75;' /> +<line x1='59.04' y1='244.66' x2='51.84' y2='244.66' style='stroke-width: 0.75;' /> +<line x1='59.04' y1='164.17' x2='51.84' y2='164.17' style='stroke-width: 0.75;' /> +<line x1='59.04' y1='83.68' x2='51.84' y2='83.68' style='stroke-width: 0.75;' /> +<text transform='translate(41.76,489.47) rotate(-90)' style='font-size: 12.00px; font-family: Liberation Sans;' textLength='6.67px' lengthAdjust='spacingAndGlyphs'>0</text> +<text transform='translate(41.76,412.31) rotate(-90)' style='font-size: 12.00px; font-family: Liberation Sans;' textLength='13.34px' lengthAdjust='spacingAndGlyphs'>20</text> +<text transform='translate(41.76,331.82) rotate(-90)' style='font-size: 12.00px; font-family: Liberation Sans;' textLength='13.34px' lengthAdjust='spacingAndGlyphs'>40</text> +<text transform='translate(41.76,251.33) rotate(-90)' style='font-size: 12.00px; font-family: Liberation Sans;' textLength='13.34px' lengthAdjust='spacingAndGlyphs'>60</text> +<text transform='translate(41.76,170.84) rotate(-90)' style='font-size: 12.00px; font-family: Liberation Sans;' textLength='13.34px' lengthAdjust='spacingAndGlyphs'>80</text> +<text transform='translate(41.76,93.68) rotate(-90)' style='font-size: 12.00px; font-family: Liberation Sans;' textLength='20.02px' lengthAdjust='spacingAndGlyphs'>100</text> +<polyline points='59.04,502.56 329.76,502.56 329.76,59.04 59.04,59.04 59.04,502.56 ' style='stroke-width: 0.75;' /> +<defs> + <clipPath id='cpMC4wMHwzNjAuMDB8NTc2LjAwfDAuMDA='> + <rect x='0.00' y='0.00' width='360.00' height='576.00' /> + </clipPath> +</defs> +<g clip-path='url(#cpMC4wMHwzNjAuMDB8NTc2LjAwfDAuMDA=)'><text x='181.29' y='557.28' style='font-size: 12.00px; font-family: Liberation Sans;' textLength='26.22px' lengthAdjust='spacingAndGlyphs'>Time</text></g> +<g clip-path='url(#cpMC4wMHwzNjAuMDB8NTc2LjAwfDAuMDA=)'><text transform='translate(12.96,306.81) rotate(-90)' style='font-size: 12.00px; font-family: Liberation Sans;' textLength='52.02px' lengthAdjust='spacingAndGlyphs'>Observed</text></g> +<defs> + <clipPath id='cpNTkuMDR8MzI5Ljc2fDUwMi41Nnw1OS4wNA=='> + <rect x='59.04' y='59.04' width='270.72' height='443.52' /> + </clipPath> +</defs> +<circle cx='69.07' cy='85.85' r='2.70pt' style='stroke-width: 0.75;' clip-path='url(#cpNTkuMDR8MzI5Ljc2fDUwMi41Nnw1OS4wNA==)' /> +<circle cx='69.07' cy='75.47' r='2.70pt' style='stroke-width: 0.75;' clip-path='url(#cpNTkuMDR8MzI5Ljc2fDUwMi41Nnw1OS4wNA==)' /> +<circle cx='71.16' cy='109.84' r='2.70pt' style='stroke-width: 0.75;' clip-path='url(#cpNTkuMDR8MzI5Ljc2fDUwMi41Nnw1OS4wNA==)' /> +<circle cx='71.16' cy='113.86' r='2.70pt' style='stroke-width: 0.75;' clip-path='url(#cpNTkuMDR8MzI5Ljc2fDUwMi41Nnw1OS4wNA==)' /> +<circle cx='75.33' cy='231.66' r='2.70pt' style='stroke-width: 0.75;' clip-path='url(#cpNTkuMDR8MzI5Ljc2fDUwMi41Nnw1OS4wNA==)' /> +<circle cx='75.33' cy='208.48' r='2.70pt' style='stroke-width: 0.75;' clip-path='url(#cpNTkuMDR8MzI5Ljc2fDUwMi41Nnw1OS4wNA==)' /> +<circle cx='83.69' cy='275.57' r='2.70pt' style='stroke-width: 0.75;' clip-path='url(#cpNTkuMDR8MzI5Ljc2fDUwMi41Nnw1OS4wNA==)' /> +<circle cx='83.69' cy='264.26' r='2.70pt' style='stroke-width: 0.75;' clip-path='url(#cpNTkuMDR8MzI5Ljc2fDUwMi41Nnw1OS4wNA==)' /> +<circle cx='98.31' cy='376.38' r='2.70pt' style='stroke-width: 0.75;' clip-path='url(#cpNTkuMDR8MzI5Ljc2fDUwMi41Nnw1OS4wNA==)' /> +<circle cx='98.31' cy='378.92' r='2.70pt' style='stroke-width: 0.75;' clip-path='url(#cpNTkuMDR8MzI5Ljc2fDUwMi41Nnw1OS4wNA==)' /> +<circle cx='112.93' cy='439.85' r='2.70pt' style='stroke-width: 0.75;' clip-path='url(#cpNTkuMDR8MzI5Ljc2fDUwMi41Nnw1OS4wNA==)' /> +<circle cx='112.93' cy='439.29' r='2.70pt' style='stroke-width: 0.75;' clip-path='url(#cpNTkuMDR8MzI5Ljc2fDUwMi41Nnw1OS4wNA==)' /> +<circle cx='142.18' cy='474.66' r='2.70pt' style='stroke-width: 0.75;' clip-path='url(#cpNTkuMDR8MzI5Ljc2fDUwMi41Nnw1OS4wNA==)' /> +<circle cx='142.18' cy='474.42' r='2.70pt' style='stroke-width: 0.75;' clip-path='url(#cpNTkuMDR8MzI5Ljc2fDUwMi41Nnw1OS4wNA==)' /> +<circle cx='173.51' cy='483.36' r='2.70pt' style='stroke-width: 0.75;' clip-path='url(#cpNTkuMDR8MzI5Ljc2fDUwMi41Nnw1OS4wNA==)' /> +<circle cx='173.51' cy='483.60' r='2.70pt' style='stroke-width: 0.75;' clip-path='url(#cpNTkuMDR8MzI5Ljc2fDUwMi41Nnw1OS4wNA==)' /> +<circle cx='225.73' cy='485.93' r='2.70pt' style='stroke-width: 0.75;' clip-path='url(#cpNTkuMDR8MzI5Ljc2fDUwMi41Nnw1OS4wNA==)' /> +<circle cx='225.73' cy='485.89' r='2.70pt' style='stroke-width: 0.75;' clip-path='url(#cpNTkuMDR8MzI5Ljc2fDUwMi41Nnw1OS4wNA==)' /> +<polyline points='71.16,462.46 74.79,468.75 67.52,468.75 71.16,462.46 ' style='stroke-width: 0.75; stroke: #FF0000;' clip-path='url(#cpNTkuMDR8MzI5Ljc2fDUwMi41Nnw1OS4wNA==)' /> +<polyline points='71.16,459.24 74.79,465.53 67.52,465.53 71.16,459.24 ' style='stroke-width: 0.75; stroke: #FF0000;' clip-path='url(#cpNTkuMDR8MzI5Ljc2fDUwMi41Nnw1OS4wNA==)' /> +<polyline points='75.33,429.98 78.97,436.28 71.70,436.28 75.33,429.98 ' style='stroke-width: 0.75; stroke: #FF0000;' clip-path='url(#cpNTkuMDR8MzI5Ljc2fDUwMi41Nnw1OS4wNA==)' /> +<polyline points='75.33,429.78 78.97,436.07 71.70,436.07 75.33,429.78 ' style='stroke-width: 0.75; stroke: #FF0000;' clip-path='url(#cpNTkuMDR8MzI5Ljc2fDUwMi41Nnw1OS4wNA==)' /> +<polyline points='83.69,389.49 87.33,395.79 80.05,395.79 83.69,389.49 ' style='stroke-width: 0.75; stroke: #FF0000;' clip-path='url(#cpNTkuMDR8MzI5Ljc2fDUwMi41Nnw1OS4wNA==)' /> +<polyline points='83.69,383.45 87.33,389.75 80.05,389.75 83.69,383.45 ' style='stroke-width: 0.75; stroke: #FF0000;' clip-path='url(#cpNTkuMDR8MzI5Ljc2fDUwMi41Nnw1OS4wNA==)' /> +<polyline points='98.31,314.15 101.95,320.45 94.67,320.45 98.31,314.15 ' style='stroke-width: 0.75; stroke: #FF0000;' clip-path='url(#cpNTkuMDR8MzI5Ljc2fDUwMi41Nnw1OS4wNA==)' /> +<polyline points='98.31,348.28 101.95,354.58 94.67,354.58 98.31,348.28 ' style='stroke-width: 0.75; stroke: #FF0000;' clip-path='url(#cpNTkuMDR8MzI5Ljc2fDUwMi41Nnw1OS4wNA==)' /> +<polyline points='112.93,303.36 116.57,309.66 109.30,309.66 112.93,303.36 ' style='stroke-width: 0.75; stroke: #FF0000;' clip-path='url(#cpNTkuMDR8MzI5Ljc2fDUwMi41Nnw1OS4wNA==)' /> +<polyline points='112.93,295.03 116.57,301.33 109.30,301.33 112.93,295.03 ' style='stroke-width: 0.75; stroke: #FF0000;' clip-path='url(#cpNTkuMDR8MzI5Ljc2fDUwMi41Nnw1OS4wNA==)' /> +<polyline points='142.18,316.04 145.81,322.34 138.54,322.34 142.18,316.04 ' style='stroke-width: 0.75; stroke: #FF0000;' clip-path='url(#cpNTkuMDR8MzI5Ljc2fDUwMi41Nnw1OS4wNA==)' /> +<polyline points='142.18,329.20 145.81,335.50 138.54,335.50 142.18,329.20 ' style='stroke-width: 0.75; stroke: #FF0000;' clip-path='url(#cpNTkuMDR8MzI5Ljc2fDUwMi41Nnw1OS4wNA==)' /> +<polyline points='173.51,316.16 177.15,322.46 169.87,322.46 173.51,316.16 ' style='stroke-width: 0.75; stroke: #FF0000;' clip-path='url(#cpNTkuMDR8MzI5Ljc2fDUwMi41Nnw1OS4wNA==)' /> +<polyline points='173.51,320.91 177.15,327.21 169.87,327.21 173.51,320.91 ' style='stroke-width: 0.75; stroke: #FF0000;' clip-path='url(#cpNTkuMDR8MzI5Ljc2fDUwMi41Nnw1OS4wNA==)' /> +<polyline points='225.73,320.59 229.37,326.89 222.10,326.89 225.73,320.59 ' style='stroke-width: 0.75; stroke: #FF0000;' clip-path='url(#cpNTkuMDR8MzI5Ljc2fDUwMi41Nnw1OS4wNA==)' /> +<polyline points='225.73,345.70 229.37,352.00 222.10,352.00 225.73,345.70 ' style='stroke-width: 0.75; stroke: #FF0000;' clip-path='url(#cpNTkuMDR8MzI5Ljc2fDUwMi41Nnw1OS4wNA==)' /> +<polyline points='277.96,357.01 281.59,363.31 274.32,363.31 277.96,357.01 ' style='stroke-width: 0.75; stroke: #FF0000;' clip-path='url(#cpNTkuMDR8MzI5Ljc2fDUwMi41Nnw1OS4wNA==)' /> +<polyline points='277.96,348.60 281.59,354.90 274.32,354.90 277.96,348.60 ' style='stroke-width: 0.75; stroke: #FF0000;' clip-path='url(#cpNTkuMDR8MzI5Ljc2fDUwMi41Nnw1OS4wNA==)' /> +<polyline points='319.73,380.72 323.37,387.01 316.10,387.01 319.73,380.72 ' style='stroke-width: 0.75; stroke: #FF0000;' clip-path='url(#cpNTkuMDR8MzI5Ljc2fDUwMi41Nnw1OS4wNA==)' /> +<polyline points='319.73,347.88 323.37,354.17 316.10,354.17 319.73,347.88 ' style='stroke-width: 0.75; stroke: #FF0000;' clip-path='url(#cpNTkuMDR8MzI5Ljc2fDUwMi41Nnw1OS4wNA==)' /> +<polyline points='69.07,85.07 71.60,130.41 74.13,170.63 76.66,206.29 79.19,237.93 81.73,265.99 84.26,290.88 86.79,312.95 89.32,332.53 91.85,349.90 94.39,365.30 96.92,378.96 99.45,391.07 101.98,401.82 104.51,411.35 107.05,419.81 109.58,427.31 112.11,433.96 114.64,439.85 117.17,445.09 119.71,449.73 122.24,453.84 124.77,457.49 127.30,460.73 129.83,463.60 132.37,466.15 134.90,468.41 137.43,470.41 139.96,472.19 142.49,473.77 145.03,475.16 147.56,476.40 150.09,477.50 152.62,478.48 155.15,479.35 157.69,480.11 160.22,480.79 162.75,481.40 165.28,481.93 167.81,482.41 170.35,482.83 172.88,483.20 175.41,483.53 177.94,483.83 180.47,484.09 183.01,484.32 185.54,484.52 188.07,484.71 190.60,484.87 193.13,485.01 195.67,485.14 198.20,485.25 200.73,485.35 203.26,485.44 205.79,485.52 208.33,485.59 210.86,485.65 213.39,485.70 215.92,485.75 218.45,485.80 220.99,485.83 223.52,485.87 226.05,485.90 228.58,485.92 231.11,485.95 233.65,485.97 236.18,485.99 238.71,486.00 241.24,486.02 243.77,486.03 246.31,486.04 248.84,486.05 251.37,486.06 253.90,486.07 256.43,486.08 258.97,486.08 261.50,486.09 264.03,486.09 266.56,486.10 269.09,486.10 271.63,486.11 274.16,486.11 276.69,486.11 279.22,486.11 281.75,486.12 284.29,486.12 286.82,486.12 289.35,486.12 291.88,486.12 294.41,486.12 296.95,486.13 299.48,486.13 302.01,486.13 304.54,486.13 307.07,486.13 309.61,486.13 312.14,486.13 314.67,486.13 317.20,486.13 319.73,486.13 ' style='stroke-width: 0.75;' clip-path='url(#cpNTkuMDR8MzI5Ljc2fDUwMi41Nnw1OS4wNA==)' /> +<polyline points='69.07,486.13 71.60,462.92 74.13,442.48 76.66,424.49 79.19,408.68 81.73,394.81 84.26,382.65 86.79,372.00 89.32,362.70 91.85,354.59 94.39,347.54 96.92,341.42 99.45,336.14 101.98,331.59 104.51,327.68 107.05,324.36 109.58,321.55 112.11,319.18 114.64,317.22 117.17,315.61 119.71,314.32 122.24,313.30 124.77,312.53 127.30,311.97 129.83,311.60 132.37,311.41 134.90,311.36 137.43,311.44 139.96,311.63 142.49,311.93 145.03,312.32 147.56,312.79 150.09,313.32 152.62,313.92 155.15,314.57 157.69,315.26 160.22,316.00 162.75,316.77 165.28,317.57 167.81,318.39 170.35,319.24 172.88,320.10 175.41,320.99 177.94,321.88 180.47,322.79 183.01,323.71 185.54,324.63 188.07,325.56 190.60,326.50 193.13,327.44 195.67,328.38 198.20,329.32 200.73,330.26 203.26,331.20 205.79,332.14 208.33,333.09 210.86,334.02 213.39,334.96 215.92,335.89 218.45,336.82 220.99,337.75 223.52,338.67 226.05,339.59 228.58,340.51 231.11,341.42 233.65,342.32 236.18,343.23 238.71,344.12 241.24,345.02 243.77,345.90 246.31,346.79 248.84,347.66 251.37,348.54 253.90,349.40 256.43,350.27 258.97,351.12 261.50,351.98 264.03,352.83 266.56,353.67 269.09,354.51 271.63,355.34 274.16,356.17 276.69,356.99 279.22,357.80 281.75,358.62 284.29,359.42 286.82,360.23 289.35,361.02 291.88,361.82 294.41,362.60 296.95,363.38 299.48,364.16 302.01,364.93 304.54,365.70 307.07,366.47 309.61,367.22 312.14,367.98 314.67,368.73 317.20,369.47 319.73,370.21 ' style='stroke-width: 0.75; stroke: #FF0000;' clip-path='url(#cpNTkuMDR8MzI5Ljc2fDUwMi41Nnw1OS4wNA==)' /> +<rect x='241.17' y='81.22' width='75.06' height='43.20' style='stroke-width: 0.75; fill: #FFFFFF;' clip-path='url(#cpNTkuMDR8MzI5Ljc2fDUwMi41Nnw1OS4wNA==)' /> +<line x1='244.41' y1='95.62' x2='266.01' y2='95.62' style='stroke-width: 0.75;' clip-path='url(#cpNTkuMDR8MzI5Ljc2fDUwMi41Nnw1OS4wNA==)' /> +<line x1='244.41' y1='110.02' x2='266.01' y2='110.02' style='stroke-width: 0.75; stroke: #FF0000;' clip-path='url(#cpNTkuMDR8MzI5Ljc2fDUwMi41Nnw1OS4wNA==)' /> +<circle cx='255.21' cy='95.62' r='2.70pt' style='stroke-width: 0.75;' clip-path='url(#cpNTkuMDR8MzI5Ljc2fDUwMi41Nnw1OS4wNA==)' /> +<polyline points='255.21,105.82 258.84,112.12 251.57,112.12 255.21,105.82 ' style='stroke-width: 0.75; stroke: #FF0000;' clip-path='url(#cpNTkuMDR8MzI5Ljc2fDUwMi41Nnw1OS4wNA==)' /> +<g clip-path='url(#cpNTkuMDR8MzI5Ljc2fDUwMi41Nnw1OS4wNA==)'><text x='276.81' y='99.74' style='font-size: 12.00px; font-family: Liberation Sans;' textLength='34.02px' lengthAdjust='spacingAndGlyphs'>parent</text></g> +<g clip-path='url(#cpNTkuMDR8MzI5Ljc2fDUwMi41Nnw1OS4wNA==)'><text x='276.81' y='114.14' style='font-size: 12.00px; font-family: Liberation Sans;' textLength='16.67px' lengthAdjust='spacingAndGlyphs'>m1</text></g> +<defs> + <clipPath id='cpNDE5LjA0fDY4OS43Nnw1MDIuNTZ8NTkuMDQ='> + <rect x='419.04' y='59.04' width='270.72' height='443.52' /> + </clipPath> +</defs> +<defs> + <clipPath id='cpMC4wMHw3MjAuMDB8NTc2LjAwfDAuMDA='> + <rect x='0.00' y='0.00' width='720.00' height='576.00' /> + </clipPath> +</defs> +<line x1='429.07' y1='502.56' x2='657.74' y2='502.56' style='stroke-width: 0.75;' clip-path='url(#cpMC4wMHw3MjAuMDB8NTc2LjAwfDAuMDA=)' /> +<line x1='429.07' y1='502.56' x2='429.07' y2='509.76' style='stroke-width: 0.75;' clip-path='url(#cpMC4wMHw3MjAuMDB8NTc2LjAwfDAuMDA=)' /> +<line x1='474.80' y1='502.56' x2='474.80' y2='509.76' style='stroke-width: 0.75;' clip-path='url(#cpMC4wMHw3MjAuMDB8NTc2LjAwfDAuMDA=)' /> +<line x1='520.53' y1='502.56' x2='520.53' y2='509.76' style='stroke-width: 0.75;' clip-path='url(#cpMC4wMHw3MjAuMDB8NTc2LjAwfDAuMDA=)' /> +<line x1='566.27' y1='502.56' x2='566.27' y2='509.76' style='stroke-width: 0.75;' clip-path='url(#cpMC4wMHw3MjAuMDB8NTc2LjAwfDAuMDA=)' /> +<line x1='612.00' y1='502.56' x2='612.00' y2='509.76' style='stroke-width: 0.75;' clip-path='url(#cpMC4wMHw3MjAuMDB8NTc2LjAwfDAuMDA=)' /> +<line x1='657.74' y1='502.56' x2='657.74' y2='509.76' style='stroke-width: 0.75;' clip-path='url(#cpMC4wMHw3MjAuMDB8NTc2LjAwfDAuMDA=)' /> +<g clip-path='url(#cpMC4wMHw3MjAuMDB8NTc2LjAwfDAuMDA=)'><text x='425.73' y='528.48' style='font-size: 12.00px; font-family: Liberation Sans;' textLength='6.67px' lengthAdjust='spacingAndGlyphs'>0</text></g> +<g clip-path='url(#cpMC4wMHw3MjAuMDB8NTc2LjAwfDAuMDA=)'><text x='468.13' y='528.48' style='font-size: 12.00px; font-family: Liberation Sans;' textLength='13.34px' lengthAdjust='spacingAndGlyphs'>20</text></g> +<g clip-path='url(#cpMC4wMHw3MjAuMDB8NTc2LjAwfDAuMDA=)'><text x='513.86' y='528.48' style='font-size: 12.00px; font-family: Liberation Sans;' textLength='13.34px' lengthAdjust='spacingAndGlyphs'>40</text></g> +<g clip-path='url(#cpMC4wMHw3MjAuMDB8NTc2LjAwfDAuMDA=)'><text x='559.60' y='528.48' style='font-size: 12.00px; font-family: Liberation Sans;' textLength='13.34px' lengthAdjust='spacingAndGlyphs'>60</text></g> +<g clip-path='url(#cpMC4wMHw3MjAuMDB8NTc2LjAwfDAuMDA=)'><text x='605.33' y='528.48' style='font-size: 12.00px; font-family: Liberation Sans;' textLength='13.34px' lengthAdjust='spacingAndGlyphs'>80</text></g> +<g clip-path='url(#cpMC4wMHw3MjAuMDB8NTc2LjAwfDAuMDA=)'><text x='647.73' y='528.48' style='font-size: 12.00px; font-family: Liberation Sans;' textLength='20.02px' lengthAdjust='spacingAndGlyphs'>100</text></g> +<line x1='419.04' y1='486.13' x2='419.04' y2='77.12' style='stroke-width: 0.75;' clip-path='url(#cpMC4wMHw3MjAuMDB8NTc2LjAwfDAuMDA=)' /> +<line x1='419.04' y1='486.13' x2='411.84' y2='486.13' style='stroke-width: 0.75;' clip-path='url(#cpMC4wMHw3MjAuMDB8NTc2LjAwfDAuMDA=)' /> +<line x1='419.04' y1='427.70' x2='411.84' y2='427.70' style='stroke-width: 0.75;' clip-path='url(#cpMC4wMHw3MjAuMDB8NTc2LjAwfDAuMDA=)' /> +<line x1='419.04' y1='369.27' x2='411.84' y2='369.27' style='stroke-width: 0.75;' clip-path='url(#cpMC4wMHw3MjAuMDB8NTc2LjAwfDAuMDA=)' /> +<line x1='419.04' y1='310.84' x2='411.84' y2='310.84' style='stroke-width: 0.75;' clip-path='url(#cpMC4wMHw3MjAuMDB8NTc2LjAwfDAuMDA=)' /> +<line x1='419.04' y1='252.41' x2='411.84' y2='252.41' style='stroke-width: 0.75;' clip-path='url(#cpMC4wMHw3MjAuMDB8NTc2LjAwfDAuMDA=)' /> +<line x1='419.04' y1='193.98' x2='411.84' y2='193.98' style='stroke-width: 0.75;' clip-path='url(#cpMC4wMHw3MjAuMDB8NTc2LjAwfDAuMDA=)' /> +<line x1='419.04' y1='135.55' x2='411.84' y2='135.55' style='stroke-width: 0.75;' clip-path='url(#cpMC4wMHw3MjAuMDB8NTc2LjAwfDAuMDA=)' /> +<line x1='419.04' y1='77.12' x2='411.84' y2='77.12' style='stroke-width: 0.75;' clip-path='url(#cpMC4wMHw3MjAuMDB8NTc2LjAwfDAuMDA=)' /> +<g clip-path='url(#cpMC4wMHw3MjAuMDB8NTc2LjAwfDAuMDA=)'><text transform='translate(401.76,489.47) rotate(-90)' style='font-size: 12.00px; font-family: Liberation Sans;' textLength='6.67px' lengthAdjust='spacingAndGlyphs'>0</text></g> +<g clip-path='url(#cpMC4wMHw3MjAuMDB8NTc2LjAwfDAuMDA=)'><text transform='translate(401.76,434.37) rotate(-90)' style='font-size: 12.00px; font-family: Liberation Sans;' textLength='13.34px' lengthAdjust='spacingAndGlyphs'>20</text></g> +<g clip-path='url(#cpMC4wMHw3MjAuMDB8NTc2LjAwfDAuMDA=)'><text transform='translate(401.76,375.94) rotate(-90)' style='font-size: 12.00px; font-family: Liberation Sans;' textLength='13.34px' lengthAdjust='spacingAndGlyphs'>40</text></g> +<g clip-path='url(#cpMC4wMHw3MjAuMDB8NTc2LjAwfDAuMDA=)'><text transform='translate(401.76,317.51) rotate(-90)' style='font-size: 12.00px; font-family: Liberation Sans;' textLength='13.34px' lengthAdjust='spacingAndGlyphs'>60</text></g> +<g clip-path='url(#cpMC4wMHw3MjAuMDB8NTc2LjAwfDAuMDA=)'><text transform='translate(401.76,259.08) rotate(-90)' style='font-size: 12.00px; font-family: Liberation Sans;' textLength='13.34px' lengthAdjust='spacingAndGlyphs'>80</text></g> +<g clip-path='url(#cpMC4wMHw3MjAuMDB8NTc2LjAwfDAuMDA=)'><text transform='translate(401.76,203.99) rotate(-90)' style='font-size: 12.00px; font-family: Liberation Sans;' textLength='20.02px' lengthAdjust='spacingAndGlyphs'>100</text></g> +<g clip-path='url(#cpMC4wMHw3MjAuMDB8NTc2LjAwfDAuMDA=)'><text transform='translate(401.76,145.56) rotate(-90)' style='font-size: 12.00px; font-family: Liberation Sans;' textLength='20.02px' lengthAdjust='spacingAndGlyphs'>120</text></g> +<g clip-path='url(#cpMC4wMHw3MjAuMDB8NTc2LjAwfDAuMDA=)'><text transform='translate(401.76,87.13) rotate(-90)' style='font-size: 12.00px; font-family: Liberation Sans;' textLength='20.02px' lengthAdjust='spacingAndGlyphs'>140</text></g> +<polyline points='419.04,502.56 689.76,502.56 689.76,59.04 419.04,59.04 419.04,502.56 ' style='stroke-width: 0.75;' clip-path='url(#cpMC4wMHw3MjAuMDB8NTc2LjAwfDAuMDA=)' /> +<defs> + <clipPath id='cpMzYwLjAwfDcyMC4wMHw1NzYuMDB8MC4wMA=='> + <rect x='360.00' y='0.00' width='360.00' height='576.00' /> + </clipPath> +</defs> +<g clip-path='url(#cpMzYwLjAwfDcyMC4wMHw1NzYuMDB8MC4wMA==)'><text x='529.06' y='557.28' style='font-size: 12.00px; font-family: Liberation Sans;' textLength='50.69px' lengthAdjust='spacingAndGlyphs'>Predicted</text></g> +<g clip-path='url(#cpMzYwLjAwfDcyMC4wMHw1NzYuMDB8MC4wMA==)'><text transform='translate(372.96,326.16) rotate(-90)' style='font-size: 12.00px; font-family: Liberation Sans;' textLength='90.72px' lengthAdjust='spacingAndGlyphs'>Squared residual</text></g> +<defs> + <clipPath id='cpNDE5LjA0fDY4OS43Nnw1MDIuNTZ8NTkuMDQ='> + <rect x='419.04' y='59.04' width='270.72' height='443.52' /> + </clipPath> +</defs> +<circle cx='656.95' cy='486.02' r='2.70pt' style='stroke-width: 0.75;' clip-path='url(#cpNDE5LjA0fDY4OS43Nnw1MDIuNTZ8NTkuMDQ=)' /> +<circle cx='656.95' cy='469.50' r='2.70pt' style='stroke-width: 0.75;' clip-path='url(#cpNDE5LjA0fDY4OS43Nnw1MDIuNTZ8NTkuMDQ=)' /> +<circle cx='635.47' cy='455.53' r='2.70pt' style='stroke-width: 0.75;' clip-path='url(#cpNDE5LjA0fDY4OS43Nnw1MDIuNTZ8NTkuMDQ=)' /> +<circle cx='635.47' cy='471.52' r='2.70pt' style='stroke-width: 0.75;' clip-path='url(#cpNDE5LjA0fDY4OS43Nnw1MDIuNTZ8NTkuMDQ=)' /> +<circle cx='598.40' cy='143.91' r='2.70pt' style='stroke-width: 0.75;' clip-path='url(#cpNDE5LjA0fDY4OS43Nnw1MDIuNTZ8NTkuMDQ=)' /> +<circle cx='598.40' cy='411.24' r='2.70pt' style='stroke-width: 0.75;' clip-path='url(#cpNDE5LjA0fDY4OS43Nnw1MDIuNTZ8NTkuMDQ=)' /> +<circle cx='543.04' cy='468.21' r='2.70pt' style='stroke-width: 0.75;' clip-path='url(#cpNDE5LjA0fDY4OS43Nnw1MDIuNTZ8NTkuMDQ=)' /> +<circle cx='543.04' cy='404.48' r='2.70pt' style='stroke-width: 0.75;' clip-path='url(#cpNDE5LjA0fDY4OS43Nnw1MDIuNTZ8NTkuMDQ=)' /> +<circle cx='486.07' cy='470.13' r='2.70pt' style='stroke-width: 0.75;' clip-path='url(#cpNDE5LjA0fDY4OS43Nnw1MDIuNTZ8NTkuMDQ=)' /> +<circle cx='486.07' cy='477.59' r='2.70pt' style='stroke-width: 0.75;' clip-path='url(#cpNDE5LjA0fDY4OS43Nnw1MDIuNTZ8NTkuMDQ=)' /> +<circle cx='457.58' cy='483.39' r='2.70pt' style='stroke-width: 0.75;' clip-path='url(#cpNDE5LjA0fDY4OS43Nnw1MDIuNTZ8NTkuMDQ=)' /> +<circle cx='457.58' cy='484.13' r='2.70pt' style='stroke-width: 0.75;' clip-path='url(#cpNDE5LjA0fDY4OS43Nnw1MDIuNTZ8NTkuMDQ=)' /> +<circle cx='436.20' cy='485.92' r='2.70pt' style='stroke-width: 0.75;' clip-path='url(#cpNDE5LjA0fDY4OS43Nnw1MDIuNTZ8NTkuMDQ=)' /> +<circle cx='436.20' cy='486.01' r='2.70pt' style='stroke-width: 0.75;' clip-path='url(#cpNDE5LjA0fDY4OS43Nnw1MDIuNTZ8NTkuMDQ=)' /> +<circle cx='430.68' cy='486.13' r='2.70pt' style='stroke-width: 0.75;' clip-path='url(#cpNDE5LjA0fDY4OS43Nnw1MDIuNTZ8NTkuMDQ=)' /> +<circle cx='430.68' cy='486.12' r='2.70pt' style='stroke-width: 0.75;' clip-path='url(#cpNDE5LjA0fDY4OS43Nnw1MDIuNTZ8NTkuMDQ=)' /> +<circle cx='429.20' cy='486.13' r='2.70pt' style='stroke-width: 0.75;' clip-path='url(#cpNDE5LjA0fDY4OS43Nnw1MDIuNTZ8NTkuMDQ=)' /> +<circle cx='429.20' cy='486.13' r='2.70pt' style='stroke-width: 0.75;' clip-path='url(#cpNDE5LjA0fDY4OS43Nnw1MDIuNTZ8NTkuMDQ=)' /> +<polyline points='440.07,481.93 443.70,488.23 436.43,488.23 440.07,481.93 ' style='stroke-width: 0.75; stroke: #FF0000;' clip-path='url(#cpNDE5LjA0fDY4OS43Nnw1MDIuNTZ8NTkuMDQ=)' /> +<polyline points='440.07,479.93 443.70,486.22 436.43,486.22 440.07,479.93 ' style='stroke-width: 0.75; stroke: #FF0000;' clip-path='url(#cpNDE5LjA0fDY4OS43Nnw1MDIuNTZ8NTkuMDQ=)' /> +<polyline points='458.89,481.88 462.53,488.18 455.25,488.18 458.89,481.88 ' style='stroke-width: 0.75; stroke: #FF0000;' clip-path='url(#cpNDE5LjA0fDY4OS43Nnw1MDIuNTZ8NTkuMDQ=)' /> +<polyline points='458.89,481.91 462.53,488.21 455.25,488.21 458.89,481.91 ' style='stroke-width: 0.75; stroke: #FF0000;' clip-path='url(#cpNDE5LjA0fDY4OS43Nnw1MDIuNTZ8NTkuMDQ=)' /> +<polyline points='486.39,469.07 490.03,475.37 482.75,475.37 486.39,469.07 ' style='stroke-width: 0.75; stroke: #FF0000;' clip-path='url(#cpNDE5LjA0fDY4OS43Nnw1MDIuNTZ8NTkuMDQ=)' /> +<polyline points='486.39,480.89 490.03,487.19 482.75,487.19 486.39,480.89 ' style='stroke-width: 0.75; stroke: #FF0000;' clip-path='url(#cpNDE5LjA0fDY4OS43Nnw1MDIuNTZ8NTkuMDQ=)' /> +<polyline points='513.00,409.28 516.63,415.58 509.36,415.58 513.00,409.28 ' style='stroke-width: 0.75; stroke: #FF0000;' clip-path='url(#cpNDE5LjA0fDY4OS43Nnw1MDIuNTZ8NTkuMDQ=)' /> +<polyline points='513.00,446.29 516.63,452.59 509.36,452.59 513.00,446.29 ' style='stroke-width: 0.75; stroke: #FF0000;' clip-path='url(#cpNDE5LjA0fDY4OS43Nnw1MDIuNTZ8NTkuMDQ=)' /> +<polyline points='524.31,460.34 527.95,466.64 520.67,466.64 524.31,460.34 ' style='stroke-width: 0.75; stroke: #FF0000;' clip-path='url(#cpNDE5LjA0fDY4OS43Nnw1MDIuNTZ8NTkuMDQ=)' /> +<polyline points='524.31,414.94 527.95,421.23 520.67,421.23 524.31,414.94 ' style='stroke-width: 0.75; stroke: #FF0000;' clip-path='url(#cpNDE5LjA0fDY4OS43Nnw1MDIuNTZ8NTkuMDQ=)' /> +<polyline points='528.07,469.36 531.70,475.66 524.43,475.66 528.07,469.36 ' style='stroke-width: 0.75; stroke: #FF0000;' clip-path='url(#cpNDE5LjA0fDY4OS43Nnw1MDIuNTZ8NTkuMDQ=)' /> +<polyline points='528.07,398.48 531.70,404.78 524.43,404.78 528.07,398.48 ' style='stroke-width: 0.75; stroke: #FF0000;' clip-path='url(#cpNDE5LjA0fDY4OS43Nnw1MDIuNTZ8NTkuMDQ=)' /> +<polyline points='523.28,481.93 526.91,488.23 519.64,488.23 523.28,481.93 ' style='stroke-width: 0.75; stroke: #FF0000;' clip-path='url(#cpNDE5LjA0fDY4OS43Nnw1MDIuNTZ8NTkuMDQ=)' /> +<polyline points='523.28,477.80 526.91,484.10 519.64,484.10 523.28,477.80 ' style='stroke-width: 0.75; stroke: #FF0000;' clip-path='url(#cpNDE5LjA0fDY4OS43Nnw1MDIuNTZ8NTkuMDQ=)' /> +<polyline points='512.39,443.02 516.03,449.32 508.76,449.32 512.39,443.02 ' style='stroke-width: 0.75; stroke: #FF0000;' clip-path='url(#cpNDE5LjA0fDY4OS43Nnw1MDIuNTZ8NTkuMDQ=)' /> +<polyline points='512.39,462.33 516.03,468.63 508.76,468.63 512.39,462.33 ' style='stroke-width: 0.75; stroke: #FF0000;' clip-path='url(#cpNDE5LjA0fDY4OS43Nnw1MDIuNTZ8NTkuMDQ=)' /> +<polyline points='502.21,479.31 505.85,485.61 498.58,485.61 502.21,479.31 ' style='stroke-width: 0.75; stroke: #FF0000;' clip-path='url(#cpNDE5LjA0fDY4OS43Nnw1MDIuNTZ8NTkuMDQ=)' /> +<polyline points='502.21,478.12 505.85,484.42 498.58,484.42 502.21,478.12 ' style='stroke-width: 0.75; stroke: #FF0000;' clip-path='url(#cpNDE5LjA0fDY4OS43Nnw1MDIuNTZ8NTkuMDQ=)' /> +<polyline points='494.93,442.92 498.57,449.22 491.30,449.22 494.93,442.92 ' style='stroke-width: 0.75; stroke: #FF0000;' clip-path='url(#cpNDE5LjA0fDY4OS43Nnw1MDIuNTZ8NTkuMDQ=)' /> +<polyline points='494.93,422.62 498.57,428.92 491.30,428.92 494.93,422.62 ' style='stroke-width: 0.75; stroke: #FF0000;' clip-path='url(#cpNDE5LjA0fDY4OS43Nnw1MDIuNTZ8NTkuMDQ=)' /> +<line x1='419.04' y1='452.34' x2='689.76' y2='452.34' style='stroke-width: 0.75; stroke-dasharray: 4.00,4.00;' clip-path='url(#cpNDE5LjA0fDY4OS43Nnw1MDIuNTZ8NTkuMDQ=)' /> +<line x1='419.04' y1='462.32' x2='689.76' y2='462.32' style='stroke-width: 0.75; stroke: #FF0000; stroke-dasharray: 4.00,4.00;' clip-path='url(#cpNDE5LjA0fDY4OS43Nnw1MDIuNTZ8NTkuMDQ=)' /> +<defs> + <clipPath id='cpNTkuMDR8Njg5Ljc2fDUwMi41Nnw1OS4wNA=='> + <rect x='59.04' y='59.04' width='630.72' height='443.52' /> + </clipPath> +</defs> +</svg> diff --git a/tests/testthat/FOCUS_2006_D.csf b/tests/testthat/FOCUS_2006_D.csf index 118f61f4..de5ee0a4 100644 --- a/tests/testthat/FOCUS_2006_D.csf +++ b/tests/testthat/FOCUS_2006_D.csf @@ -5,7 +5,7 @@ Description: MeasurementUnits: % AR TimeUnits: days Comments: Created using mkin::CAKE_export -Date: 2020-04-08 +Date: 2020-04-09 Optimiser: IRLS [Data] diff --git a/tests/testthat/test_nlme.R b/tests/testthat/test_nlme.R index 0d1fcd6d..efbc231a 100644 --- a/tests/testthat/test_nlme.R +++ b/tests/testthat/test_nlme.R @@ -31,6 +31,7 @@ test_that("nlme_function works correctly", { # The following assignment was introduced for nlme as evaluated by testthat # to find the function assign("nlme_f", nlme_f, pos = globalenv()) + assign("sampling_times", sampling_times, pos = globalenv()) m_nlme_raw <- nlme(value ~ SSasymp(time, 0, parent_0, log_k_parent_sink), data = grouped_data, @@ -68,7 +69,6 @@ test_that("nlme_function works correctly", { test_that("nlme_function works correctly in other cases", { dt50_in <- c(400, 800, 1200, 1600, 2000) - dt50_in_geomean <- geomean(dt50_in) k_in <- log(2) / dt50_in SFO <- mkinmod(parent = mkinsub("SFO")) pred_sfo <- function(k) { @@ -85,15 +85,16 @@ test_that("nlme_function works correctly in other cases", { names(ds_me_sfo_5) <- paste("Dataset", 1:15) dimnames(ds_me_sfo_5) <- list(Subset = 1:3, DT50 = dt50_in) - f_me_sfo_5 <- mmkin("SFO", ds_me_sfo_5) + f_me_sfo_5 <- mmkin("SFO", ds_me_sfo_5, quiet = TRUE) ds_me_sfo_5_grouped_mkin <- nlme_data(f_me_sfo_5) ds_me_sfo_5_mean_dp <- mean_degparms(f_me_sfo_5) me_sfo_function <- nlme_function(f_me_sfo_5) + assign("me_sfo_function", me_sfo_function, pos = globalenv()) f_nlme_sfo_5_all_mkin <- nlme(value ~ me_sfo_function(name, time, parent_0, log_k_parent_sink), - data = ds_me_sfo_5_grouped, + data = ds_me_sfo_5_grouped_mkin, fixed = parent_0 + log_k_parent_sink ~ 1, random = pdDiag(parent_0 + log_k_parent_sink ~ 1), start = ds_me_sfo_5_mean_dp) @@ -109,7 +110,7 @@ test_that("nlme_function works correctly in other cases", { # With less ideal starting values we get fits with lower AIC (not shown) f_nlme_sfo_5_all_mkin_nostart <- nlme(value ~ me_sfo_function(name, time, parent_0, log_k_parent_sink), - data = ds_me_sfo_5_grouped, + data = ds_me_sfo_5_grouped_mkin, fixed = parent_0 + log_k_parent_sink ~ 1, random = pdDiag(parent_0 + log_k_parent_sink ~ 1), start = c(parent_0 = 100, log_k_parent_sink = log(0.1))) diff --git a/tests/testthat/test_plots_summary_twa.R b/tests/testthat/test_plots_summary_twa.R index 77144665..c04192c1 100644 --- a/tests/testthat/test_plots_summary_twa.R +++ b/tests/testthat/test_plots_summary_twa.R @@ -99,6 +99,12 @@ test_that("Plotting mkinfit and mmkin objects is reproducible", { mkinerrplot_FOCUS_C_SFO <- function() mkinerrplot(fits[["SFO", "FOCUS_C"]]) mmkin_FOCUS_C <- function() plot(fits[, "FOCUS_C"]) mmkin_SFO <- function() plot(fits["SFO",]) + fit_D_obs_eigen <- suppressWarnings(mkinfit(SFO_SFO, FOCUS_2006_D, error_model = "obs", quiet = TRUE)) + fit_C_tc <- mkinfit("SFO", FOCUS_2006_C, error_model = "tc", quiet = TRUE) + + plot_errmod_fit_D_obs_eigen <- function() plot_err(fit_D_obs_eigen, sep_obs = FALSE) + plot_errmod_fit_C_tc <- function() plot_err(fit_C_tc) + plot_res_sfo_sfo <- function() plot_res(f_sfo_sfo_desolve) plot_err_sfo_sfo <- function() plot_err(f_sfo_sfo_desolve) plot_errmod_fit_obs_1 <- function() plot_err(fit_obs_1, sep_obs = FALSE) @@ -111,6 +117,10 @@ test_that("Plotting mkinfit and mmkin objects is reproducible", { vdiffr::expect_doppelganger("mkinerrplot for FOCUS C SFO", mkinerrplot_FOCUS_C_SFO) vdiffr::expect_doppelganger("mmkin plot for FOCUS C", mmkin_FOCUS_C) vdiffr::expect_doppelganger("mmkin plot for SFO (FOCUS C and D)", mmkin_SFO) + vdiffr::expect_doppelganger("plot_errmod with FOCUS D obs eigen", plot_errmod_fit_D_obs_eigen) + vdiffr::expect_doppelganger("plot_errmod with FOCUS C tc", plot_errmod_fit_C_tc) + skip_on_travis() # Still not working on Travis, presumably because of deSolve producing + # different results when not working with a compiled model vdiffr::expect_doppelganger("plot_res for FOCUS D", plot_res_sfo_sfo) vdiffr::expect_doppelganger("plot_err for FOCUS D", plot_err_sfo_sfo) vdiffr::expect_doppelganger("plot_errmod with SFO_lin_a_tc", plot_errmod_fit_tc_1) diff --git a/tests/testthat/test_residuals.R b/tests/testthat/test_residuals.R index 35a143f6..e6e54dd5 100644 --- a/tests/testthat/test_residuals.R +++ b/tests/testthat/test_residuals.R @@ -7,4 +7,13 @@ test_that("Residuals are correctly returned", { expect_equivalent( residuals(f, standardized = TRUE)[1:3], c(-0.4171812, 1.4584875, -1.0472450), tolerance = 0.0001) + + expect_equivalent( + residuals(fit_obs_1, standardized = TRUE)[1:3], + c(-0.21771169, -0.33576060, 2.02836138)) + + expect_equivalent( + residuals(fit_tc_1, standardized = TRUE)[1:3], + c(-0.2474499, -0.3794267, 2.2749216), + tolerance = 1e-7) }) |