[表示 : 全て 最新50 1-99 101- 201- 301- 401- 501- 601- 701- 801- 901- 1001- 2ch.scのread.cgiへ]
Update time : 12/10 10:53 / Filesize : 464 KB / Number-of Response : 1034
[このスレッドの書き込みを削除する]
[+板 最近立ったスレ&熱いスレ一覧 : +板 最近立ったスレ/記者別一覧] [類似スレッド一覧]


↑キャッシュ検索、類似スレ動作を修正しました、ご迷惑をお掛けしました

高校数学の質問スレ(医者・東大卒専用) Part438



588 名前:132人目の素数さん mailto:sage [2025/01/17(金) 18:02:26.71 ID:BcOp0/e9.net]
# incubation period for COVID-19
incu=\(x){dlnorm(x,m=1.64,s=0.58)
# lm=runif(1,1.6,1.8)
# s=runif(1,0.4,0.6)
}
incu=Vectorize(incu)
# window period for rapid antigen test
wind=\(x) dweibull(x, shape=2.5,scale=4.5)
wind=Vectorize(wind)
curve(wind,0,14,col=2,xlab='days',ylab='',axes=F) ; axis(1)
curve(incu,add=TRUE)
legend('top',bty='n',legend=c('incubation period','window period'),lty=1:1,col=1:2)

cdf_incu=\(x) integrate(incu,0,x)$value
cdf_incu=Vectorize(cdf_incu)
cdf_wind=\(x) integrate(wind,0,x)$value
cdf_wind=Vectorize(cdf_wind)
curve(cdf_wind,0,14,col=2)
curve(cdf_incu,add=TRUE)
legend('center',bty='n',legend=c('incubation period','window period'),lty=1:1,col=1:2)

pdfZ=\(z) integrate(\(x) incu(x)*wind(x-z),0,Inf)$value
pdfZ=Vectorize(pdfZ)
curve(pdfZ,-10,10,xlab='incubation-window (days)',axes=F,ylab='') ; axis(1)
integrate(pdfZ,-Inf,0)$value
fnr=\(x) integrate(pdfZ,-Inf,-x)$value # false negative rate after x days since onset of symtom
fnr=Vectorize(fnr)
curve(fnr,0,7, xlab='days after onset',ylab='false negative rate')

##
k=1e5
inc=rlnorm(k,m=1.64,s=0.58)
win=rweibull(k,shape=2.5,scale=4.5)
d=inc-win
hist(d)
mean(inc)
mean(win)
mean(inc<win) # negative test
re=NULL
for(i in 1:7) re=c(re,mean((inc+i)<win)) ; re
plot(re,pch=16)
which(re<0.05)[1]






[ 続きを読む ] / [ 携帯版 ]

全部読む 前100 次100 最新50 [ このスレをブックマーク! 携帯に送る ] 2chのread.cgiへ
[+板 最近立ったスレ&熱いスレ一覧 : +板 最近立ったスレ/記者別一覧](;´∀`)<464KB

read.cgi ver5.27 [feat.BBS2 +1.6] / e.0.2 (02/09/03) / eucaly.net products.
担当:undef