aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2022-10-26 09:07:04 +0200
committerJohannes Ranke <jranke@uni-bremen.de>2022-10-26 09:07:04 +0200
commit3c5b2596daef4ed0ee5c38a7141fdf48dbe7c070 (patch)
treeaf1228baf8b057fd183f8cf6e3ecaa9495b7f030 /tests
parent06df20703a9390692ab1ece3ae1702a71fff05ae (diff)
Reduced sfo model for multistart.saem.mkin tests
Diffstat (limited to 'tests')
-rw-r--r--tests/testthat/_snaps/multistart/llhist-for-sfo-fit.svg48
-rw-r--r--tests/testthat/_snaps/multistart/parhist-for-sfo-fit.svg106
-rw-r--r--tests/testthat/setup_script.R1
-rw-r--r--tests/testthat/test_multistart.R8
-rw-r--r--tests/testthat/test_saemix_parent.R3
5 files changed, 134 insertions, 32 deletions
diff --git a/tests/testthat/_snaps/multistart/llhist-for-sfo-fit.svg b/tests/testthat/_snaps/multistart/llhist-for-sfo-fit.svg
index 21fa8af8..4342df9b 100644
--- a/tests/testthat/_snaps/multistart/llhist-for-sfo-fit.svg
+++ b/tests/testthat/_snaps/multistart/llhist-for-sfo-fit.svg
@@ -19,32 +19,26 @@
</defs>
<g clip-path='url(#cpMC4wMHw3MjAuMDB8MC4wMHw1NzYuMDA=)'>
<text transform='translate(12.96,280.80) rotate(-90)' text-anchor='middle' style='font-size: 12.00px; font-family: sans;' textLength='148.77px' lengthAdjust='spacingAndGlyphs'>Frequency of log likelihoods</text>
-<line x1='666.40' y1='502.56' x2='82.40' y2='502.56' style='stroke-width: 0.75;' />
-<line x1='666.40' y1='502.56' x2='666.40' y2='509.76' style='stroke-width: 0.75;' />
-<line x1='569.07' y1='502.56' x2='569.07' y2='509.76' style='stroke-width: 0.75;' />
-<line x1='471.73' y1='502.56' x2='471.73' y2='509.76' style='stroke-width: 0.75;' />
-<line x1='374.40' y1='502.56' x2='374.40' y2='509.76' style='stroke-width: 0.75;' />
-<line x1='277.07' y1='502.56' x2='277.07' y2='509.76' style='stroke-width: 0.75;' />
-<line x1='179.73' y1='502.56' x2='179.73' y2='509.76' style='stroke-width: 0.75;' />
+<line x1='82.40' y1='502.56' x2='666.40' y2='502.56' style='stroke-width: 0.75;' />
<line x1='82.40' y1='502.56' x2='82.40' y2='509.76' style='stroke-width: 0.75;' />
-<text x='82.40' y='528.48' text-anchor='middle' style='font-size: 12.00px; font-family: sans;' textLength='34.03px' lengthAdjust='spacingAndGlyphs'>-644.0</text>
-<text x='179.73' y='528.48' text-anchor='middle' style='font-size: 12.00px; font-family: sans;' textLength='34.03px' lengthAdjust='spacingAndGlyphs'>-644.5</text>
-<text x='277.07' y='528.48' text-anchor='middle' style='font-size: 12.00px; font-family: sans;' textLength='34.03px' lengthAdjust='spacingAndGlyphs'>-645.0</text>
-<text x='374.40' y='528.48' text-anchor='middle' style='font-size: 12.00px; font-family: sans;' textLength='34.03px' lengthAdjust='spacingAndGlyphs'>-645.5</text>
-<text x='471.73' y='528.48' text-anchor='middle' style='font-size: 12.00px; font-family: sans;' textLength='34.03px' lengthAdjust='spacingAndGlyphs'>-646.0</text>
-<text x='569.07' y='528.48' text-anchor='middle' style='font-size: 12.00px; font-family: sans;' textLength='34.03px' lengthAdjust='spacingAndGlyphs'>-646.5</text>
-<text x='666.40' y='528.48' text-anchor='middle' style='font-size: 12.00px; font-family: sans;' textLength='34.03px' lengthAdjust='spacingAndGlyphs'>-647.0</text>
+<line x1='228.40' y1='502.56' x2='228.40' y2='509.76' style='stroke-width: 0.75;' />
+<line x1='374.40' y1='502.56' x2='374.40' y2='509.76' style='stroke-width: 0.75;' />
+<line x1='520.40' y1='502.56' x2='520.40' y2='509.76' style='stroke-width: 0.75;' />
+<line x1='666.40' y1='502.56' x2='666.40' y2='509.76' style='stroke-width: 0.75;' />
+<text x='82.40' y='528.48' text-anchor='middle' style='font-size: 12.00px; font-family: sans;' textLength='47.38px' lengthAdjust='spacingAndGlyphs'>-649.836</text>
+<text x='228.40' y='528.48' text-anchor='middle' style='font-size: 12.00px; font-family: sans;' textLength='47.38px' lengthAdjust='spacingAndGlyphs'>-649.834</text>
+<text x='374.40' y='528.48' text-anchor='middle' style='font-size: 12.00px; font-family: sans;' textLength='47.38px' lengthAdjust='spacingAndGlyphs'>-649.832</text>
+<text x='520.40' y='528.48' text-anchor='middle' style='font-size: 12.00px; font-family: sans;' textLength='47.38px' lengthAdjust='spacingAndGlyphs'>-649.830</text>
+<text x='666.40' y='528.48' text-anchor='middle' style='font-size: 12.00px; font-family: sans;' textLength='47.38px' lengthAdjust='spacingAndGlyphs'>-649.828</text>
<line x1='59.04' y1='486.13' x2='59.04' y2='75.47' 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='383.47' x2='51.84' y2='383.47' style='stroke-width: 0.75;' />
-<line x1='59.04' y1='280.80' x2='51.84' y2='280.80' style='stroke-width: 0.75;' />
-<line x1='59.04' y1='178.13' x2='51.84' y2='178.13' style='stroke-width: 0.75;' />
+<line x1='59.04' y1='349.24' x2='51.84' y2='349.24' style='stroke-width: 0.75;' />
+<line x1='59.04' y1='212.36' x2='51.84' y2='212.36' style='stroke-width: 0.75;' />
<line x1='59.04' y1='75.47' x2='51.84' y2='75.47' style='stroke-width: 0.75;' />
<text x='44.64' y='490.26' text-anchor='end' style='font-size: 12.00px; font-family: sans;' textLength='6.67px' lengthAdjust='spacingAndGlyphs'>0</text>
-<text x='44.64' y='387.60' text-anchor='end' style='font-size: 12.00px; font-family: sans;' textLength='6.67px' lengthAdjust='spacingAndGlyphs'>1</text>
-<text x='44.64' y='284.93' text-anchor='end' style='font-size: 12.00px; font-family: sans;' textLength='6.67px' lengthAdjust='spacingAndGlyphs'>2</text>
-<text x='44.64' y='182.26' text-anchor='end' style='font-size: 12.00px; font-family: sans;' textLength='6.67px' lengthAdjust='spacingAndGlyphs'>3</text>
-<text x='44.64' y='79.60' text-anchor='end' style='font-size: 12.00px; font-family: sans;' textLength='6.67px' lengthAdjust='spacingAndGlyphs'>4</text>
+<text x='44.64' y='353.37' text-anchor='end' style='font-size: 12.00px; font-family: sans;' textLength='6.67px' lengthAdjust='spacingAndGlyphs'>1</text>
+<text x='44.64' y='216.48' text-anchor='end' style='font-size: 12.00px; font-family: sans;' textLength='6.67px' lengthAdjust='spacingAndGlyphs'>2</text>
+<text x='44.64' y='79.60' text-anchor='end' style='font-size: 12.00px; font-family: sans;' textLength='6.67px' lengthAdjust='spacingAndGlyphs'>3</text>
</g>
<defs>
<clipPath id='cpNTkuMDR8Njg5Ljc2fDU5LjA0fDUwMi41Ng=='>
@@ -52,13 +46,11 @@
</clipPath>
</defs>
<g clip-path='url(#cpNTkuMDR8Njg5Ljc2fDU5LjA0fDUwMi41Ng==)'>
-<rect x='1201.73' y='280.80' width='9.73' height='205.33' style='stroke-width: 0.75; fill: #D3D3D3;' />
-<rect x='1192.00' y='75.47' width='9.73' height='410.67' style='stroke-width: 0.75; fill: #D3D3D3;' />
-<rect x='1182.27' y='486.13' width='9.73' height='0.00' style='stroke-width: 0.75; fill: #D3D3D3;' />
-<rect x='1172.53' y='383.47' width='9.73' height='102.67' style='stroke-width: 0.75; fill: #D3D3D3;' />
-<rect x='1162.80' y='486.13' width='9.73' height='0.00' style='stroke-width: 0.75; fill: #D3D3D3;' />
-<rect x='1153.07' y='383.47' width='9.73' height='102.67' style='stroke-width: 0.75; fill: #D3D3D3;' />
-<line x1='1231.05' y1='502.56' x2='1231.05' y2='59.04' style='stroke-width: 0.75; stroke: #DF536B;' />
+<rect x='82.40' y='349.24' width='146.00' height='136.89' style='stroke-width: 0.75; fill: #D3D3D3;' />
+<rect x='228.40' y='75.47' width='146.00' height='410.67' style='stroke-width: 0.75; fill: #D3D3D3;' />
+<rect x='374.40' y='75.47' width='146.00' height='410.67' style='stroke-width: 0.75; fill: #D3D3D3;' />
+<rect x='520.40' y='349.24' width='146.00' height='136.89' style='stroke-width: 0.75; fill: #D3D3D3;' />
+<line x1='2159.04' y1='502.56' x2='2159.04' y2='59.04' style='stroke-width: 0.75; stroke: #DF536B;' />
<line x1='101.38' y1='95.62' x2='122.98' y2='95.62' style='stroke-width: 0.75; stroke: #DF536B;' />
<text x='133.78' y='99.75' style='font-size: 12.00px; font-family: sans;' textLength='51.35px' lengthAdjust='spacingAndGlyphs'>original fit</text>
</g>
diff --git a/tests/testthat/_snaps/multistart/parhist-for-sfo-fit.svg b/tests/testthat/_snaps/multistart/parhist-for-sfo-fit.svg
new file mode 100644
index 00000000..f3373901
--- /dev/null
+++ b/tests/testthat/_snaps/multistart/parhist-for-sfo-fit.svg
@@ -0,0 +1,106 @@
+<?xml version='1.0' encoding='UTF-8' ?>
+<svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' class='svglite' data-engine-version='2.0' width='720.00pt' height='576.00pt' viewBox='0 0 720.00 576.00'>
+<defs>
+ <style type='text/css'><![CDATA[
+ .svglite line, .svglite polyline, .svglite polygon, .svglite path, .svglite rect, .svglite 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;'/>
+<defs>
+ <clipPath id='cpMC4wMHw3MjAuMDB8MC4wMHw1NzYuMDA='>
+ <rect x='0.00' y='0.00' width='720.00' height='576.00' />
+ </clipPath>
+</defs>
+<g clip-path='url(#cpMC4wMHw3MjAuMDB8MC4wMHw1NzYuMDA=)'>
+</g>
+<defs>
+ <clipPath id='cpNTkuMDR8Njg5Ljc2fDU5LjA0fDUwMi41Ng=='>
+ <rect x='59.04' y='59.04' width='630.72' height='443.52' />
+ </clipPath>
+</defs>
+<g clip-path='url(#cpNTkuMDR8Njg5Ljc2fDU5LjA0fDUwMi41Ng==)'>
+<polygon points='94.08,280.80 187.52,280.80 187.52,280.77 94.08,280.77 ' style='stroke-width: 0.75; stroke: none; fill: #D3D3D3;' />
+<line x1='94.08' y1='280.79' x2='187.52' y2='280.79' style='stroke-width: 2.25; stroke-linecap: butt;' />
+<line x1='140.80' y1='280.81' x2='140.80' y2='280.80' style='stroke-width: 0.75; stroke-dasharray: 4.00,4.00;' />
+<line x1='140.80' y1='280.74' x2='140.80' y2='280.77' style='stroke-width: 0.75; stroke-dasharray: 4.00,4.00;' />
+<line x1='117.44' y1='280.81' x2='164.16' y2='280.81' style='stroke-width: 0.75;' />
+<line x1='117.44' y1='280.74' x2='164.16' y2='280.74' style='stroke-width: 0.75;' />
+<polygon points='94.08,280.80 187.52,280.80 187.52,280.77 94.08,280.77 ' style='stroke-width: 0.75; fill: none;' />
+<polygon points='210.88,280.81 304.32,280.81 304.32,280.73 210.88,280.73 ' style='stroke-width: 0.75; stroke: none; fill: #D3D3D3;' />
+<line x1='210.88' y1='280.78' x2='304.32' y2='280.78' style='stroke-width: 2.25; stroke-linecap: butt;' />
+<line x1='257.60' y1='280.82' x2='257.60' y2='280.81' style='stroke-width: 0.75; stroke-dasharray: 4.00,4.00;' />
+<line x1='257.60' y1='280.65' x2='257.60' y2='280.73' style='stroke-width: 0.75; stroke-dasharray: 4.00,4.00;' />
+<line x1='234.24' y1='280.82' x2='280.96' y2='280.82' style='stroke-width: 0.75;' />
+<line x1='234.24' y1='280.65' x2='280.96' y2='280.65' style='stroke-width: 0.75;' />
+<polygon points='210.88,280.81 304.32,280.81 304.32,280.73 210.88,280.73 ' style='stroke-width: 0.75; fill: none;' />
+<polygon points='327.68,280.90 421.12,280.90 421.12,280.70 327.68,280.70 ' style='stroke-width: 0.75; stroke: none; fill: #D3D3D3;' />
+<line x1='327.68' y1='280.84' x2='421.12' y2='280.84' style='stroke-width: 2.25; stroke-linecap: butt;' />
+<line x1='374.40' y1='280.92' x2='374.40' y2='280.90' style='stroke-width: 0.75; stroke-dasharray: 4.00,4.00;' />
+<line x1='374.40' y1='280.67' x2='374.40' y2='280.70' style='stroke-width: 0.75; stroke-dasharray: 4.00,4.00;' />
+<line x1='351.04' y1='280.92' x2='397.76' y2='280.92' style='stroke-width: 0.75;' />
+<line x1='351.04' y1='280.67' x2='397.76' y2='280.67' style='stroke-width: 0.75;' />
+<polygon points='327.68,280.90 421.12,280.90 421.12,280.70 327.68,280.70 ' style='stroke-width: 0.75; fill: none;' />
+<circle cx='374.40' cy='280.36' r='2.70' style='stroke-width: 0.75;' />
+<polygon points='444.48,280.85 537.92,280.85 537.92,280.79 444.48,280.79 ' style='stroke-width: 0.75; stroke: none; fill: #D3D3D3;' />
+<line x1='444.48' y1='280.82' x2='537.92' y2='280.82' style='stroke-width: 2.25; stroke-linecap: butt;' />
+<line x1='491.20' y1='280.88' x2='491.20' y2='280.85' style='stroke-width: 0.75; stroke-dasharray: 4.00,4.00;' />
+<line x1='491.20' y1='280.74' x2='491.20' y2='280.79' style='stroke-width: 0.75; stroke-dasharray: 4.00,4.00;' />
+<line x1='467.84' y1='280.88' x2='514.56' y2='280.88' style='stroke-width: 0.75;' />
+<line x1='467.84' y1='280.74' x2='514.56' y2='280.74' style='stroke-width: 0.75;' />
+<polygon points='444.48,280.85 537.92,280.85 537.92,280.79 444.48,280.79 ' style='stroke-width: 0.75; fill: none;' />
+<polygon points='561.28,280.75 654.72,280.75 654.72,280.57 561.28,280.57 ' style='stroke-width: 0.75; stroke: none; fill: #D3D3D3;' />
+<line x1='561.28' y1='280.65' x2='654.72' y2='280.65' style='stroke-width: 2.25; stroke-linecap: butt;' />
+<line x1='608.00' y1='280.80' x2='608.00' y2='280.75' style='stroke-width: 0.75; stroke-dasharray: 4.00,4.00;' />
+<line x1='608.00' y1='280.45' x2='608.00' y2='280.57' style='stroke-width: 0.75; stroke-dasharray: 4.00,4.00;' />
+<line x1='584.64' y1='280.80' x2='631.36' y2='280.80' style='stroke-width: 0.75;' />
+<line x1='584.64' y1='280.45' x2='631.36' y2='280.45' style='stroke-width: 0.75;' />
+<polygon points='561.28,280.75 654.72,280.75 654.72,280.57 561.28,280.57 ' style='stroke-width: 0.75; fill: none;' />
+</g>
+<g clip-path='url(#cpMC4wMHw3MjAuMDB8MC4wMHw1NzYuMDA=)'>
+<line x1='140.80' y1='502.56' x2='608.00' y2='502.56' style='stroke-width: 0.75;' />
+<line x1='140.80' y1='502.56' x2='140.80' y2='509.76' style='stroke-width: 0.75;' />
+<line x1='257.60' y1='502.56' x2='257.60' y2='509.76' style='stroke-width: 0.75;' />
+<line x1='374.40' y1='502.56' x2='374.40' y2='509.76' style='stroke-width: 0.75;' />
+<line x1='491.20' y1='502.56' x2='491.20' y2='509.76' style='stroke-width: 0.75;' />
+<line x1='608.00' y1='502.56' x2='608.00' y2='509.76' style='stroke-width: 0.75;' />
+<text x='140.80' y='528.48' text-anchor='middle' style='font-size: 12.00px; font-family: sans;' textLength='47.38px' lengthAdjust='spacingAndGlyphs'>parent_0</text>
+<text x='257.60' y='528.48' text-anchor='middle' style='font-size: 12.00px; font-family: sans;' textLength='46.71px' lengthAdjust='spacingAndGlyphs'>k_parent</text>
+<text x='374.40' y='528.48' text-anchor='middle' style='font-size: 12.00px; font-family: sans;' textLength='16.68px' lengthAdjust='spacingAndGlyphs'>a.1</text>
+<text x='491.20' y='528.48' text-anchor='middle' style='font-size: 12.00px; font-family: sans;' textLength='16.68px' lengthAdjust='spacingAndGlyphs'>b.1</text>
+<text x='608.00' y='528.48' text-anchor='middle' style='font-size: 12.00px; font-family: sans;' textLength='66.72px' lengthAdjust='spacingAndGlyphs'>SD.k_parent</text>
+<line x1='59.04' y1='486.13' x2='59.04' y2='75.47' 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='280.80' x2='51.84' y2='280.80' style='stroke-width: 0.75;' />
+<line x1='59.04' y1='160.69' x2='51.84' y2='160.69' style='stroke-width: 0.75;' />
+<line x1='59.04' y1='75.47' x2='51.84' y2='75.47' style='stroke-width: 0.75;' />
+<text x='44.64' y='490.26' text-anchor='end' style='font-size: 12.00px; font-family: sans;' textLength='16.68px' lengthAdjust='spacingAndGlyphs'>0.5</text>
+<text x='44.64' y='284.93' text-anchor='end' style='font-size: 12.00px; font-family: sans;' textLength='16.68px' lengthAdjust='spacingAndGlyphs'>1.0</text>
+<text x='44.64' y='164.82' text-anchor='end' style='font-size: 12.00px; font-family: sans;' textLength='16.68px' lengthAdjust='spacingAndGlyphs'>1.5</text>
+<text x='44.64' y='79.60' text-anchor='end' style='font-size: 12.00px; font-family: sans;' textLength='16.68px' lengthAdjust='spacingAndGlyphs'>2.0</text>
+<text transform='translate(12.96,280.80) rotate(-90)' text-anchor='middle' style='font-size: 12.00px; font-family: sans;' textLength='124.73px' lengthAdjust='spacingAndGlyphs'>Normalised parameters</text>
+<polygon points='59.04,502.56 689.76,502.56 689.76,59.04 59.04,59.04 ' style='stroke-width: 0.75; fill: none;' />
+</g>
+<g clip-path='url(#cpNTkuMDR8Njg5Ljc2fDU5LjA0fDUwMi41Ng==)'>
+<circle cx='140.80' cy='280.97' r='8.10' style='stroke-width: 0.75; stroke: #61D04F;' />
+<circle cx='257.60' cy='281.05' r='8.10' style='stroke-width: 0.75; stroke: #61D04F;' />
+<circle cx='140.80' cy='280.75' r='5.40' style='stroke-width: 0.75; stroke: #DF536B;' />
+<circle cx='257.60' cy='280.67' r='5.40' style='stroke-width: 0.75; stroke: #DF536B;' />
+<circle cx='374.40' cy='280.50' r='5.40' style='stroke-width: 0.75; stroke: #DF536B;' />
+<circle cx='491.20' cy='280.92' r='5.40' style='stroke-width: 0.75; stroke: #DF536B;' />
+<circle cx='608.00' cy='280.49' r='5.40' style='stroke-width: 0.75; stroke: #DF536B;' />
+<line x1='59.04' y1='280.80' x2='689.76' y2='280.80' style='stroke-width: 0.75; stroke-dasharray: 4.00,4.00;' />
+<line x1='93.82' y1='465.98' x2='115.42' y2='465.98' style='stroke-width: 0.75;' />
+<circle cx='104.62' cy='437.18' r='2.70' style='stroke-width: 0.75; stroke: #61D04F;' />
+<circle cx='104.62' cy='451.58' r='2.70' style='stroke-width: 0.75; stroke: #DF536B;' />
+<circle cx='104.62' cy='465.98' r='2.70' style='stroke-width: 0.75;' />
+<text x='126.22' y='441.31' style='font-size: 12.00px; font-family: sans;' textLength='105.39px' lengthAdjust='spacingAndGlyphs'>Starting parameters</text>
+<text x='126.22' y='455.71' style='font-size: 12.00px; font-family: sans;' textLength='62.03px' lengthAdjust='spacingAndGlyphs'>Original run</text>
+<text x='126.22' y='470.11' style='font-size: 12.00px; font-family: sans;' textLength='75.36px' lengthAdjust='spacingAndGlyphs'>Multistart runs</text>
+</g>
+</svg>
diff --git a/tests/testthat/setup_script.R b/tests/testthat/setup_script.R
index 4de2674f..777c998a 100644
--- a/tests/testthat/setup_script.R
+++ b/tests/testthat/setup_script.R
@@ -183,6 +183,7 @@ nlme_biphasic <- suppressWarnings(nlme(mmkin_biphasic))
# saemix
sfo_saem_1 <- saem(mmkin_sfo_1, quiet = TRUE, transformations = "saemix")
+sfo_saem_1_reduced <- update(sfo_saem_1, no_random_effect = "parent_0")
dfop_saemix_1 <- saem(mmkin_dfop_1, quiet = TRUE, transformations = "mkin",
no_random_effect = "parent_0")
diff --git a/tests/testthat/test_multistart.R b/tests/testthat/test_multistart.R
index 60fdefdc..e5b44e78 100644
--- a/tests/testthat/test_multistart.R
+++ b/tests/testthat/test_multistart.R
@@ -1,10 +1,14 @@
context("Multistart method for saem.mmkin models")
test_that("multistart works for saem.mmkin models", {
- saem_sfo_s_multi <- multistart(sfo_saem_1, n = 8, cores = n_cores)
+ set.seed(123456)
+ saem_sfo_s_multi <- multistart(sfo_saem_1_reduced, n = 8, cores = n_cores,
+ no_random_effect = "parent_0")
- llhist_sfo <- function() llhist(saem_sfo_s_multi, xlim = c(-644, -647))
+ llhist_sfo <- function() llhist(saem_sfo_s_multi)
+ parhist_sfo <- function() parhist(saem_sfo_s_multi, ylim = c(0.5, 2))
vdiffr::expect_doppelganger("llhist for sfo fit", llhist_sfo)
+ vdiffr::expect_doppelganger("parhist for sfo fit", parhist_sfo)
set.seed(123456)
saem_biphasic_m_multi <- multistart(saem_biphasic_m, n = 8,
diff --git a/tests/testthat/test_saemix_parent.R b/tests/testthat/test_saemix_parent.R
index d8b6b19e..193dcdcd 100644
--- a/tests/testthat/test_saemix_parent.R
+++ b/tests/testthat/test_saemix_parent.R
@@ -10,8 +10,7 @@ test_that("Parent fits using saemix are correctly implemented", {
# We did not introduce variance of parent_0 in the data generation
# This is correctly detected
expect_equal(illparms(sfo_saem_1), "sd(parent_0)")
- # So we remove this variance
- sfo_saem_1_reduced <- update(sfo_saem_1, no_random_effect = "parent_0")
+ # So we have also done a fit without this variance
expect_equal(illparms(sfo_saem_1_reduced), character(0))
# We cannot currently do the fit with completely fixed initial values

Contact - Imprint