Il modello presentato può essere facilmente applicato ad altri Stati e regioni. La struttura generale dello stesso permette di inserire covariate spaziali, tem- porali o di altro tipo. Inoltre, si può considerare l’introduzione nel modello
di differenti ritardi di yt e λt, sebbene la struttura presa come riferimento in
questo lavoro consenta di tenere conto sia della non stazionarietà in media e varianza che anche di componenti stagionali.
Il modello può anche essere applicato ai dati sui ricoveri in terapia inten- siva e sui nuovi decessi giornalieri. A tal proposito, Farcomeni et al. (2020) utilizzano un aproccio che combina un modello lineare generalizzato con ef-
fetti misti (GLMM) di Poisson e un modello PAR, per prevedere i posti letto
occupati da pazienti COVID-19 nelle terapie intensive delle regioni italiane. Per concludere, il modello presentato in questa tesi può anche essere uti- lizzato per misurare l’impatto del COVID-19 sull’economia e sui mercati finanziari.
CAPITOLO 4. APPLICAZIONE E RISULTATI 37
Apr Mag Giu Lug Ago
−0.5 0.5 1.5 Veneto tempo α β
Apr Mag Giu Lug Ago
−1.0 0.0 1.0 2.0 Sicilia tempo α β
Apr Mag Giu Lug Ago
−0.5 0.5 1.0 1.5 Lombardia tempo α β
Apr Mag Giu Lug Ago
−0.5 0.5 1.0 1.5 Piemonte tempo α β
Apr Mag Giu Lug Ago
−0.5 0.5 1.0 1.5 Emilia−Romagna tempo α β
Apr Mag Giu Lug Ago
−0.5 0.5 1.0 1.5 Lazio tempo α β
Mar Apr Mag Giu Lug Ago 0.5 1.0 1.5 2.0 2.5 Veneto tempo R0
Mar Apr Mag Giu Lug Ago
0.5 1.5 2.5 3.5 Sicilia tempo R0
Mar Apr Mag Giu Lug Ago
0.5 1.0 1.5 2.0 Lombardia tempo R0
Mar Apr Mag Giu Lug Ago
1 2 3 4 Piemonte tempo R0
Mar Apr Mag Giu Lug Ago
0.5 1.0 1.5 2.0 Emilia−Romagna tempo R0
Mar Apr Mag Giu Lug Ago
1 2 3 4 5 Lazio tempo R0
Figura 4.5: Dinamica temporale di R0 a livello regionale. Evoluzione delle stime (linee sottili) e medie mobili a 7 giorni (linee spesse), la linea rossa rappresenta la data dell’11 marzo
Capitolo 5
Conclusioni
In questo lavoro si è presentato un modello dinamico per i dati sui con- tagi COVID-19 in Italia, che può essere aggiornato quotidianamente, allo scopo di permettere al Governo di monitorare, in tempo reale, l’evoluzione dell’epidemia nella fase post-lockdown.
In primo luogo, si sono puntualizzati i limiti che presentano i dati ufficiali italiani. In particolare, i contagiati sono una misurazione imprecisa, poichè la rilevazione di essi non avviene tramite un disegno di campionamento specifico e i criteri di somministrazione dei tamponi non sono uniformi nello spazio e nel tempo. Ciò nonostante, il modello illustrato, attraverso la sua dinamica autoregressiva, riesce a tenere conto di parte di questi errori di misurazione, considerando eventuali cambiamenti nelle strategie di rilevazione mediante tampone. Nello specifico, si è mostrato come questo modello permetta di tenere in considerazione la dipendenza di breve e lungo termine dei casi giornalieri, in modo da riuscire a cogliere sia lo sviluppo di nuovi focolai che cambiamenti nelle politiche di contenimento.
In seguito, si è applicato il modello per ottenere una stima dinamica dei parametri e di R0. Tali stime testimoniano l’efficacia del lockdown nel ridurre il numero dei contagi. Pertanto la metodologia adottata, magari abbinata all’utilizzo di altri modelli, può fornire importanti indicazioni riguardo gli effetti delle misure restrittive introdotte. Quest’ultime, possono riguarda- re per esempio la chiusura delle discoteche oppure l’obbligo di indossare le
D’altra parte, siccome nel periodo estivo l’età media dei casi rilevati si è abbassata, i dati sui contagi possono offrire maggiori informazioni rispetto a quelli relativi a ricoveri in terapia intensiva e decessi. Pertanto, si può pensare che un’applicazione del modello a livello regionale, possa anticipa- re lo sviluppo di una seconda ondata epidemica, suggerendo eventualmente l’attuazione di politiche di contenimento specifiche per ciascuna regione.
La situazione della Florida, così come quella di altri Paesi, dimostra che il COVID-19 resta un’emergenza a livello globale e quindi occorre mantenere alta la guardia per non vanificare tutti i sacrifici economici e sociali fatti in questi mesi.
Appendice A
Codice R
l i b r a r y( a s t s a ) l i b r a r y( d p l y r ) l i b r a r y( zoo ) l i b r a r y( t s c o u n t ) l i b r a r y( x t a b l e ) # c a r i c a m e n t o dati P r o t e z i o n e C i v i l edati_ITA <- read.csv(" h t t p s :/ /raw . g i t h u b u s e r c o n t e n t . com/
pcm - dpc/COVID -19/m a s t e r/dati - a n d a m e n t o - n a z i o n a l e/dpc - covid19 - ita - a n d a m e n t o - n a z i o n a l e . csv ")
dati_r e g i o n i <- read.csv(" h t t p s :/ /raw . g i t h u b u s e r c o n t e n t . com/pcm - dpc/COVID -19/m a s t e r/dati - r e g i o n i/dpc - covid19 - ita - r e g i o n i . csv ")
# c r e a z i o n e dei data f r a m e che c o m p r e n d o n o le s e r i e s t o r i c h e d ’ i n t e r e s s e e le c o r r i s p o n d e n t i v a r i a z i o n i g i o r n a l i e r e , sia a l i v e l l o n a z i o n a l e che r e g i o n a l e
t o t a l i_ITA <- data.f r a m e(data = as. Date ( dati_ITA$ data) , casi = dati_ITA$t o t a l e_casi ,
d e c e d u t i = dati_ITA$deceduti ,
a t t u a l m e n t e_p o s i t i v i = dati_ITA$t o t a l e_positivi , t e r a p i a_i n t e n s i v a = dati_ITA$t e r a p i a_i n t e n s i v a , s o g g e t t i_t e s t a t i = dati_ITA$casi_t e s t a t i
)
v a r i a z i o n i_ITA <- data.f r a m e(
data = as. Date ( dati_ITA$ data) , casi = dati_ITA$n u o v i_positivi ,
d e c e d u t i = diff(c(0, dati_ITA$d e c e d u t i ) ) ,
d i m e s s i_g u a r i t i = diff(c(0, dati_ITA$d i m e s s i_g u a r i t i ) ) ,
a t t u a l m e n t e_p o s i t i v i = dati_ITA$v a r i a z i o n e_t o t a l e_
positivi ,
t e r a p i a_i n t e n s i v a = diff(c(0, dati_ITA$t e r a p i a_
i n t e n s i v a ) ) ,
s o g g e t t i_t e s t a t i = diff(c(0, dati_ITA$casi_t e s t a t i ) ) )
t o t a l i_r e g i o n i <- data.f r a m e(
data = as. Date ( dati_r e g i o n i$ data) ,
r e g i o n e = dati_r e g i o n i$d e n o m i n a z i o n e_regione , casi = dati_r e g i o n i$t o t a l e_casi ,
d e c e d u t i = dati_r e g i o n i$deceduti , d i m e s s i_g u a r i t i = dati_r e g i o n i$d i m e s s i_guariti , a t t u a l m e n t e_p o s i t i v i = dati_r e g i o n i$t o t a l e_positivi , t e r a p i a_i n t e n s i v a = dati_r e g i o n i$t e r a p i a_i n t e n s i v a ) v a r i a z i o n i_r e g i o n i <- t o t a l i_r e g i o n i % >% g r o u p_ by( r e g i o n e ) % >% m u t a t e ( d e c e d u t i = diff(c(0, d e c e d u t i ) ) , d i m e s s i_g u a r i t i = diff(c(0, d i m e s s i_g u a r i t i ) ) , t e r a p i a_i n t e n s i v a = diff(c(0, t e r a p i a_i n t e n s i v a ) ) )
APPENDICE A. CODICE R 43 v a r i a z i o n i_r e g i o n i <- as.data.f r a m e( v a r i a z i o n i_r e g i o n i ) v a r i a z i o n i_r e g i o n i$casi <- dati_r e g i o n i$n u o v i_p o s i t i v i v a r i a z i o n i_r e g i o n i$a t t u a l m e n t e_p o s i t i v i = dati_r e g i o n i$ v a r i a z i o n e_t o t a l e_p o s i t i v i v a r i a z i o n i_r e g i o n i <- v a r i a z i o n i_r e g i o n i % >% a r r a n g e ( r e g i o n e ) n <- nrow( v a r i a z i o n i_ITA ) # a n a l i s i d e s c r i t t i v e # f i g u r a 2.1 op <- par( no . r e a d o n l y = T )
plot( t o t a l i_ITA$ data, t o t a l i_ITA$casi ,log=" y ", type =" o ", pch =2 0, cex =0.6, lwd =1.5, ylab = " t o t a l e ", xlab =" t e m p o ", yaxt =" n ", ylim = c(1,max( t o t a l i_ITA$casi , t o t a l i_ITA$
a t t u a l m e n t e_positivi , t o t a l i_ITA$deceduti , t o t a l i_ITA$
d i m e s s i_g u a r i t i ) ) )
l i n e s( t o t a l i_ITA$ data, t o t a l i_ITA$a t t u a l m e n t e_positivi , type =" o ", pch =2 0, cex =0.6, col=4, lwd =1.5)
l i n e s( t o t a l i_ITA$ data, t o t a l i_ITA$deceduti , type =" o ", pch =2 0
, cex =0.6, col=2, lwd =1.5)
l i n e s( t o t a l i_ITA$ data, t o t a l i_ITA$d i m e s s i_guariti , type =" o "
, pch =2 0, cex =0.6, col=1 1, lwd =1.5)
l i n e s( t o t a l i_ITA$ data, t o t a l i_ITA$t e r a p i a_i n t e n s i v a , type =" o ", pch =2 0, cex =0.6, col=6, lwd =1.5)
axis(2L ,1 0^c(1,3,5) , s p r i n t f (" 10^% d ",c(1,3,5) ) , las =2L , cex .axis=0.8)
par( fig = c(0, 1, 0, 1) , oma = c(0, 0, 0, 0) , mar = c(0,
0, 0, 0) , new = TRUE )
plot(0, type = " n ", axes = F , ann = F )
l e g e n d(" top ",c(" Casi "," D i m e s s i/g u a r i t i "," D e c e d u t i "," A t t u a l m e n t e p o s i t i v i "," T e r a p i a i n t e n s i v a ") , xpd = TRUE , h o r i z = TRUE , lwd = 2, lty = 1,col=c(1,3,2,4,6) , pch =2 0, cex =0.5 5,text. w i d t h = c(0.1 1,0.1 3,0.1 2,0.0 9,0.1 3) )
par( op )
plot( v a r i a z i o n i_ITA$ data, v a r i a z i o n i_ITA$d i m e s s i_guariti , type =" l ", lwd =1,col=4, ylab =" v a r i a z i o n i ", xlab =" t e m p o ")
l i n e s( v a r i a z i o n i_ITA$ data, r o l l m e a n ( v a r i a z i o n i_ITA$d i m e s s i
_guariti ,
k =7, fill = NA ) , lwd =2,col=4)
l i n e s( v a r i a z i o n i_ITA$ data, v a r i a z i o n i_ITA$casi , lwd =1,col=1
)
l i n e s( v a r i a z i o n i_ITA$ data, r o l l m e a n ( v a r i a z i o n i_ITA$casi , k =7, fill = NA ) , lwd =2,col=1)
l i n e s( v a r i a z i o n i_ITA$ data, v a r i a z i o n i_ITA$deceduti , lwd =1,
col=2)
l i n e s( v a r i a z i o n i_ITA$ data, r o l l m e a n ( v a r i a z i o n i_ITA$
deceduti , k =7, fill = NA ) , lwd =2,col=2)
l e g e n d(" t o p r i g h t ",c(" Casi "," D i m e s s i / g u a r i t i "," D e c e d u t i "
) , lwd =2, lty = 1,pt. cex =0,col=c(1,4,2) , cex =0.8 6)
# f i g u r a 2.3
p o s r a t e <- v a r i a z i o n i_ITA$casi [5 8: n ]/v a r i a z i o n i_ITA$
s o g g e t t i_t e s t a t i [5 8: n ]
ppr <- b a r p l o t( posrate , col=3, b o r d e r =8, xlab =" t e m p o ", ylab =" t a s s o di p o s i t i v i t a ") axis( side =1, at = ppr [c(1,9 2-5 7,1 2 5-5 7,n -5 7) ] , l a b e l s= v a r i a z i o n i_ITA$ data[c(5 8,9 2,1 2 5, n ) ]) l i n e s( ppr , r o l l m e a n ( posrate , k =7, fill = NA ) , lwd =3) l e g e n d(" t o p r i g h t ", c(" t a s s o di p o s i t i v i t a g i o r n a l i e r o "," m e d i a m o b i l e a 7 g i o r n i ") , bty =" n ", fill =c(3, NA ) , b o r d e r = c(8, NA ) , lty =c( NA ,1) , lwd =c( NA ,2) , x . i n t e r s p =c(0.5,1.9) , y . i n t e r s p =c(1,2) , cex =0.9,box. lwd =1.5) # f i g u r a 2.4 par( m f r o w =c(2,1) )
acf ( v a r i a z i o n i_ITA$casi , lag =r o u n d( n/4) ) pacf ( v a r i a z i o n i_ITA$casi , lag =r o u n d( n/4) )
APPENDICE A. CODICE R 45 # f i g u r a 2.5 par( op ) a t t a c h( v a r i a z i o n i_r e g i o n i ) r2 4 <- v a r i a z i o n i_r e g i o n i [( r e g i o n e ==" L o m b a r d i a "| r e g i o n e == " P i e m o n t e "| r e g i o n e ==" Emilia - R o m a g n a "| r e g i o n e ==" V e n e t o " | r e g i o n e ==" L a z i o "| r e g i o n e == " C a m p a n i a "| r e g i o n e ==" P u g l i a "| r e g i o n e ==" S i c i l i a ") ,] row.n a m e s( r2 4) <- seq(1:(8*n ) ) d e t a c h( v a r i a z i o n i_r e g i o n i ) par( mar = c(5, 4, 4, 4) + 0.3) par( m f r o w =c(4,2) ) for( i in seq(1, 8*n , by= n ) ) {
plot( v a r i a z i o n i_ITA$ data, r o l l m e a n ( r2 4$casi [ i :( i + n -1) ] , k =
7, fill = NA ) , type =" l ", ann =" F ", lwd =2)
m t e x t( r2 4[ i ,]$r e g i o n e )
par(new= TRUE )
plot( v a r i a z i o n i_ITA$ data, r o l l m e a n ( r2 4$d e c e d u t i [ i :( i + n -1) ] , k =7, fill = NA ) , type =" l ", lwd =2,col=2, axes = F , ann = F )
axis( side =4, at = p r e t t y(r a n g e( r2 4$d e c e d u t i [ i :( i + n -1) ]) ) ,
col=2, col. t i c k s =2, col.axis=2) }
# f i g u r a 2.6
par( op )
par( m f r o w =c(2,1) )
plot( v a r i a z i o n i_ITA$ data, v a r i a z i o n i_ITA$t e r a p i a_i n t e n s i v a , type =" l ", lwd =1,col=2, ylab =" v a r i a z i o n i ", xlab =" t e m p o ", yaxt =" n ")
l i n e s( v a r i a z i o n i_ITA$ data, r o l l m e a n ( v a r i a z i o n i_ITA$t e r a p i a
_i n t e n s i v a , k =7, fill = NA ) , lwd =2,col=2)
a b l i n e( v = t o t a l i_ITA$ data[4 0] , lwd =2,col=3)
axis(2, c( -1 0 0,0,2 0 0) )
t o t a l i_ITA$t e r a p i a_i n t e n s i v a [1:( n -8) ] , type =" l ", lwd =2,
col=4, ylab =" D ( t ) / I ( t -8) ", xlab =" t ", yaxt =" n ")
a b l i n e( h =.1 4)
a b l i n e( v = t o t a l i_ITA$ data[4 0] , col=3, lwd =2)
axis(2, c(0.1 4,1) )
# f i g u r a 2.7
par( op )
par( lwd = 0.2)
t r e a t <- m a t r i x(c( t o t a l i_ITA$i s o l a m e n t o_d o m i c i l i a r e , t o t a l i_ITA$t e r a p i a_i n t e n s i v a , t o t a l i_ITA$r i c o v e r a t i_con
_s i n t o m i ) ,nrow=3, b y r o w = T )
t i m e D a t e <- seq. Date ( from = as. Date (’ 2020 -02 -24 ’) , to =
as. Date (’ 2020 -07 -31 ’) , by = 1) [c(1,4 0,7 9,1 1 8, n ) ]
c o l o r s = R C o l o r B r e w e r :: b r e w e r . pal (3, " P a s t e l 1 ")
o p t i o n s( s c i p e n =1 0)
ptr <- b a r p l o t( treat ,col=colors, b o r d e r = R C o l o r B r e w e r :: b r e w e r . pal (3, " Set1 ") , ylab = " t o t a l e ", xlab =" t e m p o ")
axis( side =1, at = ptr [c(1,4 0,7 9,1 1 8, n ) ] , l a b e l s= t i m e D a t e )
l e g e n d(" t o p r i g h t ",c(" R i c o v e r a t i con s i n t o m i "," T e r a p i a i n t e n s i v a "," I s o l a m e n t o d o m i c i l i a r e ") , bty =" n ", cex = 0.
7 5, fill = rev(c o l o r s) , b o r d e r = rev( R C o l o r B r e w e r :: b r e w e r . pal (3, " Set1 ") ) , y . i n t e r s p =c(1.7 5,1.7 5,1.7 5) )
# s i m u l a z i o n i dal m o d e l l o a u t o r e g r e s s i v o di P o i s s o n log - lineare , s u l l a base d e l l a f u n z i o n e ( 3 . 1 0 )
p a r s i m <- f u n c t i o n( n , h , l a m b d a0, y0, omega , alpha ,beta) { l a m b d a <- rep(0, n )
y <- rep(0, n )
l a m b d a [1] <- l a m b d a0
y [1] <- y0
APPENDICE A. CODICE R 47 for( i in 2: n ) {
l a m b d a [ i ] <- exp( o m e g a * (1-beta^ j )/(1-beta) +
beta^ j * log( l a m b d a0) + a l p h a * t(beta^(0:( j -1) ) %* % log(1+ y [ j :1]) ) y [ i ] <- r p o i s(1, l a m b d a [ i ]) j <- j +1 } r e t u r n( y [( h +1) : n ]) } # f i g u r a 3.1 par( m f r o w =c(1,2) ) set. seed (1 3 3 9) x1 <- p a r s i m (1 0 0 0,8 0 0,1 0,1 0,0.1,0.8 3,0.1 5)
plot( x1, type =" l ", col=4, ylab =" c o n t e g g i o ", xlab = " t e m p o "
, ylim =c(1 0 0,3 0 0) )
acf ( x1, lag =r o u n d(2 0 0/4) , main =" ")
set. seed (1 8 5)
x2 <- p a r s i m (1 0 0 0,8 0 0,1 0,1 0,0.1,0.1 5,0.8 3)
plot( x2, type =" l ", col=4, ylab =" c o n t e g g i o ", xlab = " t e m p o "
, ylim =c(1 0 0,3 0 0) )
acf ( x2, lag =r o u n d(2 0 0/4) , main =" ")
set. seed (8 2 6)
x3 <- p a r s i m (1 0 0 0,8 0 0,1 0,1 0,0.1,0.5,0.1)
plot( x3, type =" l ", col=4, ylab =" c o n t e g g i o ", xlab = " t e m p o "
)
acf ( x3, lag =r o u n d(2 0 0/4) , main =" ")
set. seed (8 3 1)
x4 <- p a r s i m (1 0 0 0,8 0 0,1 0,1 0,0.1,-0.1 3,-0.8 5)
plot( x4, type =" l ", col=4, ylab =" c o n t e g g i o ", xlab = " t e m p o "
)
acf ( x4, lag =r o u n d(2 0 0/4) , main =" ")
set. seed (1 1)
x5 <- p a r s i m (1 0 0 0,8 0 0,1 0,1 0,0.1,1.6 5,-0.6 7)
acf ( x5, lag =r o u n d(2 0 0/4) , main =" ")
# a p p l i c a z i o n e e m p i r i c a del m o d e l l o
# per i dati n a z i o n a l i si c o n s i d e r a n o a n c h e i casi
g i o r n a l i e r i dal 20/02/2020 al 23/02/2020 ( f o n t e : W o r l d H e a l t h O r g a n i z a t i o n )
y <- zoo (c(c(3,6,6 7,4 8,1 0 5) , v a r i a z i o n i_ITA$casi [ -1]) ,c(
seq. Date ( from = as. Date (’ 2020 -02 -20 ’) , to = as. Date (’ 2020 -02 -23 ’) , by = ’ days ’) , v a r i a z i o n i_ITA$ data) )
plot( y )
# s t i m a d i n a m i c a t r a m i t e " e x p a n d i n g w i n d o w s "
# le s t i m e dei c o e f f i c i e n t i sono e q u i v a l e n t i con d i s t r =" p o i s s o n " e con d i s t r =" n b i n o m " n <- l e n g t h( y ) k =1 4 cf <- data.f r a m e(m a t r i x(0, n - k , 3) , row.n a m e s=i n d e x( y ) [( k +1) : n ]) c o l n a m e s( cf ) <- c(" g a m m a "," a l p h a "," beta ") for( i in 1:( n - k ) ) { cf [ i ,] <- c o e f f i c i e n t s( t s g l m ( y [1:( i + k ) ] ,m o d e l=list( past_obs =1, past_ mean=1) ,link=" log ", d i s t r ="
p o i s s o n ", init . m e t h o d =" f i r s t o b s ",s t a r t.c o n t r o l=list
( m e t h o d =" f i x e d ") , f i n a l .c o n t r o l = list( c o n s t r a i n e d = NULL ) ) )
cat(" p r o c e s s i n g o b s e r v a t i o n , ", i , " \ n ") }
APPENDICE A. CODICE R 49
# g r a f i c o e v o l u z i o n e t e m p o r a l e dei p a r a m e t r i
plot(as. Date (r o w n a m e s( cf ) ) , cf$alpha , ylab =" ", xlab =" t e m p o ", type =" l ", ylim =c( -1,2) , lwd =2,col=" o r a n g e ", main =" I t a l i a ")
l i n e s(as. Date (r o w n a m e s( cf ) ) , cf$ beta, col=4, lwd =2)
l e g e n d(" t o p r i g h t ",c(e x p r e s s i o n( a l p h a ) ,e x p r e s s i o n(beta) ) , lwd =c(2,2) , lty =c(1,1) ,col=c(" o r a n g e ",4) , h o r i z = T , cex =0.
7 5,pt. cex =1 0) a b l i n e( v =i n d e x( y ) [2 1] ,col=2, lwd =2) # s t i m a sul c a m p i o n e c o m p l e t o # per t e n e r c o n t o m a g g i o r m e n t e d e l l a s o v r a d i s p e r s i o n e , gli std . e r r o r d e r i v a n o d a l l a m a t r i c e di c o v a r i a n z a sandwich , o t t e n u t a s u l l a base d e l l a v e r o s i m i g l i a n z a Poisson , i p o t i z z a n d o un m o d e l l o b i n o m i a l e n e g a t i v o non c o r r e t t a m e n t e s p e c i f i c a t o
f i n a l . t s g l m <- t s g l m ( y ,m o d e l=list( past_obs =1, past_ mean=1) ,link=" log ", d i s t r =" n b i n o m ", init . m e t h o d =" f i r s t o b s ",
s t a r t.c o n t r o l=list( m e t h o d =" f i x e d ") , f i n a l .c o n t r o l=list( c o n s t r a i n e d = NULL ) ) s u m m a r y( f i n a l . t s g l m ) # c r e a z i o n e t a b e l l a c o n t e n e n t e i r i s u l t a t i d e l l a s t i m a e s t i m a t e <- as.data.f r a m e(c b i n d(s u m m a r y( f i n a l . t s g l m )$ c o e f f i c i e n t s[ , -c(3,4) ] , 2*(1-p n o r m(s u m m a r y( f i n a l . t s g l m )$ c o e f f i c i e n t s[ ,1]/ s u m m a r y( f i n a l . t s g l m )$ c o e f f i c i e n t s[ ,2]) ) ) ) [ -4,] c o l n a m e s( e s t i m a t e ) [3] <- " p - v a l u e " x t a b l e ( estimate , d i g i t s =3)
R0 <- rep(0, n -8)
for( i in 1:( n -8) ) {
R0[ i ] = 7.5*(f i t t e d( f i n a l . t s g l m ) [ i +8]) / sum(f i t t e d( f i n a l . t s g l m ) [ i :( i +7) ]) }
# g r a f i c o d i n a m i c a t e m p o r a l e di R0
plot(i n d e x( y ) [9: n ] ,R0, type =" l ", ylab =" R0 ", xlab =" t e m p o ", main =" I t a l i a " ,col=4, lwd =1)
a b l i n e( h =1,col=1, lwd =1)
a b l i n e( v =i n d e x( y ) [2 1] , col=2, lwd =2)
# c a r i c a m e n t o dei dati sui casi g i o r n a l i e r i in Florida , i m p o r t a t i a t t r a v e r s o la l i b r e r i a " C O V I D 1 9 "
l i b r a r y(" C O V I D 1 9 ")
flo <- c o v i d1 9( c o u n t r y =" USA ", l e v e l =2, s t a r t = " 2020 -03 -04 ",end=" 2020 -07 -31 ", v e r b o s e = F )
flo <- flo [ flo$a d m i n i s t r a t i v e_area_l e v e l_2==" F l o r i d a ",]$
c o n f i r m e d
y <- diff(c(0, flo ) )
y <- zoo ( y ,seq. Date ( from = as. Date (’ 2020 -03 -04 ’) , to = as. Date (’ 2020 -07 -31 ’) , by = ’ days ’) )
# p u l i z i a dei dati r e g i o n a l i sui n u o v i casi g i o r n a l i e r i ( sono p r e s e n t i a l c u n i v a l o r i n e g a t i v i che non
p e r m e t t o n o di s t i m a r e c o r r e t t a m e n t e i m o d e l l i )
v a r i a z i o n i_r e g i o n i$casi [ v a r i a z i o n i_r e g i o n i$casi <0] <- c(2
,1,2 9,0,3,3,6,0,1 1 3,2,0,0,1)
y <- zoo ( v a r i a z i o n i_r e g i o n i$casi [ v a r i a z i o n i_r e g i o n i$
r e g i o n e ==" L o m b a r d i a "] , v a r i a z i o n i_ITA$ data)
# si r i p e t e l ’ i n t e r o p r o c e d i m e n t o di cui s o p r a per i dati d e l l a F l o r i d a e d e l l e r e g i o n i d ’ i n t e r e s s e
Bibliografia
[1] A. Agosto, A. Campmas, P. Giudici e A. Renda. Monitoring COVID-
19 contagion growth in Europe. CEPS Working Papers, 30 marzo 2020.
https : / / www . ceps . eu / ceps - publications / monitoring - covid -
19-contagion-growth-in-europe/.
[2] A. Cerqua e R. Di Stefano. When did coronavirus arrive in Europe? 2020. https://www.researchgate.net/publication/340568094_
When_did_coronavirus_arrive_in_Europe.
[3] A. Farcomeni, A. Maruotti, F. Divino, G. Lasinio e G. Lovison. An ensemble approach to short-term forecast of COVID-19 intensive care
occupancy in Italian Regions. 2020. https://arxiv.org/abs/2005.
11975.
[4] R. Ferland, A. Latour e D. Oraichi. «Integer-Valued GARCH Process». In: Journal of Time Series Analysis 27 (2006), pp. 923–942.
[5] K. Fokianos e D. Tjøstheim. «Log-linear Poisson autoregression». In:
Journal of Multivariate Analysis 102 (2011), pp. 563–578.
[6] C. Gu, W. Jiang, T. Zhao e B. Zheng. Mathematical recommendations
to fight against COVID-19. 2020. https://papers.ssrn.com/sol3/
papers.cfm?abstract%20id=3551006.
[7] W. Kermack e A. McKendrick. «A contribution to the mathematical theory of epidemics». In: Proceedings of the Royal Society of London.
Series A. 115 (1927), pp. 700–721.
lysis of Count Time Series Following Generalized Linear Models». In:
Journal of Statistical Software 82 (2017), pp. 1–51.
[9] F. Peracchi. The Covid-19 pandemic in Italy. EIEF, 2020. http://
www.eief.it/eief/index.php/forecasts.
[10] N. Shao, J. Cheng e W. Chen. The reproductive number R0 of COVID-
19 based on estimate of a statistical time delay dynamical system. Cold
Spring Harbor Laboratory Press, 2020. https://www.medrxiv.org/
content/10.1101/2020.02.17.20023747v2.
[11] T. Sim. «Maximum Likelihood Estimation in Partially Observed Mar- kov Models with Applications to Time Series of Counts». Ph.D. the- sis. Télécom ParisTech, Paris, 2016. https : / / pastel . archives -