Running /Library/Frameworks/R.framework/Resources/bin/R CMD SHLIB foo.c
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I"/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/Rcpp/include/" -I"/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/RcppEigen/include/" -I"/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/RcppEigen/include/unsupported" -I"/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/BH/include" -I"/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/StanHeaders/include/src/" -I"/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/StanHeaders/include/" -I"/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/RcppParallel/include/" -I"/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/rstan/include" -DEIGEN_NO_DEBUG -DBOOST_DISABLE_ASSERTS -DBOOST_PENDING_INTEGER_LOG2_HPP -DSTAN_THREADS -DUSE_STANC3 -DSTRICT_R_HEADERS -DBOOST_PHOENIX_NO_VARIADIC_EXPRESSION -D_HAS_AUTO_PTR_ETC=0 -include '/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/StanHeaders/include/stan/math/prim/fun/Eigen.hpp' -D_REENTRANT -DRCPP_PARALLEL_USE_TBB=1 -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c foo.c -o foo.o
In file included from <built-in>:1:
In file included from /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/StanHeaders/include/stan/math/prim/fun/Eigen.hpp:22:
In file included from /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/RcppEigen/include/Eigen/Dense:1:
In file included from /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/RcppEigen/include/Eigen/Core:19:
/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/RcppEigen/include/Eigen/src/Core/util/Macros.h:679:10: fatal error: 'cmath' file not found
679 | #include <cmath>
| ^~~~~~~
1 error generated.
make: *** [foo.o] Error 1
Running /Library/Frameworks/R.framework/Resources/bin/R CMD SHLIB foo.c
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I"/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/Rcpp/include/" -I"/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/RcppEigen/include/" -I"/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/RcppEigen/include/unsupported" -I"/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/BH/include" -I"/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/StanHeaders/include/src/" -I"/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/StanHeaders/include/" -I"/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/RcppParallel/include/" -I"/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/rstan/include" -DEIGEN_NO_DEBUG -DBOOST_DISABLE_ASSERTS -DBOOST_PENDING_INTEGER_LOG2_HPP -DSTAN_THREADS -DUSE_STANC3 -DSTRICT_R_HEADERS -DBOOST_PHOENIX_NO_VARIADIC_EXPRESSION -D_HAS_AUTO_PTR_ETC=0 -include '/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/StanHeaders/include/stan/math/prim/fun/Eigen.hpp' -D_REENTRANT -DRCPP_PARALLEL_USE_TBB=1 -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c foo.c -o foo.o
In file included from <built-in>:1:
In file included from /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/StanHeaders/include/stan/math/prim/fun/Eigen.hpp:22:
In file included from /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/RcppEigen/include/Eigen/Dense:1:
In file included from /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/RcppEigen/include/Eigen/Core:19:
/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/RcppEigen/include/Eigen/src/Core/util/Macros.h:679:10: fatal error: 'cmath' file not found
679 | #include <cmath>
| ^~~~~~~
1 error generated.
make: *** [foo.o] Error 1
Running /Library/Frameworks/R.framework/Resources/bin/R CMD SHLIB foo.c
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I"/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/Rcpp/include/" -I"/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/RcppEigen/include/" -I"/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/RcppEigen/include/unsupported" -I"/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/BH/include" -I"/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/StanHeaders/include/src/" -I"/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/StanHeaders/include/" -I"/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/RcppParallel/include/" -I"/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/rstan/include" -DEIGEN_NO_DEBUG -DBOOST_DISABLE_ASSERTS -DBOOST_PENDING_INTEGER_LOG2_HPP -DSTAN_THREADS -DUSE_STANC3 -DSTRICT_R_HEADERS -DBOOST_PHOENIX_NO_VARIADIC_EXPRESSION -D_HAS_AUTO_PTR_ETC=0 -include '/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/StanHeaders/include/stan/math/prim/fun/Eigen.hpp' -D_REENTRANT -DRCPP_PARALLEL_USE_TBB=1 -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c foo.c -o foo.o
In file included from <built-in>:1:
In file included from /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/StanHeaders/include/stan/math/prim/fun/Eigen.hpp:22:
In file included from /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/RcppEigen/include/Eigen/Dense:1:
In file included from /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/RcppEigen/include/Eigen/Core:19:
/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/RcppEigen/include/Eigen/src/Core/util/Macros.h:679:10: fatal error: 'cmath' file not found
679 | #include <cmath>
| ^~~~~~~
1 error generated.
make: *** [foo.o] Error 1
Running /Library/Frameworks/R.framework/Resources/bin/R CMD SHLIB foo.c
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I"/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/Rcpp/include/" -I"/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/RcppEigen/include/" -I"/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/RcppEigen/include/unsupported" -I"/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/BH/include" -I"/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/StanHeaders/include/src/" -I"/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/StanHeaders/include/" -I"/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/RcppParallel/include/" -I"/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/rstan/include" -DEIGEN_NO_DEBUG -DBOOST_DISABLE_ASSERTS -DBOOST_PENDING_INTEGER_LOG2_HPP -DSTAN_THREADS -DUSE_STANC3 -DSTRICT_R_HEADERS -DBOOST_PHOENIX_NO_VARIADIC_EXPRESSION -D_HAS_AUTO_PTR_ETC=0 -include '/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/StanHeaders/include/stan/math/prim/fun/Eigen.hpp' -D_REENTRANT -DRCPP_PARALLEL_USE_TBB=1 -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c foo.c -o foo.o
In file included from <built-in>:1:
In file included from /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/StanHeaders/include/stan/math/prim/fun/Eigen.hpp:22:
In file included from /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/RcppEigen/include/Eigen/Dense:1:
In file included from /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/RcppEigen/include/Eigen/Core:19:
/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/RcppEigen/include/Eigen/src/Core/util/Macros.h:679:10: fatal error: 'cmath' file not found
679 | #include <cmath>
| ^~~~~~~
1 error generated.
make: *** [foo.o] Error 1
SAMPLING FOR MODEL 'anon_model' NOW (CHAIN 1).
Chain 1:
Chain 1: Gradient evaluation took 0.000293 seconds
Chain 1: 1000 transitions using 10 leapfrog steps per transition would take 2.93 seconds.
Chain 1: Adjust your expectations accordingly!
Chain 1:
Chain 1:
Chain 1: Iteration: 1 / 4000 [ 0%] (Warmup)
Chain 1: Iteration: 400 / 4000 [ 10%] (Warmup)
Chain 1: Iteration: 800 / 4000 [ 20%] (Warmup)
Chain 1: Iteration: 1200 / 4000 [ 30%] (Warmup)
Chain 1: Iteration: 1600 / 4000 [ 40%] (Warmup)
Chain 1: Iteration: 2000 / 4000 [ 50%] (Warmup)
Chain 1: Iteration: 2001 / 4000 [ 50%] (Sampling)
Chain 1: Iteration: 2400 / 4000 [ 60%] (Sampling)
Chain 1: Iteration: 2800 / 4000 [ 70%] (Sampling)
Chain 1: Iteration: 3200 / 4000 [ 80%] (Sampling)
Chain 1: Iteration: 3600 / 4000 [ 90%] (Sampling)
Chain 1: Iteration: 4000 / 4000 [100%] (Sampling)
Chain 1:
Chain 1: Elapsed Time: 1.757 seconds (Warm-up)
Chain 1: 1.983 seconds (Sampling)
Chain 1: 3.74 seconds (Total)
Chain 1:
SAMPLING FOR MODEL 'anon_model' NOW (CHAIN 2).
Chain 2:
Chain 2: Gradient evaluation took 0.000137 seconds
Chain 2: 1000 transitions using 10 leapfrog steps per transition would take 1.37 seconds.
Chain 2: Adjust your expectations accordingly!
Chain 2:
Chain 2:
Chain 2: Iteration: 1 / 4000 [ 0%] (Warmup)
Chain 2: Iteration: 400 / 4000 [ 10%] (Warmup)
Chain 2: Iteration: 800 / 4000 [ 20%] (Warmup)
Chain 2: Iteration: 1200 / 4000 [ 30%] (Warmup)
Chain 2: Iteration: 1600 / 4000 [ 40%] (Warmup)
Chain 2: Iteration: 2000 / 4000 [ 50%] (Warmup)
Chain 2: Iteration: 2001 / 4000 [ 50%] (Sampling)
Chain 2: Iteration: 2400 / 4000 [ 60%] (Sampling)
Chain 2: Iteration: 2800 / 4000 [ 70%] (Sampling)
Chain 2: Iteration: 3200 / 4000 [ 80%] (Sampling)
Chain 2: Iteration: 3600 / 4000 [ 90%] (Sampling)
Chain 2: Iteration: 4000 / 4000 [100%] (Sampling)
Chain 2:
Chain 2: Elapsed Time: 1.728 seconds (Warm-up)
Chain 2: 1.743 seconds (Sampling)
Chain 2: 3.471 seconds (Total)
Chain 2:
SAMPLING FOR MODEL 'anon_model' NOW (CHAIN 3).
Chain 3:
Chain 3: Gradient evaluation took 0.000136 seconds
Chain 3: 1000 transitions using 10 leapfrog steps per transition would take 1.36 seconds.
Chain 3: Adjust your expectations accordingly!
Chain 3:
Chain 3:
Chain 3: Iteration: 1 / 4000 [ 0%] (Warmup)
Chain 3: Iteration: 400 / 4000 [ 10%] (Warmup)
Chain 3: Iteration: 800 / 4000 [ 20%] (Warmup)
Chain 3: Iteration: 1200 / 4000 [ 30%] (Warmup)
Chain 3: Iteration: 1600 / 4000 [ 40%] (Warmup)
Chain 3: Iteration: 2000 / 4000 [ 50%] (Warmup)
Chain 3: Iteration: 2001 / 4000 [ 50%] (Sampling)
Chain 3: Iteration: 2400 / 4000 [ 60%] (Sampling)
Chain 3: Iteration: 2800 / 4000 [ 70%] (Sampling)
Chain 3: Iteration: 3200 / 4000 [ 80%] (Sampling)
Chain 3: Iteration: 3600 / 4000 [ 90%] (Sampling)
Chain 3: Iteration: 4000 / 4000 [100%] (Sampling)
Chain 3:
Chain 3: Elapsed Time: 1.738 seconds (Warm-up)
Chain 3: 1.883 seconds (Sampling)
Chain 3: 3.621 seconds (Total)
Chain 3:
SAMPLING FOR MODEL 'anon_model' NOW (CHAIN 4).
Chain 4:
Chain 4: Gradient evaluation took 0.000136 seconds
Chain 4: 1000 transitions using 10 leapfrog steps per transition would take 1.36 seconds.
Chain 4: Adjust your expectations accordingly!
Chain 4:
Chain 4:
Chain 4: Iteration: 1 / 4000 [ 0%] (Warmup)
Chain 4: Iteration: 400 / 4000 [ 10%] (Warmup)
Chain 4: Iteration: 800 / 4000 [ 20%] (Warmup)
Chain 4: Iteration: 1200 / 4000 [ 30%] (Warmup)
Chain 4: Iteration: 1600 / 4000 [ 40%] (Warmup)
Chain 4: Iteration: 2000 / 4000 [ 50%] (Warmup)
Chain 4: Iteration: 2001 / 4000 [ 50%] (Sampling)
Chain 4: Iteration: 2400 / 4000 [ 60%] (Sampling)
Chain 4: Iteration: 2800 / 4000 [ 70%] (Sampling)
Chain 4: Iteration: 3200 / 4000 [ 80%] (Sampling)
Chain 4: Iteration: 3600 / 4000 [ 90%] (Sampling)
Chain 4: Iteration: 4000 / 4000 [100%] (Sampling)
Chain 4:
Chain 4: Elapsed Time: 1.715 seconds (Warm-up)
Chain 4: 1.998 seconds (Sampling)
Chain 4: 3.713 seconds (Total)
Chain 4:
Running /Library/Frameworks/R.framework/Resources/bin/R CMD SHLIB foo.c
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I"/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/Rcpp/include/" -I"/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/RcppEigen/include/" -I"/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/RcppEigen/include/unsupported" -I"/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/BH/include" -I"/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/StanHeaders/include/src/" -I"/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/StanHeaders/include/" -I"/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/RcppParallel/include/" -I"/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/rstan/include" -DEIGEN_NO_DEBUG -DBOOST_DISABLE_ASSERTS -DBOOST_PENDING_INTEGER_LOG2_HPP -DSTAN_THREADS -DUSE_STANC3 -DSTRICT_R_HEADERS -DBOOST_PHOENIX_NO_VARIADIC_EXPRESSION -D_HAS_AUTO_PTR_ETC=0 -include '/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/StanHeaders/include/stan/math/prim/fun/Eigen.hpp' -D_REENTRANT -DRCPP_PARALLEL_USE_TBB=1 -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c foo.c -o foo.o
In file included from <built-in>:1:
In file included from /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/StanHeaders/include/stan/math/prim/fun/Eigen.hpp:22:
In file included from /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/RcppEigen/include/Eigen/Dense:1:
In file included from /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/RcppEigen/include/Eigen/Core:19:
/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/RcppEigen/include/Eigen/src/Core/util/Macros.h:679:10: fatal error: 'cmath' file not found
679 | #include <cmath>
| ^~~~~~~
1 error generated.
make: *** [foo.o] Error 1
SAMPLING FOR MODEL 'anon_model' NOW (CHAIN 1).
Chain 1:
Chain 1: Gradient evaluation took 0.00026 seconds
Chain 1: 1000 transitions using 10 leapfrog steps per transition would take 2.6 seconds.
Chain 1: Adjust your expectations accordingly!
Chain 1:
Chain 1:
Chain 1: Iteration: 1 / 4000 [ 0%] (Warmup)
Chain 1: Iteration: 400 / 4000 [ 10%] (Warmup)
Chain 1: Iteration: 800 / 4000 [ 20%] (Warmup)
Chain 1: Iteration: 1200 / 4000 [ 30%] (Warmup)
Chain 1: Iteration: 1600 / 4000 [ 40%] (Warmup)
Chain 1: Iteration: 2000 / 4000 [ 50%] (Warmup)
Chain 1: Iteration: 2001 / 4000 [ 50%] (Sampling)
Chain 1: Iteration: 2400 / 4000 [ 60%] (Sampling)
Chain 1: Iteration: 2800 / 4000 [ 70%] (Sampling)
Chain 1: Iteration: 3200 / 4000 [ 80%] (Sampling)
Chain 1: Iteration: 3600 / 4000 [ 90%] (Sampling)
Chain 1: Iteration: 4000 / 4000 [100%] (Sampling)
Chain 1:
Chain 1: Elapsed Time: 3.142 seconds (Warm-up)
Chain 1: 2.907 seconds (Sampling)
Chain 1: 6.049 seconds (Total)
Chain 1:
SAMPLING FOR MODEL 'anon_model' NOW (CHAIN 2).
Chain 2:
Chain 2: Gradient evaluation took 0.000187 seconds
Chain 2: 1000 transitions using 10 leapfrog steps per transition would take 1.87 seconds.
Chain 2: Adjust your expectations accordingly!
Chain 2:
Chain 2:
Chain 2: Iteration: 1 / 4000 [ 0%] (Warmup)
Chain 2: Iteration: 400 / 4000 [ 10%] (Warmup)
Chain 2: Iteration: 800 / 4000 [ 20%] (Warmup)
Chain 2: Iteration: 1200 / 4000 [ 30%] (Warmup)
Chain 2: Iteration: 1600 / 4000 [ 40%] (Warmup)
Chain 2: Iteration: 2000 / 4000 [ 50%] (Warmup)
Chain 2: Iteration: 2001 / 4000 [ 50%] (Sampling)
Chain 2: Iteration: 2400 / 4000 [ 60%] (Sampling)
Chain 2: Iteration: 2800 / 4000 [ 70%] (Sampling)
Chain 2: Iteration: 3200 / 4000 [ 80%] (Sampling)
Chain 2: Iteration: 3600 / 4000 [ 90%] (Sampling)
Chain 2: Iteration: 4000 / 4000 [100%] (Sampling)
Chain 2:
Chain 2: Elapsed Time: 3.143 seconds (Warm-up)
Chain 2: 2.999 seconds (Sampling)
Chain 2: 6.142 seconds (Total)
Chain 2:
SAMPLING FOR MODEL 'anon_model' NOW (CHAIN 3).
Chain 3:
Chain 3: Gradient evaluation took 0.000192 seconds
Chain 3: 1000 transitions using 10 leapfrog steps per transition would take 1.92 seconds.
Chain 3: Adjust your expectations accordingly!
Chain 3:
Chain 3:
Chain 3: Iteration: 1 / 4000 [ 0%] (Warmup)
Chain 3: Iteration: 400 / 4000 [ 10%] (Warmup)
Chain 3: Iteration: 800 / 4000 [ 20%] (Warmup)
Chain 3: Iteration: 1200 / 4000 [ 30%] (Warmup)
Chain 3: Iteration: 1600 / 4000 [ 40%] (Warmup)
Chain 3: Iteration: 2000 / 4000 [ 50%] (Warmup)
Chain 3: Iteration: 2001 / 4000 [ 50%] (Sampling)
Chain 3: Iteration: 2400 / 4000 [ 60%] (Sampling)
Chain 3: Iteration: 2800 / 4000 [ 70%] (Sampling)
Chain 3: Iteration: 3200 / 4000 [ 80%] (Sampling)
Chain 3: Iteration: 3600 / 4000 [ 90%] (Sampling)
Chain 3: Iteration: 4000 / 4000 [100%] (Sampling)
Chain 3:
Chain 3: Elapsed Time: 3.128 seconds (Warm-up)
Chain 3: 2.951 seconds (Sampling)
Chain 3: 6.079 seconds (Total)
Chain 3:
SAMPLING FOR MODEL 'anon_model' NOW (CHAIN 4).
Chain 4:
Chain 4: Gradient evaluation took 0.000198 seconds
Chain 4: 1000 transitions using 10 leapfrog steps per transition would take 1.98 seconds.
Chain 4: Adjust your expectations accordingly!
Chain 4:
Chain 4:
Chain 4: Iteration: 1 / 4000 [ 0%] (Warmup)
Chain 4: Iteration: 400 / 4000 [ 10%] (Warmup)
Chain 4: Iteration: 800 / 4000 [ 20%] (Warmup)
Chain 4: Iteration: 1200 / 4000 [ 30%] (Warmup)
Chain 4: Iteration: 1600 / 4000 [ 40%] (Warmup)
Chain 4: Iteration: 2000 / 4000 [ 50%] (Warmup)
Chain 4: Iteration: 2001 / 4000 [ 50%] (Sampling)
Chain 4: Iteration: 2400 / 4000 [ 60%] (Sampling)
Chain 4: Iteration: 2800 / 4000 [ 70%] (Sampling)
Chain 4: Iteration: 3200 / 4000 [ 80%] (Sampling)
Chain 4: Iteration: 3600 / 4000 [ 90%] (Sampling)
Chain 4: Iteration: 4000 / 4000 [100%] (Sampling)
Chain 4:
Chain 4: Elapsed Time: 3.233 seconds (Warm-up)
Chain 4: 3.772 seconds (Sampling)
Chain 4: 7.005 seconds (Total)
Chain 4:
Abstract
Background: The optimal transfer team setup and transportation modality in long distance transfers of neuro ICU patients is unknown. Rigorous causal inference in observational intensive care research requires well thought through approaches to address selection bias. The purpose of this study was to estimate the effect of helicopter emergency medical services (HEMS) on 30-day mortality in neuro ICU patients transferred to tertiary centers for definitive care.
Methods: We performed a retrospective cohort study using Swedish healthcare registries and flight movement data. Patients transferred by HEMS were compared to those transferred by other modalities. Weather conditions affecting flight feasibility were used as a natural randomization mechanism in an instrumental variable analysis.
Results: A total of 1812 patients were transferred from 46 Swedish ICUs. There were 431 HEMS transfers (23.8%). The core assumptions for instrumental variable analysis using weather observations were met. The local average treatment effect of HEMS versus non-HEMS transfer on 30-day mortality was estimated at -8.2% (95% CI: -25.9% to 9%). The posterior probability that HEMS increases 30-day mortality in the complier group is 17.7%. In a risk-adjusted logistic model, the estimated marginal risk difference in 30-day mortality associated with HEMS was -2.5% (95% CI: -6.1% to 0.011%), but including receiving center in the model removed all association.
Conclusion: Findings are weakly suggestive of a potential mortality benefit associated with HEMS transfers in the complier subgroup. The estimates are limited by statistical uncertainty. Weather-based instrumental variables could provide a transferable framework for causal inference in transport research.
Keywords
“Neurocritical care”, “Neurointensive care”, “Intensive care”, “Interfacility transfer”, “Causal inference”, “Instrumental variable analysis”, “Helicopter emergency medical services”, “HEMS”, “Patient transfer”
Introduction
Interfacility transfer is often necessary for critically ill patients with neurological emergencies admitted to community or regional ICUs. In Sweden, as in many other countries, neurosurgical and neurocritical care expertise is centralized to tertiary centers, requiring patients to be transferred for definitive care.
Transporting a critically ill patient between hospitals is challenging. These patients require ongoing treatment and monitoring during transit — ideally at a level at least equivalent to the referring ICU. Environmental factors such as changes in barometric pressure, temperature, and acceleration can exert physiological stress. Operational challenges — limited access to the patient, low lighting, noise, and confined workspace — further complicate care. The transport team must also, concurrent with patient management, solve several non-clinical tasks such as planning the logistics with dispatch centers and communicating with ambulance personnel, receiving providers, and flight crews.
Such challenges may explain the high complication rates observed during interhospital transfers, reported in some studies to affect up to 25% of patients (1–9). Actual rates may be higher due to reliance on self-reporting (8, 10). Longer transport times are consistently linked to increased complication risk (1, 4, 6).
Some studies suggest that interhospital transfers conducted by specialized retrieval teams may be associated with better care and reduced mortality in adult populations (2, 7, 11, 12). Similar findings have been reported in pediatric cohorts (13–16). Only one single-center randomized controlled trial has been conducted to assess the impact of specialized transport teams on patient outcome, which could not establish non-inferiority of nurse led transports (2). Despite the limited evidence base, several expert groups and professional societies recommend that interfacility transfers of critically ill patients be conducted by specialized teams (17–20).
However, few studies have specifically examined interhospital transfers of neurocritical care patients (21, 22), and only one has evaluated the impact of transport modality on outcomes in this population, finding no difference between air and ground transfers (23).
In Sweden, two similar patients may be transferred by different means, and under markedly different standards of care. Broadly, there are two provider configurations for interhospital transfers. Specialized retrieval teams — typically composed of an anesthesiologist-intensivist and a nurse trained in anesthesia and/or intensive care — operate at a regional level and have access to both air and ground transport. In contrast, local solutions are based at the referring hospital. These may consist of a single provider, typically a nurse with anesthetic training or a physician in training. Local providers or teams rely solely on ground ambulances. All patients transferred between hospitals via HEMS in Sweden are managed by specialized retrieval teams.
The factors influencing the choice of transport modality in interhospital ICU transfers have not been described. It is possible that estimated transport time, clinical urgency, weather, patient characteristics and local practice patterns play a role in the decision-making process. Some of these factors might be confounding variables. Establishing causal relationships from observational transport data is challenging, as most previous studies may be limited by residual confounding from unmeasured factors that influence both transport decisions and patient outcomes.
In this study, we describe a national cohort of neurocritically ill patients transferred to tertiary centers. We examine predictors of HEMS use and assess whether HEMS — serving in part as a proxy for specialized teams — is associated with 30-day mortality. To strengthen causal inference and address potential residual confounding, we use weather data as an instrumental variable to estimate the effect of transport modality in the presence of potentially uncontrolled confounders, following systematic validation of its validity as an instrumental variable.
Methods
Ethics Approval
Ethical approval was granted by the Swedish Ethical Review Authority (Dnr 2022-03054-01, Dnr 2024-00776-02). The manuscript follows the STROBE reporting guidelines for observational studies (24).
Data Sources
Clinical data were obtained from the Swedish Intensive Care Registry (SIR), a national quality registry covering over 80 ICUs, representing most community and regional hospitals in Sweden. SIR includes detailed information on ICU admissions, discharge times, diagnostic categories, interventions, and physiological scores such as SAPS 3 and SOFA.
These data were linked to the National Patient Register (NPR), which contains administrative records, procedure codes, and ICD-coded discharge diagnoses. The NPR has near-complete national coverage and fair diagnostic validity for several acute neurological conditions (25).
Mortality data was retrieved from the National Cause of Death Register (CDR), which includes the date and, when available, the cause of death, with near-complete national coverage.
Additional non-clinical data sources were integrated. Flight movement data were provided by FlightRadar24 AB, Stockholm. Historical weather data were sourced from the Swedish Civil Aviation Administration via Ogimet (www.ogimet.com). Geographic coordinates for hospitals, helipads, and airports — as well as road distances between facilities — were obtained using the openrouteservice.org API (HeiGIT), based on OpenStreetMap data.
Data preprocessing and analyses were performed using SQLite version 3.49.1, R version 4.2.1 (2022-06-23), Python version 3.11, and a set of open source software packages (26–31).
Patients and Clinical Data
ICU admissions were eligible if they met the following criteria: (1) admission to a non-tertiary ICU between October 1, 2019, and May 15, 2024; (2) patient age ≥18 years; (3) admission belonging to a patient who had at least one ICU admission during the study period with a diagnosis relevant to neurointensive care; and (4) a primary ICU stay shorter than 12 hours; (5) a transfer to a tertiary center ≥ 45 km away from the primary ICU; (6) a diagnosis of aneurysmal subarachnoid hemorrhage (ASAH), acute ischemic stroke (AIS), intracerebral hemorrhage (ICH), or traumatic brain injury (TBI)—the most common indications for neurocritical care. Finally, only the first such ICU admission per patient was included in the final cohort.
Because not all tertiary ICUs report to the Swedish Intensive Care Registry (SIR), interhospital transfers were identified via the National Patient Register (NPR). The start date corresponds to the introduction of a new helicopter at a major transport organization, improving flight tracking accuracy. Follow-up on mortality and hospital stays was available through December 31, 2024.
Transfers were defined as admissions to a tertiary center on the same calendar day as discharge from the initial ICU. To account for late-day transitions, we also included tertiary admissions on the day before or after ICU discharge if consistent with a continuous care episode. Long-distance transfers were defined as those exceeding 45 km. Based on an estimated road ambulance speed of 90 km/h and 15 minutes for embarking and disembarking, this threshold implies at least one hour spent outside the safety of an ICU during road transport.
Diagnostic data were sourced from the NPR based on ICD-10 and procedural codes (detailed in the code supplement).
Physiological data and pre-transfer interventions were retrieved from the SIR record for the initial ICU stay. Glasgow Coma Scale (GCS) scores reflected pre-sedation consciousness and were taken from SAPS assessments. To avoid strong collinearity in regression models, we also calculated a modified SAPS excluding the age and GCS components.
Do-not-resuscitate (DNR) status was based on SIR records from the initial ICU admission. SIR timestamps were used to classify admissions as occurring outside office-hours (office-hours being defined as Monday to Friday, 08:00–17:00) or during nighttime (22:00–07:00).
Exposure
Helicopter flight movements were parsed from Automatic Dependent Surveillance–Broadcast (ADS-B) data. Details on the flight-matching algorithm and processing steps are provided in Supplement A.
Transfers were classified as carried out by HEMS if a matching flight was identified along the same hospital-to-hospital route, with a departure time within ±120 minutes of the ICU discharge. This window accounts for potential clerical discrepancies in discharge times. See the supplementary material for details.
Instrumental Variable
Automated weather reports (METeorological Aerodrome Reports, METARs) were used to assess whether meteorological conditions met the minimum requirements for HEMS operations, assuming two-pilot crews operating under performance class 1 or 2, in accordance with European Union Aviation Safety Agency (EASA) regulations (32). Details on weather data parsing and classification criteria are provided in the Supplement A.
Each hospital was matched to the nearest consistently METAR-reporting airport. Weather conditions were evaluated at both sending and receiving sites at the time of ICU discharge. HEMS was considered technically feasible only if EASA weather minima were met at both locations.
Outcomes
The primary outcome was 30-day mortality following initial ICU admission. The secondary outcome was days alive and out of hospital (DAOH) within 90 days. Mortality data were obtained from the National Cause of Death Register, and hospitalization data from the National Patient Register. For patients who died within each time window, DAOH was set to zero.
Statistical Methods
In the descriptive part of the study, continuous variables were presented as medians with interquartile ranges (IQRs). No univariate hypothesis testing was performed between HEMS and non-HEMS groups to avoid overinterpreting descriptive differences as causal. Transfer routes were visualized using a adapted code from J. Sadler (33).
All analyses used Bayesian modeling with non-informative priors, given the limited evidence base for intensive care transfers in Sweden. Model estimates were reported as odds ratios or marginal effects with 95% credible intervals (CI).
Predictors of transport modality were assessed using a Bayesian generalized linear model with Bernoulli likelihood, group-level (“random intercept”) effects for sending ICU and a logit link function, implemented in brms
. We examined the relationship between transport modality and patient outcomes using three complementary approaches. First, to describe outcome differences while adjusting for measured confounders, we fit Bayesian generalized linear models with Bernoulli likelihood for 30-day mortality and zero-inflated beta likelihood for days alive and out of hospital at 90 days (DAOH-90). The models used a a logit link function. One of the models (model II) employed partial pooling across sending ICUs, allowing each ICU to have its own intercept and HEMS effect parameter drawn from common priors in order to regularize esimated coefficients for the >40 centers. Clinical and demographic covariates were selected based on clinical expertise.
Second, the local average treatment effect (LATE) was estimated using an instrumental variable (IV) approach, leveraging weather-based HEMS operating minima as a pseudo-randomization mechanism (34, 35). IV analysis allows for causal inference estimation in the presence of unmeasured confounders. LATE describes the effect of treatment in the “complier” subset of patients—those whose treatment status is influenced by the instrumental variable (35). LATE was estimated using a model implemented in rstan
with non-informative Jeffreys priors. Details of the estimand and estimator are provided in the methodological supplement, with code available online.
Third, nonparametric Balke-Pearl bounds for the average treatment effect (ATE) were estimated under minimal assumptions using the ivtools
package (31, 36).
Instrumental Variable Model Assumptions
Identification of LATE requires several assumptions: (1) instrumental variable relevance, (2) exclusion restriction, (3) exchangeability, and (4) monotonicity (34–39).
Instrumental variable relevance (assumption 1) was assessed by fitting a generalized linear model with HEMS minima as the sole predictor of transport modality. The estimated odds ratio (OR) was 16 (95% CI: 8.7 to 31.4).
While untestable, the exclusion restriction (assumption 2) is plausible given that weather at ICU discharge is unlikely to affect mortality directly. Further, the assumption can be challenged by instrumental inequalities or by detecting an association between the instrumental variable and outcome in subgroups where the instrumental variable cannot influence exposure (36, 38). In our analysis, the instrumental inequality was not violated. Additionally, in a subgroup of patients from ICUs with low HEMS utilization (10%), the instrumental variable showed no clear association with outcome: the univariate GLM yielded an odds ratio of 0.8 (95% CI: 0.5 to 1.4).
Characteristic | Weather minima met, N = 1,4461 | Weather minima not met, N = 3621 |
---|---|---|
Age, years | 63 (51, 73) | 64 (53, 74) |
Female | 600 (41%) | 151 (42%) |
Inferred diagnosis | ||
AIS | 211 (15%) | 44 (12%) |
ASAH | 391 (27%) | 102 (28%) |
ICH | 289 (20%) | 65 (18%) |
TBI | 555 (38%) | 151 (42%) |
SAPS GCS <15 | 1,059 (74%) | 271 (75%) |
Missing | 19 | 3 |
Pre-transfer Mechanical Ventilation | 816 (56%) | 218 (60%) |
SAPS Score | 53 (45, 62) | 56 (45, 64) |
Missing | 1 | 0 |
SAPS Score excl. age and GCS components | 41 (36, 48) | 43 (36, 49) |
Missing | 19 | 3 |
Primary ICU admission between 22:00 - 07:00 | 359 (25%) | 127 (35%) |
30-day mortality | 242 (17%) | 68 (19%) |
90-day mortality | 281 (19%) | 81 (22%) |
Days alive and out of hospital 90 | 44 (0, 72) | 40 (0, 72) |
1 Median (IQR); n (%) |
The exchangeability assumption (assumption 3), also known as the no unmeasured confounders condition, cannot be formally tested. One proposed falsification strategy is to assess covariate balance across levels of the instrumental variable (38). As shown in Table 1, selected covariates appear balanced, with no strong evidence of systematic differences. Covariance of weather and patient outcomes across regions could introduce confounding. As shown in Supplementary Figure 1, regional variability in weather is modest, with departures from the national mean observed at only a few sites and confined to brief periods of the year, suggesting limited potential for substantial confounding.
Since weather varies not only randomly, but also diurnally and seasonally, the timing of ICU discharge may influence instrumental variable status. Diurnal variation in ICU strain, staffing, or case mix could affect outcomes through site-specific mechanisms, potentially confounding results. In our cohort, nighttime admission (22:00–07:00) was associated with lower rates of 30-day mortality: OR 0.7 (95% CI: 0.5 to 0.9). Therefore, in sensitivity analyses, we included nighttime admission as a covariate in the regression model and used weather as an instrumental variable conditional on admission time.
The monotonicity assumption (assumption 4) requires that the instrumental variable influences exposure in only one direction (38). In this context, poor weather cannot increase HEMS transfer likelihood given regulatory and operational constraints, and we consider this assumption satisfied. Thus, the four core assumptions for identifying the local average treatment effect (LATE) appear to be met.
Missing data
Patients with missing relevant variables were excluded prior to statistical modelling. The rate of missingness was low. For the linear models up to 1.4% of patients were excluded due to a missing variable. For the LATE estimation, only 4 of 1812 patients (0.2% ) missing weather data, were excluded.
Utilization of Large Language Models (AI)
Language editing, proofreading, code review, and code documentation were assisted by Claude Sonnet 4 (Anthropic, 2025) and GPT-4o (OpenAI, 2024). No AI assistance was used in study planning, conceptualization, data analysis, interpretation, or conclusions.
Code and Data Availability
All code used for data preprocessing and analysis is publicly available (mycode?). A fully anonymized, abbreviated dataset used for the instrumental variable analysis is also archived and accessible at reasonable request. (Use Zenodo to create doi when repo is finalized.)
Results
Patient Selection
Patient selection is described in Figure 1. A total of 1812 patients were included in the cohort.
Travel Routes
The paths traveled by patients in the cohort are plotted in Figure 2. The distribution of transport distances and transport modality distribution per distance bin are shown in Figure 3. We note that the proportion of HEMS transfers increase with longer transfer distances, however it is likely that some long distance transfers (>300 km) are carried out by fixed-wing.
Description of the Cohort
Characteristic | HEMS transfer, N = 4311 | Non-HEMS transfer, N = 1,3811 |
---|---|---|
Age (years) | 61 (48, 72) | 64 (52, 73) |
Female | 185 (43%) | 568 (41%) |
Inferred diagnosis | ||
AIS | 70 (16%) | 185 (13%) |
ASAH | 111 (26%) | 382 (28%) |
ICH | 87 (20%) | 268 (19%) |
TBI | 163 (38%) | 546 (40%) |
DNR order | 2 (0.5%) | 30 (2.2%) |
SAPS consciousness level | ||
I (GCS ≥13) | 205 (48%) | 636 (47%) |
II (GCS 7-12) | 125 (29%) | 385 (28%) |
III (GCS 6) | 27 (6.3%) | 100 (7.3%) |
IV (GCS 5) | 23 (5.4%) | 67 (4.9%) |
V (GCS ≤4) | 48 (11%) | 174 (13%) |
Missing | 3 | 19 |
SAPS GCS <15 | 304 (71%) | 1,030 (76%) |
Missing | 3 | 19 |
Pre-transfer Mechanical Ventilation | 237 (55%) | 801 (58%) |
SAPS Score | 54 (46, 60) | 54 (45, 63) |
Missing | 1 | 0 |
SAPS Score excl. age and GCS components | 41 (37, 46) | 42 (36, 48) |
Missing | 3 | 19 |
Primary ICU admission outside of office hours | 304 (71%) | 975 (71%) |
Primary ICU admission between 22:00 - 07:00 | 113 (26%) | 375 (27%) |
Time in primary ICU (minutes) | 129 (85, 195) | 146 (80, 261) |
Road distance (km) | 212 (162, 287) | 162 (111, 250) |
Inferred flight time for HEMS transfers (minutes) | 41 | NA |
HEMS weather minima met at discharge | 419 (97%) | 1,027 (75%) |
Missing | 1 | 3 |
Daylight or civil twillight at sending hospital | 278 (65%) | 746 (54%) |
Cloud base (ft) at sending hospital | 9,999 (3,850, 9,999) | 3,600 (1,000, 9,999) |
Horizontal visibility (m) at sending hospital | 10,000 (10,000, 10,000) | 10,000 (9,999, 10,000) |
30-day mortality | 61 (14%) | 249 (18%) |
90-day mortality | 73 (17%) | 290 (21%) |
Days alive and out of hospital 90 | 41 (0, 71) | 44 (0, 72) |
1 Median (IQR); n (%); Mean |
Minor differences between the HEMS and non-HEMS groups were observed: the HEMS group has a slightly lower median age, fewer DNR orders, and longer transport distances. Overall, the groups appear similar across median and mean values of the presented covariates.
Factors Associated With HEMS Transfer
Predictor | aOR | 95% CI1 |
---|---|---|
Inferred diagnosis | ||
AIS | — | — |
ASAH | 1.06 | 0.66, 1.70 |
ICH | 1.26 | 0.77, 2.08 |
TBI | 1.26 | 0.80, 1.98 |
Age, std | 0.85 | 0.74, 0.99 |
SAPS GCS <15 | 1.18 | 0.84, 1.67 |
SAPS score (excl. age/GCS components), std | 1.24 | 1.06, 1.45 |
Primary ICU admission between 22:00 - 07:00 | 1.09 | 0.79, 1.51 |
HEMS weather minima met at discharge | 21.6 | 11.6, 44.3 |
DNR order | 0.11 | 0.01, 0.52 |
1 CI = Credible Interval |
In the multivariate predictive model of transfer modality, mainly HEMS minima being met clearly predicted the choice of HEMS (aOR 21.6, 95% CI 11.6 to 44.3), see Table 3. Also, having a DNR order was negatively associated with HEMS transfers.
Risk Adjusted Models of HEMS Transfer vs. 30-day Mortality and DAOH-90
Predictor | Model I | Model II | Model III | |||
---|---|---|---|---|---|---|
aOR | 95% CI1 | aOR | 95% CI1 | aOR | 95% CI1 | |
HEMS transfer | 0.79 | (0.56, 1.10) | 0.78 | (0.50, 1.18) | 0.99 | (0.68, 1.43) |
Inferred diagnosis | ||||||
AIS | — | — | — | — | — | — |
ASAH | 0.40 | (0.26, 0.62) | 0.39 | (0.26, 0.62) | 0.41 | (0.26, 0.64) |
ICH | 0.36 | (0.23, 0.58) | 0.35 | (0.22, 0.56) | 0.35 | (0.22, 0.56) |
TBI | 0.35 | (0.23, 0.52) | 0.34 | (0.22, 0.51) | 0.34 | (0.22, 0.51) |
Age, std | 1.84 | (1.55, 2.20) | 1.86 | (1.56, 2.23) | 1.83 | (1.53, 2.20) |
GCS | ||||||
I (GCS ≥13) | — | — | — | — | — | — |
II (GCS 7–12) | 3.15 | (2.15, 4.67) | 3.08 | (2.08, 4.56) | 3.00 | (2.05, 4.48) |
III (GCS 6) | 4.84 | (2.82, 8.12) | 4.81 | (2.82, 8.20) | 4.73 | (2.79, 8.15) |
IV (GCS 5) | 5.57 | (3.06, 9.82) | 5.36 | (2.93, 9.71) | 5.33 | (2.94, 9.75) |
V (GCS ≤4) | 12.3 | (7.84, 19.3) | 12.2 | (7.84, 19.3) | 11.8 | (7.47, 18.7) |
DNR order | 2.53 | (1.08, 5.82) | 2.52 | (1.09, 5.81) | 2.60 | (1.10, 6.13) |
SAPS score (excl. age/GCS components), std | 1.35 | (1.16, 1.58) | 1.36 | (1.16, 1.59) | 1.32 | (1.13, 1.55) |
1 CI = Credible Interval |
Table Table 4 presents the adjusted odds ratios (aORs) from a set of regression models. Models I–III estimate 30-day mortality using a Bernoulli likelihood with a logit link (i.e. logistic regression). In addition to the base predictors of Model I, Model II adds sending center as a variable with partial pooling of center level intercepts and HEMS effect parameters. Model III instead adds receving center as a variable in the regression. Coefficients for individual centers are omitted in the table for brevity.
The fitted models I-III were used to estimate the effect of HEMS transfer on 30-day mortality, while conditioning on the observed distribution of covariates (\(C\)). The estimated mean risk difference, \(\mathbb{E}[Y^{H=1, C}] - \mathbb{E}[Y^{H=0,C}]\), for model I was -2.5% (95% CI: -6.1% to 1.1%). The posterior probability that HEMS transfer increases 30-day mortality was 8.2 %.
Adding sending center as a variable in model II changed estimates slightly, here the estimated mean risk difference was -2.2% (95% CI: -6% to 1.9%). The probability of HEMS transfer increasing 30-day mortality was 12.8%. However, having receiving center as a variable removed the positive effect of HEMS transfers with an estimated mean risk difference of -0.1% (95% CI: -3.9% to 3.8%). The probability of HEMS transfer increasing 30-day mortality was 48.8%.
In a sensitivity analysis including ICU nighttime admission as an additional covariate to model I, the estimated mean risk difference was -2.2% (95% CI: -5.9% to 1.7%), i.e. yielding results that were essentially unchanged. Finally a model using a zero-inflated beta likelihood with a logit link function was fitted. Here, the odds ratios from the count part of the model represent the multiplicative change in the expected number of days alive and out of hospital (DAOH-90) associated with a one-unit increase in the predictor, holding other variables constant. HEMS transfer was not associated with DAOH-90 (aOR 1, 95% CI 0.8 to 1.1).
Instrumental Variable Analysis
Estimation of the Local Average Treatment Effect (LATE)
The local average treatment effect (LATE) of being transferred by HEMS versus non-HEMS on 30-day mortality was estimated at -8.2% (95% CI: -25.9% to 9%).
Estimates of the LATE using weather minima as a conditional instrumental variable (given nighttime ICU admission) did not differ meaningfully: -10.2% (95% CI: -30.1% to 6.1%).
Given the data, model, and assumptions, the posterior probability that HEMS reduces 30-day mortality by at least 2.5 percentage points in the complier group (patients whose transport modality was influenced by weather conditions) is 73.6%. We propose this threshold as a rough benchmark for a clinically and economically meaningful benefit in typical neuro ICU patients, given the high cost and limited availability of helicopter transfers. The posterior probability that HEMS increases 30-day mortality in the complier group is 17.7%.
Estimation of Bounds on the Average Treatment Effect (ATE)
Balke-Pearl bounds for the risk difference between HEMS and non-HEMS transfers were calculated. The lower bound was -17% and the upper bound was 57%
Discussion
Key findings
In this study aimed to evaluate outcome effects of HEMS transports in a Swedish cohort of neuro ICU patients requiring urgent transfer to a higher level of care, weather minima emerged as the strongest predictor of whether HEMS was utilized. Given the random nature of weather this was recognized as a possibly ideal candidate for IV analysis and thus a means to more closely research causal effects. Younger age and higher SAPS scores were also associated with an increased likelihood of HEMS use, whereas having a DNR order decreased the likelihood of HEMS transfer.
Both mixed model generalized linear models (GLMs), assessing the adjusted association between HEMS transfers and 30-day mortality, and IV analyses estimating the local average treatment effect (LATE), suggested a possible reduction in 30-day mortality associated with HEMS transfers. Adding receiving center as a covariate in a GLM attenuated the weak association between HEMS transfer and mortality. However, wide uncertainty intervals warrant cautious interpretation.
Findings in Relation to Previous Research
Previous studies examining the association between HEMS interfacility transfers and outcomes have reported mixed findings, with some suggesting benefits and others showing no clear effect (2, 7, 11, 12). Our estimates, though imprecise, are consistent with a potential mortality benefit.
Our secondary finding of an unadjusted association between nighttime ICU admission and lower 30-day mortality, sits within a body of conflicting evidence. A 2018 meta-analysis found no association between nighttime ICU admissions and mortality (40). A more recent study reported a lower mortality risk for out-of-hours ICU admissions (41).
While previous studies provide valuable evidence, most face methodological challenges in establishing causal relationships. Several rely on unadjusted comparisons (12, 15) or use statistical significance to guide variable selection (11, 14), which may not adequately control for confounding. Other studies do not specify the selection process for covariates in multivariable regression (13, 23) or propensity score methods (16), which decreases transparency and may limit inferences due to lingering unmeasured confounders.
Adjusting for receiving center in a GLM removed the apparent effect of HEMS on mortality. Three of seven centers rarely (<1%) or never received HEMS patients, and these centers also had higher unadjusted mortality. This pattern could explain why adjustment eliminated the observed effect. These differences, potentially reflecting unmeasured variations in case-mix or quality of care, are themselves an interesting finding.
However, this explanation assumes that receiving center is a confounder rather than an instrumental variable. If receiving center primarily influences mortality through its effect on HEMS transfer, including it as a covariate could bias causal estimates, particularly in the presence of unmeasured confounding (42). Prior neuro-ICU research has leveraged center-level differences as a quasi-randomization source, effectively treating center as an instrument rather than adjusting for it (43). Moreover, the sparse overlap in some centers indicates a violation of the positivity assumption, or lack of common support (35, 44), highlighting the limitations of regression for causal inference and the potential value of alternative approaches such as instrumental variable analysis.
Instrumental variable methods remain relatively uncommon in intensive care research. A few notable exceptions have applied parametric two-stage regression models to estimate treatment effects using IVs (45–47). These models rely on assumptions about the functional form of the model and the distribution of error terms, which, if violated, can compromise estimates.
The instrumental variables used in those studies include: prior regional HEMS usage (as an instrument for prehospital HEMS vs. ground EMS selection), ICU bed availability (as a proxy for ICU admission promptness), and provider preference (as an instrument for prophylactic magnesium use to prevent atrial fibrillation). All of these IVs are, in effect, variants of region-, hospital-, or provider-level preferences. However, such instruments risk violating the exchangeability assumptions, since they may influence patient outcomes through multiple pathways—not solely through the treatment of interest.
While we commend these studies for advancing causal inference in intensive care research, they also underscore the challenge of identifying valid instrumental variables. In contrast, weather conditions may provide a defensible instrumental variable for studying the effectiveness of HEMS. To our knowledge, this is the first study to use weather minima as an instrumental variable to examine the effect of HEMS interfacility transfers.
Limitations
Patients who die during transfer may be underrepresented, as such patients may not be admitted at the receiving center. Nevertheless, in-transfer deaths are rare in ICU interfacility transfers (1, 9), making substantial bias from this source unlikely.
Another limitation concerns the studied exposure. We believe that the composition and experience of the transfer team, rather than the choice of vehicle, is the key factor influencing patient outcomes. While HEMS transfers serve as a proxy for specialized team involvement, this is an imperfect surrogate. Ground-based transfers may also involve specialized teams, though more commonly they are conducted by local providers. Fixed-wing transfers are performed either by specialized teams or by a single retrieval nurse with anesthetic training. Importantly, transport modality reflects not only team composition but also unmeasured factors such as transit time. Finally, the exposure was inferred from flight records rather than systematically collected clinical data.
The primary outcome used in this study, 30-day mortality, is relatively coarse. For patients with severe brain injury, functional outcomes are more informative. As a proxy, we included Days Alive and Out of Hospital (DAOH) within 90 days as a secondary outcome. However, prior research shows mixed associations between DAOH and functional outcome (48–50). It is possible that HEMS transfers affect functional outcome more than mortality rates. Future studies should preferably include functional outcomes as an endpoint.
In the IV analysis, the estimand was the LATE—reflecting the causal effect among compliers, i.e., patients whose transport modality would vary based on weather minima. The generalizability of this estimate depends on how representative this group is of the broader population and whether effect sizes are consistent across subgroups.
The modest sample size limits precision, particularly given that even optimistic effect sizes would be small (on the order of a few percentage points). Notably, as we moved from GLMs to IV analyses to ATE bounds estimation — each requiring fewer assumptions — uncertainty intervals widened. This reflects the trade-off between statistical certainty and the strength of modeling assumptions.
Strengths
A key strength of this study is the use of a transparent and reproducible causal inference framework. By leveraging observed weather data to approximate random assignment of transport modality, we strengthen causal inference beyond what is typically achievable with conventional regression methods. Although tailored to our setting, this approach may be applicable in other countries and healthcare systems where HEMS operations are subject to well-defined weather criteria or similar external constraints. In such contexts, comparable methods could support causal inference using observational data to evaluate the effectiveness of HEMS in both interfacility and prehospital care.
Our study integrates high-quality national registry data, which strengthens external validity and supports the generalizability of findings to ICU settings across Sweden.
Implications
Our findings may modestly shift prior beliefs in future studies of interfacility ICU transfer modalities, suggesting a positive effect of HEMS on patient outcomes. As a secondary observation, we found an unadjusted association between nighttime ICU admission and lower 30-day mortality, which may warrant further investigation.
If the LATE estimates reflect a real mortality benefit, practical implications include prioritizing HEMS availability for patients most likely to benefit. This could involve ensuring adequate funding and implementing Point-in-Space (PinS) procedures to expand HEMS operational capacity in poor weather conditions.
We propose that weather minima can serve as a valid instrumental variable (IV) for causal inference regarding the effect of HEMS transfers. Where testable, the core IV assumptions appear to be met. Beyond this specific clinical context, the study illustrates how natural experiments can be leveraged to strengthen causal inference in observational healthcare research. The framework demonstrates that valid instruments can be identified even in complex clinical settings, potentially inspiring similar approaches across intensive care research.
Future steps to strengthen inferences about the choice of transfer modality in ICU patients include expanding the cohort to encompass all ICU diagnoses, which—using Swedish registries—could increase the sample to approximately 10,000 patients from 2019 to 2025. Incorporating fixed-wing transport data would help disentangle the effects of team composition from transport mode. Ideally, prospective collection of data on transfer team composition and operational metrics is needed to better characterize the ICU transfer process.
A central principle of neurocritical care is the prevention and management of “secondary insults” — physiological disturbances that exacerbate primary brain injury (51). Hypotension and hypoxia, for example, are such insults that are also commonly reported complications during interfacility transfers (3–6). Future studies should, in addition to examining transport logistics and team composition, ideally incorporate detailed records of interventions and physiological parameters during transfer. This would enable a better understanding of how care delivery during transport affects patient outcomes and help identify opportunities for improvement. Expanding the Swedish Intensive Care Registry to include data on the transfer process could be a feasible and impactful way to collect a large, generalizable dataset. Since the infrastructure for entering data into the registry is already broadly available, such data gathering could be implemented relatively quickly.
Conclusion
In this national Swedish cohort of emergency interfacility neuro ICU transfers, we demonstrate a rigorous approach to causal inference using weather-based instrumental variables. Findings weakly suggest a potential mortality benefit associated with HEMS. We establish and present a transferable methodological framework that addresses fundamental challenges in observational transport research. The systematic validation of IV assumptions and transparent analytical approach provide a foundation for future causal inference studies in the field.
List of Abbreviations
ADS-B Automatic Dependent Surveillance–Broadcast
AIS Acute Ischemic Stroke
AMV Assisted Mechanical Ventilation
ASAH Aneurysmal Subarachnoid Hemorrhage
DAOH Days Alive and Out of Hospital
EASA European Union Aviation Safety Agency
GLM Generalized Linear Model
HEMS Helicopter Emergency Medical Services
ICH Intracerebral Hemorrhage
IV Instrumental Variable
LATE Local Average Treatment Effect
METAR Meteorological Aerodrome Report
NPR National Patient Register
SIR Swedish Intensive Care Registry
TBI Traumatic Brain Injury
Funding
Cecilia Åkerlund was supported by Region Stockholm (clinical postdoctoral appointment).