風俗嬢ですが再起して頑張り医学部に合格しましたat HOSP
風俗嬢ですが再起して頑張り医学部に合格しました - 暇つぶし2ch700:卵の名無しさん
17/01/15 07:07:28.93 7tqL0aD+.net
シリツ和歌集
スレリンク(doctor板:759-760番)

701:卵の名無しさん
17/01/16 06:46:01.76 KVPRc2LB.net
plot
URLリンク(i.imgur.com)

ggplot
URLリンク(i.imgur.com)

702:卵の名無しさん
17/01/16 12:34:53.75 ykGfbmfY.net
StanとRでベイズ統計モデリング

703:卵の名無しさん
17/01/17 20:46:15.14 svtXD80R.net
URLリンク(heavywatal.github.io)

704:卵の名無しさん
17/01/18 04:47:43.62 SRRtmZKH.net
URLリンク(www.rstudio.com)

705:卵の名無しさん
17/01/19 16:28:01.79 VlDmkwYR.net
URLリンク(i.imgur.com)

706:卵の名無しさん
17/01/19 16:52:24.49 VlDmkwYR.net
URLリンク(www.slideshare.net)

707:卵の名無しさん
17/01/26 20:57:04.40 IwAmSPBU.net
## y1,y2が独立にポアソン分布に従うとき
# y1 ~ pois(λ1)
# y2 ~ pois(λ2)
# N = y1 + y2
# y1 ~ Binomial(N,λ1/(λ1+λ2))

n=100
lambda=sample(0:n,2)
l1=lambda[1] ; l2=lambda[2]
y1=rpois(1000,l1)
y2=rpois(1000,l2)
N=y1+y2
yy1=rbinom(1000,N,l1/(l1+l2))
plot(density(y1),lwd=2)
lines(density(yy1),lwd=2,col=4)

hist(y1,freq=FALSE)
lines(density(yy1),lwd=2,col=4)


URLリンク(i.imgur.com)

708:卵の名無しさん
17/01/29 12:27:44.26 OuOv3Xge.net
## bernoulli.stan
data{
int N;
int<lower=0,upper=1> Y[N];
}

parameters{
real<lower=0,upper=1> p;
}

model{
Y ~ bernoulli(p);
}
##
library(rstan)
rstan_options(auto_write = TRUE)
options(mc.cores = parallel::detectCores())

stanmodel <- stan_model('bernoulli.stan')
Sn <- function(S,n,...){
dat = sample(c(rep(1,S),rep(0,n-S)))
d = data.frame(Y=dat)
data=list(N=nrow(d),Y=d$Y)
fit=rstan::sampling(stanmodel,data=data)
print(fit,pars="p",...)
}
Sn(3,10)
Sn(30,100)
Sn(5,100)

709:卵の名無しさん
17/02/01 15:47:30.88 f4Z0gUES.net
library(PSAgraphics)
data('lindner')
library(Matching)
head(lindner)
summary(glm(lifepres ~ .-1, data=lindner))

Y=lindner$lifepres
Tre=lindner$abcix
ps=glm(abcix ~ .,data=lindner[,-1], family=binomial(link="logit"))$fitted
mout.lindner=Match(Y,Tre,ps)
summary(mout.lindner)

ivec1 <- lindner$abcix
ivec2 <- rep(1,nrow(lindner)) - ivec1
ivec <- cbind(ivec1, ivec2)
iestp1 <- (ivec1/ps)/mean(ivec1)
iestp2 <- (ivec2/ps)/mean(ivec2)
iestp <- iestp1 + iestp2
ipwe <- lm(Y ~ ivec -1, weights=iestp, data=lindner)
summary(ipwe)

library(survey)
psw <- svydesign(ids = ~ 1 , weights=iestp, data=lindner)
ipwsu <- svyglm(lifepres ~ abcix, design = psw)
summary(ipwsu)

710:卵の名無しさん
17/02/03 22:40:39.66 j4KlfkXU.net
p=0.4 # prevalence
se=0.62 # sensitivity
sp=0.98 # specificity

a=p/(1-p) # odds
b=a*se/(1-sp) # *LH(+)
b/(1+b) # ppv

c=a*(1-se)/sp # *LH(-)
1 - c/(1+c) # npv

711:卵の名無しさん
17/02/04 14:31:06.98 PJ7YIwSl.net
## p.351 TABLE19-3
A1=45
A0=94
B1=257
B0=945
dat=matrix(c(A1,B1,A0,B0),2)
colnames(dat)=c('X1','X0')
rownames(dat)=c('D1','D0')
dat

Pz1=c(0.40,0.55,0.70,0.45,0.60,0.75) #暴露喫煙率
Pz0=c(0.30,0.45,0.60,0.25,0.40,0.55) #非暴露喫煙率
ORxz = (Pz1/(1-Pz1))/(Pz0/(1-Pz0)) ; round(ORxz,2)

ORdz=c(5,10,15) # 病気の有無による喫煙オッズ比(暴露によらず一致)
n=length(ORdz)
m=length(ORxz)
B11=Pz1*B1 ; B11 #無病暴露喫煙者数
B01=Pz0*B0 ; B01 #無病非暴露喫煙者数

A11=A01=matrix(numeric(n*m),ncol=n)
ORdx=numeric(n)

for(i in 1:n){
A11[,i] = ORdz[i]*A1*B11/(ORdz[i]*B11 + B1-B11) #有病暴露喫煙者数
A01[,i] = ORdz[i]*A0*B01/(ORdz[i]*B01 + B0-B01) #有病非暴露喫煙者数
ORdx = (A11*B01)/(A01*B11)
# ORdxz0 = (A1-A11)*(B0-B01)/((A0-A01)*(B1-B11))
}
round(ORdx,2)

712:卵の名無しさん
17/02/04 20:10:53.31 3OnQDqQG.net
基地外定期5963

713:卵の名無しさん
17/02/04 20:42:27.86 J3K1rlGH.net
# ある文字列が迷惑メールに含まれる確率をp1[i],通常メールに含まれる確率をp0[i]とする。
x1=0.1 # 初期値
p1=rep(0.1,7)
p0=rep(0.01,7)

L.J.Savage <- function(x1){
Mail <- function(x,i){
p1[i]*x/(p1[i]*x +p0[i]*(1-x))
}
n=length(p1)
X=numeric(n)
X[1]=x1

for(i in 1:n){
X[i+1]=Mail(X[i],i)
}
return(X)
}

L.J.Savage(0.1)

xx=c(0.01,0.05,0.20,0.30,0.40,0.50)
sapply(xx,L.J.Savage)

714:卵の名無しさん
17/02/04 20:46:46.16 J3K1rlGH.net
>>692
当直スレのレボジトリに使ってんの。
直接スクリプトを貼ると読めない人には迷惑だからね。

715:卵の名無しさん
17/02/05 07:27:41.65 zzUY8Td1.net
##
# あるウイルス疾患の診断に迅速キット、発熱、関節痛の
# 感度は80% 90%,70%、特異度は99%,50%,60%とする。
# 迅速キット:陰性、発熱:陽性、関節痛:陽性であった。
# 診察前確率を50%としたとき、個々の検査陽性確率は独立という前提で診察後確率を求めよ。


x=0.5 # prevalene
sn=c(0.8,0.9,0.7) # sensitivity
sp=c(0.99,0.5,0.6) # specificity
E=c(0,1,1) # exam result
TP=sn
FP=1-sp
pLH=TP/FP
nLH=(1-TP)/(1-FP)
p2o <- function(p) p/(1-p)
o2p <- function(o) o/(1+o)
LH=prod(ifelse(E,pLH,nLH))
o2p(p2o(x)*LH)

716:卵の名無しさん
17/02/05 08:07:09.44 PxDGKxKX.net
このあたりの話はMcGeeに書いてあるはず。
俺は理解できているから尤度比の参照にしか使ってない。
McGeeのデータは尤度比の記載のみで
感度特異度は割愛されているが次の式で算出できる。

p:陽性尤度比 q:陰性尤度比
感度=p(1-q)/(p-q)
特異度=(p-1)/(p-q)

717:卵の名無しさん
17/02/05 12:27:55.45 y3KE+Pvf.net
# 3項目のうち少なくとも2項目が陽性で疾患ありとしたときの感度
n=length(sn)
sn2=numeric(n)
for(i in 1:n){
sn2[i] <- (1-sn[i])*prod(sn[-i])
}
sum(sn2)+prod(sn)

# 3項目のうち少なくとも2項目が陽性で疾患ありとしたときの特異度
n=length(sp)
sp2=numeric(n)
sp2
for(i in 1:n){
sp2[i] <- (1-sp[i])*prod(sp[-i])
}
sum(sp2)+prod(sp)

# 3項目がすべて陽性で疾患ありとしたときの特異度
1-prod(1-sp)

718:卵の名無しさん
17/02/05 14:28:43.99 y3KE+Pvf.net
##
# Aa,Ba,Ca : 恩赦事象 1/3
# Bd,Cd : 死刑宣告 1/2

# p(Aa|Bd) = p(Bd|Aa)*p(Aa) / p(Bd)
# where p(Bd) = p(Bd|Aa) *P(Aa) + p(Bd|Ba)*p(Ba) + p(Bd|Ca)*p(Ca) = 0.5*0.33 + 0*0.33 + 1*0.33 =1/2*1/3 + 0 + 1*1/3 = 3/6 = 1/2
# ∴ p(Aa|Bd) = (1/6)/(1/2) = 1/3

719:卵の名無しさん
17/02/05 14:32:51.64 y3KE+Pvf.net
##
# Aa,Ba,Ca : 恩赦事象 1/3
# Bd,Cd : 死刑宣告 1/2

# p(Aa|Bd) = p(Bd|Aa)*p(Aa) / p(Bd)
# where p(Bd) = p(Bd|Aa)*P(Aa) + p(Bd|Ba)*p(Ba) + p(Bd|Ca)*p(Ca)
= (1/2) *(1/3) + 0*(1/3) + 1*1/3
= 1/2
# ∴ p(Aa|Bd) = p(Bd|Aa)*p(Aa) / p(Bd)
= ((1/2)*(1/3)) / (1/2) = 1/3

720:卵の名無しさん
17/02/05 17:03:05.43 y3KE+Pvf.net
当然ながら、迷惑メールフィルターは非迷惑メールの選択にも使える。

このスレのある投稿に含まれていた3つのキーワードは次の確率で国立卒の投稿(国立投稿)、ド底辺特殊シリツ医大卒の投稿に含まれるとする。

キーワード     国立卒     ド底辺特殊シリツ医大卒
裏口           0.1              0.001
底辺            0.3               0.01
ジジイ            0.001              0.25

この3つのキーワードを含む投稿がド底辺特殊シリツ医大卒の投稿である確率を述べよ。
事前確率は理由不在の原則に従って0.5とする。

721:卵の名無しさん
17/02/05 21:11:44.93 Is13BSXo.net
基地外イチイチID変えるなよ

722:卵の名無しさん
17/02/06 03:36:27.43 7D5wEJ9D.net
# p(Aa|Bd) = p(Bd|Aa)*p(Aa) / p(Bd)
# where p(Bd) = p(Bd|Aa)*P(Aa) + p(Bd|Ba)*p(Ba) + p(Bd|Ca)*p(Ca)
# = (1/2) *(1/3) + 0*(1/3) + 1*1/3
# = 1/2
# ∴ p(Aa|Bd) = p(Bd|Aa)*p(Aa) / p(Bd)
# = ((1/2)*(1/3)) / (1/2) = 1/3

# P(Ca|Bd) = P(Bd|Ca)*P(Ca)/P(Bd)
# = ( 1 * (1/3))/ (1/2) = 2/3

N=10^5
ABC=c('A','B','C')
BC=c('B','C')
Amnesty=numeric(N)
Declare=numeric(N)
for(i in 1:N){
Amnesty[i]=sample(ABC,1)
switch(Amnesty[i],
'A'=Declare[i] <- sample(BC,1),
'B'=Declare[i] <- 'C',
'C'=Declare[i] <- 'B'
)
}
mean(Amnesty[which(Declare=='B')]=='A') #p(Aa|Bd)
mean(Amnesty[which(Declare=='B')]=='B') #p(Ba|Bd)
mean(Amnesty[which(Declare=='B')]=='C') #p(Ca|Bd)

723:卵の名無しさん
17/02/06 03:40:32.25 7D5wEJ9D.net
>>701
問題に答える頭もないの?
こういう問題は臨床でも必要だろ?


あるウイルス疾患の診断に迅速キット、発熱、関節痛の
感度は80% 90%,70%、特異度は99%,50%,60%とする。
迅速キット:陰性、発熱:陽性、関節痛:陽性であった。
診察前確率を50%としたとき、個々の検査陽性確率は独立という前提で診察後確率を求めよ。

724:卵の名無しさん
17/02/06 13:49:21.23 fSw1iVag.net
私立医大の偏差値
URLリンク(2chreport.net) をみると
ド底辺特殊シリツ医大の公称の偏差値は最低でも57となっている。
成績が正規分布と仮定して偏差値57は上位24%に位置する。

そのような学力の学生がこのような英作文をして
URLリンク(imagizer.imageshack.com)
しかも、間違いを訂正できない確率は極めて0に近いはずである。
100人にひとりそのようなバカがいたとするとその偏差値は下位1%なので26.7となる。
偏差値57以上の学生がYour thing英作文をする確率を1000分の1(実際はもっと少ないであろう)と大きめに設定する。

ここでベイズの公式

P(裏口入学|誤英作文) = P(誤英作文|裏口入学)* P(裏口入学)/ { P(誤英作文|裏口入学)* P(裏口入学) + P(誤英作文|正規入学)*P(正規入学) }

P(正規入学) = 1 - P(裏口入学), P(誤英作文|裏口入学) = 1

理由不十分の原則(principal of insufficient reason) URLリンク(mathworld.wolfram.com)
にしたがって

 P(裏口入学)=P(正規入学)=0.5とする。

P(誤英作文|正規入学)=0.001の設定であるから

P(裏口入学|誤英作文) = 0.5/(0.5 +0.001*0.5) = 0.999

と算出できる。

ド底辺特殊シリツ医大の公称最低偏差値が57が正しいとすると
このスレのド底辺特殊シリツ医大卒が裏口入学である可能性は99.9%である。 Q.E.D.

725:卵の名無しさん
17/02/06 17:11:14.69 fSw1iVag.net
# Q: 看守の正答確率0.5
# Aa,Ba,Ca : 恩赦確率 1/3
# Bd|Aa,Cd|Aa : 死刑宣告確率

# p(Aa|Bd) = p(Bd|Aa)*p(Aa) / p(Bd)
# where p(Bd) = p(Bd|Aa)*P(Aa) + p(Bd|Ba)*p(Ba) + p(Bd|Ca)*p(Ca)
# = (Q/2) *(1/3) + (1-Q)*(1/3) + Q*(1/3)
# = (0.5/2)*(1/3) + (1-0.5)*(1/3) + 0.5*(1/3) = 5/12
# ∴ p(Aa|Bd) = p(Bd|Aa)*p(Aa) / p(Bd)
# = (0.5/2)*(1/3) / (5/12) = 1/5
# p(Ca|Bd) = p(Bd|Ca)*p(Ca) / p(Bd)
# = ( Q * (1/3)) / (5/12)
# = ( (1/2) * (1/3))/ (5/12) = 2/5
# p(Ba|Bd) = p(Bd|Ba)*p(Ba) / p(Bd)
# = ( (1-Q) *(1/3)) / (5/12) = 2/5

726:卵の名無しさん
17/02/06 18:18:03.12 fSw1iVag.net
pLH=TP/FP
nLH=(1-TP)/(1-FP)=FN/TN

DOR=pHL/nLH = (TP/FP)/(FN/TN)

# pr=Disese/Health : prevalance for actual number
PPV=TP/(TP+FP*pr)
(1-PPV)=FP/(TP+FP*pr)
NPV=TN/(TN+FN*pr)
(1-NPV)=FN/(TN+FN*pr)

PPV/(1-PPV) * NPV/(1-NPV) = TP/FP * TN/FN =DOR # for any prevalence

n=1000
set.seed(0)
TPR=runif(n)
set.seed(1)
FPR=runif(n)

pLH=TPR/FPR
nLH=(1-TPR)/(1-FPR)
DOR=pLH/nLH
logit = function(q) log(q/(1-q))
D=logit(TPR)-logit(FPR)
plot(log(DOR),D)
S=logit(TPR)+logit(FPR)
plot(D~S)
f=function(ab) sum((D-(ab[1]+ab[2]*S)^2))
optim(c(-0.1,-0.1),f) # Not Convergent
lm=lm(D~S) ; lm$coef
abline(lm)

727:卵の名無しさん
17/02/06 18:19:18.13 fSw1iVag.net
##
sensitivity=seq(0,1,len=100)
specificity=seq(0,1,len=100)

h = function(sensitivity,specificity){
TPR=sensitivity
FPR=1-specificity
log((TPR/FPR)/((1-TPR)/(1-FPR)))
}
z=outer(sensitivity,specificity,h)
image(sensitivity,specificity,z,col=terrain.colors(32),main="log(Diagnostic Odds Ratio)")
contour(TPR,FPR,z,nlevels=32,add=TRUE)

728:卵の名無しさん
17/02/06 21:39:31.08 fSw1iVag.net
##差の信頼区間(生データなし)
DifCI=function(n1,n2,m1,m2,sd1,sd2){
pooledV=((n1-1)*sd1^2+(n2-1)*sd2^2)/(n1-1+n2-1)
SE12=sqrt((1/n1+1/n2)*pooledV)
w=qt(.975,n1-1+n2-1)*SE12
ci=c(m1-m2-w,m1-m2+w)
names(ci)=c("lower","upper")
return(ci)
}

# t検定(生データなし)
T.test=function(n1,n2,m1,m2,sd1,sd2){
SE12=sqrt((1/n1+1/n2)*((n1-1)*sd1^2+(n2-1)*sd2^2)/((n1-1)+(n2-1)))
T=(m1-m2)/SE12
pt(abs(T),n1-1+n2-1,lower.tail = FALSE)
}

729:卵の名無しさん
17/02/06 21:40:10.38 fSw1iVag.net
## m sd SEM n
non=c(0.52,0.25,0.027,88)
rec=c(0.38,0.32,0.034,89)
eli=c(0.40,0.26,0.048,28)

# 生データなしで分散分析
lh=rbind(non,rec,eli)
colnames(lh)=c("m","sd","SEM","n") ; lh
mean.G=sum(lh[,"m"]*lh[,"n"])/sum(lh[,"n"])
SS.bit=sum((lh[,"m"]-mean.G)^2*lh[,"n"])
SS.wit=sum(lh[,"sd"]^2*(lh[,"n"]-1))
df.bit=nrow(lh)-1
df.wit=sum(lh[,"n"]-1)
MS.bit=SS.bit/df.bit
MS.wit=SS.wit/df.wit
F.ratio=MS.bit/MS.wit
pf(F.ratio,df.bit,df.wit,lower.tail=FALSE) # 0.003720507
(η2=(SS.bit)/(SS.bit+SS.wit)) # 0.05387927

730:卵の名無しさん
17/02/06 22:24:41.94 fSw1iVag.net
# 比率の(正規分布近似)信頼区間から標本数を算出する
# p:比率 l:95%下限 u:95%上限
ci2n <- function(p,l,u){
Z=qnorm(.975)
n=p*(1-p)/(((u-l)/(2*Z))^2)
return(n)
}

library(binom)
ci=binom.confint(3,10, method="asymptotic")
ci2n(0.3,ci$lower,ci$upper)

ci=binom.confint(30,100, method="asymptotic")
ci2n(0.3,ci$lower,ci$upper)

ci=binom.confint(123,410, method="asymptotic")
ci2n(0.3,ci$lower,ci$upper)

731:卵の名無しさん
17/02/06 23:47:29.81 fSw1iVag.net
Symptoms=c('Fever','Feverishness','Cough','Myalgia','Malaise',
'Headache','Sore throat','Sneezing','Nasal congestion',
'Chills','Vaccine history','Fever and cough',
'Fever and cough and acute onset')
pLH=c(1.8, 1.0, 1.1,0.93,0.98,1.0, 1.0,1.2,1.1,1.1, 0.63,1.9,2.0)
nLH=c(0.40,0.70,0.42,1.2,1.1,0.75,0.96,0.87,0.49,0.68,1.1,0.54,0.54)

findings=rep(0,length(Symptoms))
flu <- data.frame(pLH,nLH,DOR=round(pLH/nLH,2),findings)
rownames(flu) <- Symptoms
flu$findings=c(1,1,1,1,1,1,1,1,1,1,1,1,1)
p2o <- function(p) p/(1-p)
o2p <- function(o) o/(1+o)

p0=0.50
o0=p2o(p0)
flu$LH <- ifelse(flu$findings,flu$pLH,flu$nLH)
flu

if(flu['Fever and cough and acute onset','findings']==1){
flu['Fever and cough','LH']<-1
}
if(flu['Fever and cough','findings']==1){
flu['Fever','LH'] = 1
flu['Cough','LH'] = 1
}
flu
o1=prod(flu$LH)
o2p(o1)

732:卵の名無しさん
17/02/07 07:14:02.18 EQ9/UdEE.net
LH2snsp <- function(pLH,nLH){
sensitivity=pLH*(1-nLH)/(pLH-nLH)
specificity=(pLH-1)/(pLH-nLH)
c(sensitivity,specificity)
}

LH2snsp(4.7,0.06)

733:卵の名無しさん
17/02/07 14:31:50.14 ppRdrpWr.net
LH2snsp = function(pLH,nLH){
c(sensitivity=pLH*(1-nLH)/(pLH-nLH),specificity=(pLH-1)/(pLH-nLH))
}
LH2snsp(4.7,0.06)

LH2SNSP=function(pLH,nLH){
f=function(snsp){
sn=snsp[1]
sp=snsp[2]
(pLH-sn/(1-sp))^2+(nLH-(1-sn)/sp)^2
}

734:卵の名無しさん
17/02/10 12:13:06.11 GDPkbbYm.net
### P(Bd|Aa)がβ分布に従うとき
d.theta <- function(Θ,a=1,b=1) dbeta(Θ/(1-Θ),a,b)/((1-Θ)^2)
death.row <- function(a=1,b=1,N=10^5){
x=rbeta(N,a,b)
Θ=x/(1+x)
hist(Θ,freq=FALSE,xlim=c(0,1),xlab="P(Bd|Aa)",main="")
curve(d.theta(x,a,b),add=TRUE)
curve(dbeta(x,a,b),add=TRUE,lty=3)
legend("bottomright",bty="n",legend=paste0("Beta(",a,",",b,")"),cex=0.9)
EAP=integrate(function(x) x*d.theta(x,a,b),0,0.5)$value
MAP=optimize(function(x) d.theta(x,a,b),c(0,0.5),maximum=TRUE)$maximum
MED=uniroot(function(x,u0=0.5) integrate(function(y) d.theta(y,a,b),0,x)$value - u0,c(0,0.5))$root
print(data.frame(EAP,MAP,MED))
summary(Θ)
}
dev.off()
par(mfrow=c(2,2))
death.row(1,1)
death.row(2,2)
death.row(4,4)
death.row(8,8)

death.row(1,8)
death.row(2,8)
death.row(4,8)
death.row(4,2)

735:卵の名無しさん
17/02/11 12:26:12.98 STlzmlk8.net
## URLリンク(github.com)

f <- function(x) x^10*exp(-13*x) # posterior distribution
Q <- function(theta) dnorm(theta,mean=1,sd=0.5) # proposal distribution
N=10000
burn_in=1000
chain <- NULL
chain[1]=1 # 初期値
accepted=0
for(i in 1:N){
a = rnorm(1,mean=1,sd=0.5)
choice = c(a,chain[i])
r = (Q(chain[i])*f(a))/(Q(a)*f(chain[i]))
if(a>0 & r>0){
prob = c(min(r,1),1-min(r,1))
chain[i+1] <- sample(choice,1,replace=TRUE,prob=prob)
accepted=accepted+ifelse(chain[i+1]==a,1,0)
}else{
chain[i+1] <- chain[i]
}
}

dev.off()
par(mfrow=c(2,1))
plot(chain,type="l",col="royalblue")
accepted/N

736:卵の名無しさん
17/02/11 12:46:54.35 STlzmlk8.net
f <- function(x) x^(11-1)*exp(-13*x) # posterior distribution
Q <- function(theta) dnorm(theta,mean=1,sd=0.5) # proposal distribution
N=10000
burn_in=1000
chain <- NULL
chain[1]=1 # 初期値
accepted=0
for(i in 1:N){
a = rnorm(1,mean=1,sd=0.5) # 提案分布の提示値
choice = c(a,chain[i])
r = (Q(chain[i])*f(a))/(Q(a)*f(chain[i]))
if(a>0 & r>0){
prob = c(min(r,1),1-min(r,1))
chain[i+1] <- sample(choice,1,replace=TRUE,prob=prob)
accepted=accepted+ifelse(chain[i+1]==a,1,0)
}else{
chain[i+1] <- chain[i]
}
}

dev.off()
par(mfrow=c(2,1))
plot(chain,type="l",col="royalblue")
accepted/N

chain2=chain[-c(1:burn_in)]
hist(chain2,freq=FALSE,col="royalblue",main="Histogram of MCMC sampling")
curve(dgamma(x,10,13), add=TRUE, col=3,lwd=2)

summary(chain2)
mean(chain2) ; var(chain2)
11/13 ; (11/13^2

737:M
17/02/11 14:25:22.76 v2vs8Bf6.net
URLリンク(life.a.la9.jp) (山岳写真)

738:卵の名無しさん
17/02/11 19:03:33.18 STlzmlk8.net
# 最頻値(モード)
MAP <- function(x) {
dens <- density(x)
mode_i <- which.max(dens$y) # densityの頂点となるindex
mode_x <- dens$x[mode_i]
mode_y <- dens$y[mode_i]
c(mode_x, mode_y)
}

739:卵の名無しさん
17/02/12 06:55:30.46 vF6uxTl/.net
離散データVRのモード値:density(VR)$x[which.max(density(VR)$y)]

740:卵の名無しさん
17/02/12 21:29:59.33 vF6uxTl/.net
α=11
λ=13
h <- function(θ) λ*θ - (α-1)*log(θ) ; curve(h(x),0,3) # -log(事後分布カーネル)
h_dash <- function(θ) λ -(α-1)/θ # hの微分
hamiltonian <- function(p,θ) h(θ) + 1/2*p^2 # ポテンシャル + 運動量

p1=rnorm(1) # 初期値
θ1=2.5
.L=100
.ε=0.01
hmc3=function(L=.L,ε=.ε, p1, θ1){
p=θ=H=numeric(L)
p[1]=p1; θ[1]=θ1 ; H[1]=hamiltonian(p1,θ1)
for (i in 1:L){
θ[i+1] = θ[i] + ε*(p[i] - 0.5*ε*h_dash(θ[i]))
p[i+1] = (p[i] - 0.5*ε*h_dash(θ[i])) - 0.5*ε*h_dash(θ[i+1])
H[i+1] = hamiltonian(p[i+1],θ[i+1])
}
r=exp(H[1]-H[L+1])
prob=min(1,r)
choice=c(θ[L+1],θ[1])
θL <- sample(choice,1,replace=TRUE,prob=c(prob,1-prob))
acpt <- as.numeric(θL==θ[L+1]) # 受理されたか
pθa <- c(p[L+1],θL,acpt)
return(pθa)
}
hmc3(L=100,ε=0.01,p1=rnorm(1),θ1=2.5)

741:卵の名無しさん
17/02/12 21:30:48.89 vF6uxTl/.net
T=1000

p=θ=acpt=numeric(T)
p[1]=p1
θ[1]=θ1
for(i in 1:T){
pth=hmc3(.L,.ε,p1,θ[i])
p[i+1] <- pth[1]
θ[i+1] <- pth[2]
acpt[i] <- pth[3]
p1 <- rnorm(1)
}
mean(acpt) # 受理率 1と良好

dev.off()
par(mfrow=c(2,1))
plot(p,type="l")
plot(θ,type="l")
dev.off()

θθ=seq(0.05,3,le=50)
pp=seq(-5,5,le=50)
z=outer(pp,θθ,hamiltonian)
persp(pp,θθ,z,theta=45,xlab="p",ylab="θ",zlab="Hamiltonian")
image(pp,θθ,z,xlab="p",ylab="θ",col=heat.colors(12,0.7))
contour(pp,θθ,z, add=TRUE)


742: points(p,θ,col=rgb(0.01,0.01,0.01,0.5)) lines(p,θ,col=rgb(0.01,0.01,0.01,0.3))>>995



743:卵の名無しさん
17/02/15 07:02:30.83 QuGCIlP+.net
東京慈恵会医科大学入試結果

2013-04-14 (日) 12:00
医学部入試
2013 | 東京慈恵会医科大学 | 繰上 | 補欠

URLリンク(igakubu-tajiri.com)
東京慈恵会医科大学の今年度入試の結果が判明しました。

2,781名の志願者に対して1次試験合格者は450名、
そしていわゆる正規合格者は155名でした。
.

正規合格にならなかったものの補欠となった受験生は239名でした。
2次試験受験者が424名でしたので2次試験を終えて
正規合格にも補欠にもなれなかった受験生は424名中30名でした。

239名の補欠者のうち繰り上げ合格となられた受験生は203名で
今年度の東京慈恵会医科大学の繰り上げ合格者は200名を超え
「多かった」という印象です。

744:卵の名無しさん
17/02/18 14:38:47.82 buTG/vvu.net
>>711
エクセルマクロ インフルエンザ確率計算.zip
URLリンク(xfs.jp)

745:卵の名無しさん
17/02/18 15:45:15.30 buTG/vvu.net
SEに頼んで院内LANから吸出してもらった。

エクセルマクロ インフルエンザ確率計算.zip
URLリンク(xfs.jp)

賞味期限ありw

746:卵の名無しさん
17/02/18 20:28:40.65 buTG/vvu.net
Y1=c(53.1,51.5,45.5,55.5,49.6,50.1,59.2,54.7,53.0,48.6,
55.3,54.6,51.7,48.6,56.4,58.9,53.3,42.4,51.9,39.1)
Y0=c(51.3,48.2,49.6,59.6,44.2,47.6,54.9,56.5,48.4,50.6,
53.6,57.5,52.0,46.9,56.8,50.0,53.8,38.3,52.6,41.0)
N=length(Y0)
(Y=cbind(Y0,Y1))
t.test(Y0,Y1,paired = TRUE)
fit635 <- stan('toyota622.stan',data=list('N','Y'),seed=1234,iter=11000,warmup=1000)
fit635
print(fit635,c("mu","rho","delta"),prob=c(.025,.5,.975))

traceplot(fit635,'delta')
ms=extract(fit635)
hist(ms$delta,freq=FALSE)
summary(ms$delta)
mean(ms$delta<0)
quantile(ms$delta,probs=c(0.025,0.50,0.975))
hist(ms$rho,freq=FALSE)
mean(ms$rho>0.5)
quantile(ms$rho,probs=c(0.025,0.50,0.975))

747:卵の名無しさん
17/02/19 05:59:48.47 Pf/sAEZx.net
// normal.stan
data{
int N;
real Y[N];
}

parameters{
real mu;
real<lower=0> sigma;
}

model{
mu ~ normal(0,100);
sigma ~ cauchy(0,5);
Y ~ normal(mu,sigma);
}

generated quantities{
real log_lik[N];
for(n in 1:N)
log_lik[n] = normal_lpdf(Y[n]|mu,sigma);
}

748:卵の名無しさん
17/02/19 09:38:35.83 Pf/sAEZx.net
Y1=c(53.1,51.5,45.5,55.5,49.6,50.1,59.2,54.7,53.0,48.6,
55.3,54.6,51.7,48.6,56.4,58.9,53.3,42.4,51.9,39.1)
Y0=c(51.3,48.2,49.6,59.6,44.2,47.6,54.9,56.5,48.4,50.6,
53.6,57.5,52.0,46.9,56.8,50.0,53.8,38.3,52.6,41.0)
n=length(Y0)
f=function() mean(sample(Y1,n,replace=TRUE) - sample(Y0,n,replace=TRUE))
r=replicate(10^6,f())
mean(r<0)

> meanCI(r<0)
lower mean upper
1 0.2717172 0.27259 0.2734628
> mean(r<0)
[1] 0.27259
> sd(r<0)
[1] 0.4452919
> meanCI(r<0)
lower mean upper
1 0.2717172 0.27259 0.2734628

749:卵の名無しさん
17/02/20 03:57:52.38 UcjtbCpN.net
//2x2.stan
data{
int<lower=0> N[2];
int n[2,2];
}

parameters{
simplex[2] p[2];
}

model{
for(i in 1:2){
for(j in 1:2){
n[i,j]~ binomial(N[j],p[j][i]);//Binom(N[2],p[2][i])
}
}
}

750:卵の名無しさん
17/02/20 03:58:05.69 UcjtbCpN.net
generated quantities{
real d;
real delta_over;
real p11;
real p10;
real p01;
real p00;
real RR;
real OR;
p11 = p[1][1];//介入あり効果あり、暴露あり病気あり
p10 = p[1][2];//介入あり効果なし、暴露あり病気なし
p01 = p[2][1];//介入なし効果あり、暴露なし病気あり
p00 = p[2][2];//介入なし効果なし、暴露なし病気なし
d = p11 - p01;//暴露あり病気あり割合-暴露なし病気あり割合
delta_over = step(d);
RR = p11/p01;
OR = (p11/p10)/(p01/p00);
}

751:卵の名無しさん
17/02/20 04:00:19.44 UcjtbCpN.net
library("rstan")
rstan_options(auto_write = TRUE)
options(mc.cores = parallel::detectCores())
model81=stan_model('2x2')
n=matrix(c(128,72,97,103),ncol=2,byrow=TRUE) ; n
N=apply(n,1,sum) ; N
data <- list(n=n,N=N)
fit81 <- sampling(model81,data=data,seed=123,iter=11000,warmup=1000)
print(fit81,digits=3, probs=c(.025,.975))
ms=rstan::extract(fit81)

Epi::twoby2(n)

752:卵の名無しさん
17/02/22 07:58:32.50 kWQWo38X.net
日本だけじゃないです、アメリカも完全な学歴社会です
アメリカ人上司も、親の執刀医が若くて心配だったから、ググって出身校調べたって
そして日本の場合は、入った大学がある程度の知的能力とどれだけ努力できたかを示してしまうのは事実
医師という職業が、あるレベル以上の知的能力と、一生勉強できる勤勉さが必要なの�


753:ェわかったからこそ、自分より下だといっぱいいっぱいなんでは?と思うのです



754:卵の名無しさん
17/02/22 18:54:45.42 kWQWo38X.net
data{
int N;
vector[3] x[N];
}
parameters{
vector[3] mu;
vector<lower=0>[3] sigma;
vector[3] rho; //rho[1]=ρ23,rho[2]=ρ13,rho[3]=ρ12
}
transformed parameters{
matrix[3,3] Sigma; //分散共分散行列
Sigma[1,1]=pow(sigma[1],2);
Sigma[2,2]=pow(sigma[2],2);
Sigma[3,3]=pow(sigma[3],2);
Sigma[1,2]=sigma[1]*sigma[2]*rho[3];
Sigma[2,1]=sigma[2]*sigma[1]*rho[3];
Sigma[1,3]=sigma[1]*sigma[3]*rho[2];
Sigma[2,3]=sigma[2]*sigma[3]*rho[1];
Sigma[3,1]=sigma[3]*sigma[1]*rho[2];
Sigma[3,2]=sigma[3]*sigma[2]*rho[1];
}
model{
x ~ multi_normal(mu,Sigma);
}
generated quantities{
real delta;
real delta_step;
delta=rho[1]-rho[3]; //ρ32-ρ12
delta_step=step(delta);
}

755:卵の名無しさん
17/02/23 13:44:28.88 RDO2DuIV.net
data{
int Ny;
vector[2] y[Ny];//y[1]:説明変数、y[2]:目的変数
int Nx;
real x[Nx];//目的変数欠損データ
}
parameters{
vector<lower=0>[2] mu;
vector<lower=0>[2] sig;
real<lower=-1,upper=1> rho;
}
transformed parameters{
matrix[2,2] Sigma;
Sigma[1,1] = pow(sig[1],2);
Sigma[2,2] = pow(sig[2],2);
Sigma[1,2] = sig[1]*sig[2]*rho;
Sigma[2,1] = sig[2]*sig[1]*rho;
}
model{
y ~ multi_normal(mu,Sigma);
x ~ normal(mu[1],sig[1]);// 欠損データの平均と分散は欠損していないペアと同じと仮定する
}

756:卵の名無しさん
17/02/26 22:00:49.92 +9rk+Hzi.net
data{
int N; # nrow(d) 29
int D; # ncol(d) 2
vector[D] Y[N];
}

parameters{
vector[D] mn;
cov_matrix[D] cov;
}

transformed parameters{
real rho;
rho = cov[1,2]/(sqrt(cov[1,1])*sqrt(cov[2,2]));
}

model{
Y ~ multi_normal(mn,cov);
}

757:卵の名無しさん
17/02/26 22:02:50.58 +9rk+Hzi.net
Y1=c(2051,2090,2200,2250,2260,2749,2813,2995,3014,3141,3180,3237,3284,3310,3400,3440,3580,3650,3660,3750,3755,3760,3770,3800,3800,3880,3890,3950,4565)
Y2=c(70,66,65,69,66,65,66,64,65,66,62,61,60,61,60,58,62,60,59,59,61,61,60,59,57,60,60,58,57)
Y=cbind(Y1,Y2)
N=nrow(Y)
D=ncol(Y)
data <- list(N=N,D=D,Y=Y)
fit92.siri2 <- sampling(model92,data=data,seed=1234)
print(fit92.siri2,probs=c(0.025,0.975),par=c('mn','rho'),digits=3)
cor.test(Y1,Y2)


mean se_mean sd 2.5% 97.5% n_eff Rhat
mn[1] 3283.506 2.937 135.547 3016.277 3550.073 2130 1.003
mn[2] 61.965 0.018 0.737 60.475 63.461 1755 1.003
rho -0.886 0.001 0.047 -0.952 -0.772 2315 1.001


cor.test(Y1,Y2)

Pearson's product-moment correlation

data: Y1 and Y2
t = -10.176, df = 27, p-value = 9.747e-11
alternative hypothesis: true correlation is not equal to 0
95 percent confidence interval:
-0.9477572 -0.7780874
sample estimates:
cor
-0.8906137

758:卵の名無しさん
17/03/06 16:06:15.28 Q2Cpe/w6.net
n=100
p=0.5
H=numeric(n)
for (r in 1:n)
H[r] = dnorm(r,n,p) *q*r + dnorm(r,n,p)*(n-r)
sum(H)=50

759:卵の名無しさん
17/03/06 20:35:56.42 Q2Cpe/w6.net
n=100
p=0.5
H=numeric(n)
for (r in 1:n)
H[r] = dbinom(r,n,p) *q*r + dbinom(r,n,p)*(n-r)
sum(H)=50

760:卵の名無しさん
17/03/24 20:14:19.77 ksHDOKNP.net
論理演算としては間違い。

ある行為が犯罪とされるためには、その行為が刑法が定める犯罪の型に合致し、かつ、違法であることが必要である。債務不履行は犯罪ではない。だから、債務不履行は刑法が定める犯罪の型に合致しないか、または、違法ではない

761:卵の名無しさん
17/03/28 06:59:39.19 MBECdDzo.net
URLリンク(unicorn.ike.tottori-u.ac.jp)

762:卵の名無しさん
17/04/09 21:12:23.06 sF6Wko2R.net
1.1 A
1.2 C
1.3 False
1.4
lymphoid B,D
myeloid A, C, E,F,G
1.5 B
1.6 False
1.7 A-2 B-3 C-4 D-1
1.8 C
1.9 central-A,D peripheral-B,C,E
1.10 A-3 B-1 C-2
1.11 D
1.12 cytotoxic helper
1.13 False
1.14 False
1.15 A
1.16 B
1.17 False

763:卵の名無しさん
17/04/10 05:42:53.83 nCVX6081.net
p=0.01
uniroot(f=function(n,p,u)choose(n,0)*p^0*(1-p)^n -u,p=0.01,u=1-0.99,c(10,1000))
# 0.99^n < 0.01
n=log(0.01)/log(0.99) ; n

764:卵の名無しさん
17/04/11 08:06:54.06 ddDem73K.net
下克上

765:卵の名無しさん
17/04/11 08:31:09.19 q2T7LqVO.net
実際医学部なんてカネ積めば、帝京とかのバカでもなれるからいても不思議じゃない

766:卵の名無しさん
17/04/11 11:07:33.43 sS8yn3pd.net
>>155
小学生新聞にすら載っているよ。

URLリンク(www.asagaku.com)

767:卵の名無しさん
17/04/14 23:55:20.92 yxuKA0eX.net
全身整形dollって言うブログ主、飛田新地の風俗上がりで医学部生らしい。

768:卵の名無しさん
17/04/15 10:46:50.54 /Ac2z1eL.net
>>743
そう思っていたのだが
2代目院長の息子はどこにも受からず老健の事務長だぜ。
寄付金をケチったのだろうな。

769:卵の名無しさん
17/04/15 15:32:41.93 /Ac2z1eL.net
ジェネラリストのための内科診断リファレンス: エビデンスに基づく究極の診断学をめざして
URLリンク(www.amazon.co.jp)

770:卵の名無しさん
17/04/15 19:28:17.15 /Ac2z1eL.net
# neck flexion test
TP=0.84 ; TN=0.48
(pLH=TP/(1-TN))
(nLH=(1-TP)/TN)
(DOR=pLH/nLH)

# jolt accentuation
TP=0.97 ; TN=0.60
(pLH=TP/(1-TN))
(nLH=(1-TP)/TN)
(DOR=pLH/nLH)

# Kernig test
TP=0.09 ; TN=0.999
(pLH=TP/(1-TN))
(nLH=(1-TP)/TN)
(DOR=pLH/nLH)

771:卵の名無しさん
17/04/21 18:27:17.55 i0yzIgcA.net
330 名前:卵の名無しさん[sage] 投稿日:2017/03/05(日) 09:19:33.48 ID:36bVdlBf
縁故加点や「任意」の寄付を絡めての定員外合格による入学を裏口入学としよう。
ド底辺特殊シリツ医大で裏口入学の割合を調査することにした。
卒業したことすら隠したいド底辺特殊シリツ医大であるため、裏口入学と本人が正直に答えるとは考えにくい。
そこで調査方法を次のようにすることにした。

本人だけがわかるようにコインを投げて

  表であれば正直に裏口か否かを答える

  裏であれば常に裏口であると答える

コインの裏表は本人しか知らず調査解析者には伝えられない。

100人を調査したところ90人が裏口であると答えた。
さて、このド底辺特殊シリツ医大の裏口入学確率とその95%信用区間はいくらか述べよ。

ド底辺ネタだと勉強する気が起きない人にはこんな問題にもできる。
同じ調査方法で女子高校生100人にエッチした経験はあるかの調査をして
50人が経験済みと答えた。経験確率の平均値とその95%信用区間はいくらか述べよ。
また、その最頻値と中央値も併せて答えよ。
経験確率密度をグラフ化してみた。
URLリンク(i.imgur.com)

772:卵の名無しさん
17/04/22 14:43:21.60 STcMEHHI.net
数学板のスレを改変
「ド底辺特殊シリツ医大が存在しなければ、日本は幸せになる」という命題があるとき、ド底辺特殊シリツ医大が存在しているならこの命題は必ず真である と言ってよいか?

773:卵の名無しさん
17/04/24 21:44:59.20 WAjEOgPG.net
# URLリンク(mathtrain.jp)
# 方法3:プログラミングで実験してみる
# 乱数を使って実際にモンティ・ホール問題を何回も試行してみる
F=function(){
n=100
f=function(){
d=integer(3)
w=sample(1:3,1)
d[w]=1
return(d)
}

g=function(x) replicate(x,f())
D=g(n)
C=f()
change=sum(apply(D-C,2,var))/n
no_change=(n-sum(apply(D-C,2,var)))/n
res=c(change,no_change)
return(res)
}

N=1000
Res=replicate(N,F())
par(mfrow=c(2,1))
hist(Res[1,],xlab="P(winner)",ylab="",main="Change",col="gray")
hist(Res[2,],xlab="P(Winner)",ylab="",main="No Change",col="gray")
summary(Res[1,])
summary(Res[2,])
#URLリンク(i.imgur.com)

774:卵の名無しさん
17/04/26 15:25:22.24 vNHKSJLD.net
ROLE AND LIMITATIONS OF STATISTICS
Much of medicine is inherently probabilistic. Not everyone with hypercholesterolemia
who is treated with a statin is prevented from having a myocardial
infarction, and not everyone not treated does have one, but statins reduce
the probability of a myocardial infarction in such patients. Because so much
of medicine is based on probabilities, studies must be performed on groups
of people to estimate these probabilities. Three component tasks of statistics
are: selecting a sample of subjects for study, describing the data from that
sample, and drawing inferences from that sample to a larger population of
interest.

775:卵の名無しさん
17/04/29 08:57:14.64 j6+oCrzG.net
.stan_code = ' data { int n_obs; real[n_obs] x; } parameters { real mu; real<lower=0> sigma; } model { x ~ normal(mu, sigma); }'

.model = rstan::stan_model(model_code=.stan_code)

776:卵の名無しさん
17/05/02 10:02:52.28 HeSMfHd3.net
NNT <- function(A,B,n,HR,cl=0.95){
b=n/(1+HR*A/B)
a=n-b
a=round(a)
b=round(b)
nnt=abs(1/(a/A-b/B))
print(fmsb::rateratio(a,b,A,B,conf.level = cl))
return(nnt)
}

NNT(364828/2,364828/2,961,0.61)
NNT(364828/2,364828/2,1334,0.49)
NNT(364828/2,364828/2,1983,0.54)

777:卵の名無しさん
17/05/02 20:01:30.83 JKlaPiZM.net
スレリンク(hosp板)

778:卵の名無しさん
17/05/03 17:52:45.47 NU8fdDNG.net
##差の信頼区間(生データなし)
DifCI=function(n1,n2,m1,m2,sd1,sd2){
pooledV=((n1-1)*sd1^2+(n2-1)*sd2^2)/(n1-1+n2-1)
SE12=sqrt((1/n1+1/n2)*pooledV)
w=qt(.975,n1-1+n2-1)*SE12
ci=c(m1-m2-w,m1-m2+w)
names(ci)=c("lower","upper")
return(ci)
}
DifCI(100,100,82,81,3,3)

# t検定(生データなし)
T.test=function(n1,n2,m1,m2,sd1,sd2){
SE12=sqrt((1/n1+1/n2)*((n1-1)*sd1^2+(n2-1)*sd2^2)/((n1-1)+(n2-1)))
T=(m1-m2)/SE12
2*pt(abs(T),n1-1+n2-1,lower.tail = FALSE)
}
T.test(100,100,82,81,3,3)*2

779:卵の名無しさん
17/05/03 17:53:27.39 NU8fdDNG.net
# A君の彼女は女子大生、B君の彼女は女子高生。
# Y1女子大生n1=100人とY2女子高生n2=100人の胸囲を測定して
# 前者が平均82 , 標準偏差3
# 後者が平均81 , 標準偏差3
# であったとする。

n=100
set.seed(123)
Y1=82+scale(rnorm(n))*3
set.seed(123)
Y2=81+scale(rnorm(n))*3
t.test(Y1,Y2,var=TRUE)
DifCI(100,100,82,81,3,3)

N=10000 # N回比較を
FF=function(d,Y1,Y2,N=10000){
f=function(d) sample(Y1,1)-sample(Y2,1) >= d
mean(replicate(N,f(d)))
}
FF(5,Y2,Y1)
FF(0,Y2,Y1)

NN=1000 #NN回繰り返す
BJK=replicate(NN,FF(5,Y2,Y1)) # 女子高生>女子大生 バスト差>5cm 8%
quantile(BJK,c(.025,.5,.975))

BJD=replicate(NN,FF(5,Y1,Y2)) # 女子大生>女子高生 バスト差>5cm 17%
quantile(BJD,c(.025,.5,.975))

780:卵の名無しさん
17/05/04 17:29:43.66 6FvZGmBc.net
## m sd SEM n
non=c(0.52,0.25,0.027,88)
rec=c(0.38,0.32,0.034,89)
eli=c(0.40,0.26,0.048,28)

# 生データなしで分散分析
lh=rbind(non,rec,eli)
colnames(lh)=c("m","sd","SEM","n") ; lh
mean.G=sum(lh[,"m"]*lh[,"n"])/sum(lh[,"n"])
SS.bit=sum((lh[,"m"]-mean.G)^2*lh[,"n"])
SS.wit=sum(lh[,"sd"]^2*(lh[,"n"]-1))
df.bit=nrow(lh)-1
df.wit=sum(lh[,"n"]-1)
MS.bit=SS.bit/df.bit
MS.wit=SS.wit/df.wit
F.ratio=MS.bit/MS.wit
pf(F.ratio,df.bit,df.wit,lower.tail=FALSE) # 0.003720507
(η2=(SS.bit)/(SS.bit+SS.wit)) # 0.05387927

781:卵の名無しさん
17/05/04 18:33:14.57 6FvZGmBc.net
//2x2.stan
data{
int<lower=0> N[2]; //行毎の標本和((介入+対照))
int n[2,2];// 行:介入の有無、列:結果の有無
}

parameters{
simplex[2] p[2];//ex. 総和sum(p[1]=1)となる確率のベクトル
}

model{
for(i in 1:2){//行
for(j in 1:2){//列
n[i,j]~ binomial(N[i],p[i][j]);//ex. n[1,2] ~ Binom(N[1],p[1][2])
}//行ごと(=介入群、対照群ごと)に二項分布
}
/*
n[1,1] ~ binomial(N[1],p[1][1]);
n[1,2] ~ binomial(N[1],p[1][2]);
n[2,1] ~ binomial(N[2],p[2][1]);
n[2,2] ~ binomial(N[2],p[2][2]);
*/
}

782:卵の名無しさん
17/05/04 18:33:21.26 6FvZGmBc.net
generated quantities{
real d;
real delta_over;
real p11;
real p10;
real p01;
real p00;
real RR;
real OR;
p11 = p[1][1];//介入あり効果あり、(暴露あり病気あり)
p10 = p[1][2];//介入あり効果なし、(暴露あり病気なし)
p01 = p[2][1];//介入なし効果あり、(暴露なし病気あり)
p00 = p[2][2];//介入なし効果なし、(暴露なし病気なし)
d = p11 - p01;//暴露あり病気あり割合-暴露なし病気あり割合
delta_over = step(d);// ifelse(d>0,1,0)に相当
RR = p11/p01;
OR = (p11/p10)/(p01/p00);
}

783:卵の名無しさん
17/05/04 18:33:49.02 6FvZGmBc.net
library("rstan")
rstan_options(auto_write = TRUE)
options(mc.cores = parallel::detectCores())

options(scipen = 10)

# UC Berkeley gender bias
# Men 8442 44%
# Women 4321 35%

n = matrix(round(c(8442*.44,8442*.56,4321*.35,4321*.65)),ncol=2,byrow=TRUE) ; n
N=apply(n,1,sum) ; N
data <- list(n=n,N=N)
model2x2=stan_model('2x2.stan')
fit2x2 <- sampling(model2x2,data=data,seed=1234)

print(fit2x2,pars=c('d','RR','OR'),digits_summary=dig,probs=c(.025,.975))
stan_dens(fit2x2,pars=c('d','RR','OR'),separate_chains = TRUE)

Epi::twoby2(n)
fisher.test(n)
prop.test(n[,1],c(8442,4321),correct=FALSE)

784:卵の名無しさん
17/05/06 13:29:42.65 NK3Wh0hW.net
/*
Y1女子大生n1=100人とY2女子高生n2=100人の胸囲を測定して
前者が平均82 , 標準偏差3
後者が平均81 , 標準偏差3
*/
data{
real<lower=0> D;
}

parameters{
real<lower=0> Y1;
real<lower=0> Y2;
}

transformed parameters{
real d;
d = Y1 - Y2;
}
model{
Y1 ~ normal(82,3);
Y2 ~ normal(81,3);
}

generated quantities{
real JD;
real JK;
JD = step(d - D);
JK = step(-d - D);
}

785:卵の名無しさん
17/05/06 13:30:05.47 NK3Wh0hW.net
library("rstan")
rstan_options(auto_write = TRUE)
options(mc.cores = parallel::detectCores())

D=5
data <- list(D=D)
boobs.model=stan_model('boobs.stan')
fit.boobs <- sampling(boobs.model,data=data, seed=1234,iter=15000,warmup=5000)
print(fit.boobs,pars=c('d','JD','JK'),probs=c(.025,.5,.975),digits=3)
stan_dens(fit.boobs,pars=c('d'),separate_chains = TRUE)

pnorm(-5,1,sqrt(3^2+3^2))
pnorm(5,1,sqrt(3^2+3^2),lower=FALSE)

786:卵の名無しさん
17/05/07 17:03:41.37 zx28gyz5.net
# 帰無仮説RR=xとした時のp値を返す
rr2p=function(a,N1,b,N0,x){ # a,N1:介入群 b,N0:対象群 N1,N0は各群総数
RR=(a/N1)/(b/N0)
SE=sqrt(1/a-1/N1+1/b-1/N0)
pu=(1-pnorm(log(x/RR)/SE))*2
pl=(1-pnorm(-log(x/RR)/SE))*2
p.value=ifelse(pl<=1,pl,pu)
return(p.value)
}

# St.Jhon's Wart
a=12 ; N1=59
b=5 ; N0=50

rr=(a/N1)/(b/N0) ; rr
prr1=rr2p(a,N1,b,N0,1) ; prr1

curve(rr2p(a,N1,b,N0,x),0.1,10,log="x",lwd=2, xlab="帰無仮説のリスク比(log目盛)",ylab="p値")

abline(h=0.05,lty=3,col=2)
abline(v=1,lty=3,col='gray')
abline(v=rr,lty=3,col=4)

l.05=uniroot(function(x)rr2p(a,N1,b,N0,x)-0.05,c(0.5,1.0))$root
points(l.05,0.05,pch=19)
u.05=uniroot(function(x)rr2p(a,N1,b,N0,x)-0.05,c(5,10))$root
points(u.05,0.05,pch=19)
text(l.05,0.05+0.02,round(l.05,2))
text(u.05,0.05+0.02,round(u.05,2))
points(1,prr1)
text(1,prr1+0.02,round(prr1,2))
text(rr,0,round(rr,3))

787:卵の名無しさん
17/05/10 22:14:20.37 trFWFCkB.net
There is no reason for national medical school gradutates to envy uraguchi bona fide morons who bought their way into the bottom medical school.

No offense, but a grim reality.
There is nothing to be more ashamed among doctors than buying their way into the bottom medical school.
Owing to this original sin, they cannot even name their honorable alma mater.

In order to keep their self-esteem, these moronic graduates cannot help but call other genuine doctors charlatans against their better judgement. What a pity!
The bottom line is that it sucks to be an uraguchi.

If any doctor tells that he will see a patient immediately when he cannot, the patient will label him a liar.
The doctor of his word won't behave in such a dishonest way.
If one insists that he can name ten of his classmates when he actually cannot, he will be a liar.

As for the uraguchi graduates, it seems to be intolerably dishonorable to uncover their alma mater.
Far more dishonorable than being a liar.

URLリンク(i.imgur.com)


There will be no English response from bona fide morons suffering EBMS(Expellee from Bottom Medical School) Syndrome.

Last but not least,
it is not the bottom medical school but its enrollee that is despicable, which deserves to be called a bona fide moron beyond redemption.

788:卵の名無しさん
17/05/11 19:03:05.80 /tTz9Crr.net
製薬会社の説明会ではよく大規模スタディの解析結果がよく提示される。
大規模試験でp<0.001が示されると、それだけ信頼できると騙される医者が多すぎ。
まあ、臨床に統計は必要ないというド底辺特殊シリツ医大卒は問題外だが。

"統計的有意差というものは、薬が持っている本来の力と会社の努力を掛け合わせた結果である"
とは母校の薬理の教授(故人)の名言。

EMPA-REG OUTCOME試験では10mg,25mg単独では有意差が示せず双方を単純に足し算して有意差ありと算出して宣伝した。
# Subjects CVD events % HR p value 95%CI
# Placebo 2333 282 12.1
# Empagliflozin 10mg 2345 243 10.4 0.85 0.07 0.72-1.01
# Empagliflozin 25mg 2342 247 10.5 0.86 0.09 0.73-1.02
# Empagliflozin 10mg+25mg 4687 490 10.5 0.86 0.04 0.74-0.99

10mg錠vsプラセボのデータを比率のままで何倍になれば有意になるかを求めると
1.15倍と計算できた。
グラフにしてみた。
URLリンク(i.imgur.com)

大規模スタディとは数多く集めないと統計的有意差がでないような薬効の検証試験。
スカイダイビングにパラシュート着用が死亡率を低下させるかどうかを証明するのに大規模試験は不要w
ド底辺特殊シリツ医大卒が国立卒より低学力であるのは>29と>30の投稿を比較するだけでEvident.

789:卵の名無しさん
17/05/11 20:50:15.65 /tTz9Crr.net
# Normal Ratio Distribution

dGRD <- function(w,mx,sx,my,sy,d){
a=sqrt(w^2/sx^2-2*d*w/sx/sy+1/sy^2)
b=mx*w/sx^2 -d*(mx+my*w)/mx/my + my/sy^2
c=mx^2/sx^2 -2*d*mx*my/sx/sy+ my^2/sy^2
d=exp((b^2-c*a^2)/2*a^2/(1-d^2)/a^2)
pw=b*d/a^3/sqrt(2*pi)/sx/sy*(pnorm(b/a/sqrt(1-d^2))-pnorm(-b/a/sqrt(1-d^2))) + sqrt(1-d^2)/pi/sx/sy/a^2*exp(-c/2/sqrt(1-d^2))
return(pw)
}

mx=15
sx=1
my=10
sy=1
d=0

N=10000

X=scale(rnorm(N))*sx+mx
Y=scale(rnorm(N))*sy+my
hist(X/Y, freq=FALSE,breaks=50,col='lightblue',main='Gaussian ratio distribution')
curve(dGRD(x,mx,sx,my,sy,d),add=TRUE,lwd=2)

790:卵の名無しさん
17/05/12 06:02:32.57 e0eXW0W5.net
データをプールして求めたサマリー感度は62.3%(95%信頼区間57.9-66.6%)で、サマリー特異度は98.2%(23.8-98.7%)。これらの値を基に計算した陽性尤度比は34.5(23.8-45.2)、陰性尤度比は0.38(0.34-0.43)になった。

791:卵の名無しさん
17/05/12 06:32:32.16 e0eXW0W5.net
Data Synthesis:

159 studies evaluated 26 RIDTs, and 35% were conducted during the H1N1 pandemic. Failure to report whether results were assessed in a blinded manner and the basis for patient recruitment were important quality concerns.
The pooled sensitivity and specificity were 62.3% (95% CI, 57.9% to 66.6%) and 98.2% (CI, 97.5% to 98.7%), respectively.
The positive and negative likelihood ratios were 34.5 (CI, 23.8 to 45.2) and 0.38 (CI, 0.34 to 0.43), respectively.

Sensitivity estimates were highly heterogeneous, which was partially explained by lower sensitivity in adults (53.9% [CI, 47.9% to 59.8%])
than in children (66.6% [CI, 61.6% to 71.7%]) and a higher sensitivity for influenza A (64.6% [CI, 59.0% to 70.1%) than for influenza B (52.2% [CI, 45.0% to 59.3%).

792:卵の名無しさん
17/05/12 06:51:38.84 e0eXW0W5.net
そういえば薬の説明会に某社のMRがマスクをしてきて社内でインフルエンザが流行っているといってたな。
先週の当直でも近くの老健でも入所者や職員にインフレンザがくすぶっていた。

793:卵の名無しさん
17/05/13 09:05:01.10 QvHCxQMI.net
ci.pLH <- function (a, b, c, d, cl = 0.95) { # a:TP b:FP c:FN d:TP
LH = (a/(a+c))/(b/(b+d)) # TP/FP
Z = qnorm(1 - (1 - cl)/2) # 1.96
RRL = LH * exp(-Z * sqrt(1/a - 1/(a+c) + 1/b - 1/(b+d)))
RRU = LH * exp( Z * sqrt(1/a - 1/(a+c) + 1/b - 1/(b+d)))
CI = c(LH,RRL, RRU)
return(CI)
}

ci.nLH = function (a, b, c, d, cl = 0.95)
{
LH = (c/(a+c))/(d/(b+d)) # FN/TN
Z = qnorm(1 - (1 - cl)/2)
RRL = LH * exp(-Z * sqrt(1/c - 1/(a+c) + 1/d - 1/(b+d)))
RRU = LH * exp( Z * sqrt(1/c - 1/(a+c) + 1/d - 1/(b+d)))
CI = c(LH, RRL, RRU)
return(CI)
}

794:卵の名無しさん
17/05/13 15:58:10.20 6ps0P3Xn.net
//2x2CI.stan

data{
int<lower=0> N[2]; //行毎の標本和((疾病+対照))
int n[2,2];// 行:疾病の有無、列:所見の有無
}

parameters{
simplex[2] p[2];//ex. 総和sum(p[1]=1)となる確率のベクトル
}

model{
for(i in 1:2){//行
for(j in 1:2){//列
n[i,j]~ binomial(N[i],p[i][j]);//ex. n[1,2] ~ Binom(N[1],p[1][2])
}//行ごと(=疾病群、対照群ごと)に二項分布
}
/*
n[1,1] ~ binomial(N[1],p[1][1]);
n[1,2] ~ binomial(N[1],p[1][2]);
n[2,1] ~ binomial(N[2],p[2][1]);
n[2,2] ~ binomial(N[2],p[2][2]);
*/
}

795:卵の名無しさん
17/05/13 15:58:27.22 6ps0P3Xn.net
generated quantities{
real p11;
real p10;
real p01;
real p00;
real sn; //sensitivity
real sp; //specificity
real pLH;//positive likelihood ratio
real nLH;//negative likelihood ratio
real DOR; //diagnostic odds ratio
p11 = p[1][1];//TP 疾病あり所見あり
p10 = p[1][2];//FN 疾病あり所見なし
p01 = p[2][1];//FP 疾病なし所見あり
p00 = p[2][2];//TN 疾病なし所見なし
sn = p11/(p11+p10);
sp = p00/(p00+p01);
pLH = sn/(1-sp);
nLH = (1-sn)/sp;
DOR = pLH/nLH;
}

796:卵の名無しさん
17/05/13 16:04:29.69 6ps0P3Xn.net
n=matrix(c(a,b,c,d),ncol=2) ; n
N=apply(n,1,sum) ; N
data <- list(n=n,N=N)

model.2x2CI <- stan_model('2x2CI.stan')
fit.2x2CI <- sampling(model.2x2CI, data=data, pars=c('sn','sp','pLH','nLH','DOR'),seed=1234,iter=20000)
fit.2x2CI
pars=c('sn','sp','pLH','nLH')
print(fit.2x2CI,pars=pars,prob=c(.025,.5,.975),digits=3)
stan_dens(fit.2x2CI,pars=c('sn','sp','pLH','nLH'),separate_chains = TRUE)
stan_hist(fit.2x2CI,pars=pars,bins=20)
stan_trace(fit.2x2CI)
stan_ac(fit.2x2CI)

797:卵の名無しさん
17/05/14 12:35:35.94 75s6edjB.net
 日本大学板橋病院(東京都、平山篤志院長)で2015~16年、患者3人に対し鎮静剤プレセデックスなどの投与ミスが4件相次いで起きたことが同大学への取材でわかった。
このうち1件では患者が一時心肺停止になった。
 同病院は現在、プレセデックスの使用を停止し、薬の知識不足が背景にあるとして、医師や研修医に危険薬の使用方法を記した冊子の携帯を義務づけるなどの対策をとったという。
厚生労働省が関係者から事情を聴いている。
 日大によると、誤投与が起きたのはいずれも救命救急センター。
15年7月、入院中の70代男性に対し、看護師が医師の指示を受けずにプレセデックスの急速投与を実施し、一時心肺停止になった。
プレセデックスの添付文書では、緩やかな持続投与が厳守とされている。男性は16年9月に口腔(こうくう)底がんで死亡したが、「薬が死亡の原因ではない」としている。
16年5月には、救急搬送された80代男性に対し、研修医がプレセデックスの急速投与を指示し、看護師が実施。
さらに16年12月にも入院していた当時2歳の女児に対し、看護師が点滴の設定を誤り通常の10倍のプレセデックスを投与し、
別の看護師がミスに気づいて投与を中止。
約10日後には、研修医の誤った指示で解熱剤アセリオが過量投与された。
この3件について「健康被害はなかった」としている。

同病院は大学広報を通じ、「病院としてはあってはならないことで深くおわびする。再発防止策を講じている」とコメントした。(小川裕介)


URLリンク(www.asahi.com)

798:卵の名無しさん
17/05/14 12:39:20.08 75s6edjB.net
URLリンク(i.imgur.com)

799:卵の名無しさん
17/05/15 19:25:44.29 k0A2P6EO.net
If, however, one uses the limits only to determine whether the null point lies inside or outside the confidence interval, one is only performing a significance test.
It is lamentable to go to the trouble to calculate confidence limits and then use them for nothing more than classifying the study finding as statistically significant or not.
One should instead remember that the precise locations of confidence limits are not important for proper interpretation.
Rather, the limits should serve to give one a mental picture of the location and spread of the entire P-value function.

800:卵の名無しさん
17/05/15 19:28:09.11 k0A2P6EO.net
The likelihood of a specified parameter value given observed data
is defined as the probability of the observed data given that the true parameter equals the specified parameter value.

801:卵の名無しさん
17/05/18 19:01:17.64 zeLyudIO.net
URLリンク(www.ncbi.nlm.nih.gov)

> T_test <- function(n1,n2,m1,m2,sd1,sd2) {
+ pt(abs(m1-m2)/sqrt((1/n1+1/n2)*((n1-1)*sd1^2+(n2-1)*sd2^2)/((n1-1)+(n2-1))),n1+n2-2,lower.tail = FALSE)*2
+ }
>#J(^o^)PAN-2 twilight shift
> n1=85
> n2=93
> m1=c(4.4,2.8,3.1,3.0,15.6,2.9,14.1,NA,NA)
> sd1=c(0.16,0.09,0.08,0.07,1.01,0.74,0.43,NA,NA)
> m2=c(3.9,2.7,3.2,2.9,15.3,2.9,14.0,NA,NA)
> sd2=c(0.15,0.08,0.07,0.07,0.98,0.78,0.37,NA,NA)
> mapply(T_test,n1,n2,m1,m2,sd1,sd2)
[1] 0.000000000000000000000000000000000000000000000000003703796
[2] 0.000000000000396558043165599381357777630796590528916567564
[3] 0.000000000000000700365485362126109119065842101292673760327
[4] 0.000000000000000013582277683810314731008284105939765140647
[5] 0.045913211951356974749316464112780522555112838745117187500
[6] 1.000000000000000000000000000000000000000000000000000000000
[7] 0.097289391439183053877925999586295802146196365356445312500
[8] NA
[9] NA

802:卵の名無しさん
17/05/19 12:06:12.42 ZXFvL/T2.net
Stay1=c(1691,0,4,7,13,165)
Stay0=c(1702,0,4,8,16,320)
Fever1=c(1691,0,1,2,4,49)
Fever0=c(1702,0,1,2,5,50)
IP=rbind(Stay1,Stay0,Fever1,Fever0)
colnames(IP)=c('N','Min','lwrQ','Med','uprQ','Max')
IP
Stay=IP[1:2,]
Fever=IP[3:4,]

ns=round(Stay1[1]/4)
sty1=c(sample(Stay1[2]:Stay1[3],ns,replace=TRUE),
sample(Stay1[3]:Stay1[4],ns,replace=TRUE),
sample(Stay1[4]:Stay1[5],ns,replace=TRUE),
sample(Stay1[5]:Stay1[6],ns,replace=TRUE))
hist(sty1);quantile(sty1)

ns=round(Stay0[1]/4)
sty0=c(sample(Stay0[2]:Stay0[3],ns,replace=TRUE),
sample(Stay0[3]:Stay0[4],ns,replace=TRUE),
sample(Stay0[4]:Stay0[5],ns,replace=TRUE),
sample(Stay0[5]:Stay0[6],ns,replace=TRUE))
hist(stay0);quantile(stay0)
wilcox.test(sty0,sty1, correct=FALSE)
wilcox.test(sty0,sty1, correct=TRUE)

803:卵の名無しさん
17/05/19 12:07:30.81 ZXFvL/T2.net
Sim_fever=function(){
ns=round(Fever1[1]/4)
fev1=c(sample(Fever1[2]:Fever1[3],ns,replace=TRUE),
sample(Fever1[3]:Fever1[4],ns,replace=TRUE),
sample(Fever1[4]:Fever1[5],ns,replace=TRUE),
sample(Fever1[5]:Fever1[6],ns,replace=TRUE))
#hist(fev1); quantile(fev1)

ns=round(Fever0[1]/4)
fev0=c(sample(Fever0[2]:Fever0[3],ns,replace=TRUE),
sample(Fever0[3]:Fever0[4],ns,replace=TRUE),
sample(Fever0[4]:Fever0[5],ns,replace=TRUE),
sample(Fever0[5]:Fever0[6],ns,replace=TRUE))
#hist(fev0); quantile(fev0)

wilcox.test(fev0,fev1,correct=FALSE)$p.value
}
N=1000
Res=replicate(N,Sim_fever())
hist(Res,freq=FALSE,breaks=30,col='lightblue')
lines(density(Res))
mean(Res<0.05)

804:卵の名無しさん
17/05/19 13:13:42.81 ZXFvL/T2.net
###分位数に適合するシミュレーション
library(exactRankTests)
par(mfrow=c(2,1))

Stay1=c(N=1691,Min=0,lwrQ=4,Med=7,uprQ=13,Max=165)
Stay0=c(N=1702,Min=0,lwrQ=4,Med=8,uprQ=16,Max=320)

ns=round(Stay1[1]/4)
sty1=c(sample(Stay1[2]:Stay1[3],ns,replace=TRUE),
sample(Stay1[3]:Stay1[4],ns,replace=TRUE),
sample(Stay1[4]:Stay1[5],ns,replace=TRUE),
sample(Stay1[5]:Stay1[6],ns,replace=TRUE))
hist(sty1,breaks=50,xlim=c(0,320),main='prayed');quantile(sty1)


ns=round(Stay0[1]/4)
sty0=c(sample(Stay0[2]:Stay0[3],ns,replace=TRUE),
sample(Stay0[3]:Stay0[4],ns,replace=TRUE),
sample(Stay0[4]:Stay0[5],ns,replace=TRUE),
sample(Stay0[5]:Stay0[6],ns,replace=TRUE))
hist(sty0,breaks=100,main='control');quantile(sty0)

par(mfrow=c(1,1))
plot(density(sty0),lty=2)
lines(density(sty1))

wilcox.test(sty0,sty1, correct=FALSE)
wilcox.test(sty0,sty1, correct=TRUE)
exactRankTests::wilcox.exact(sty0,sty1)

805:卵の名無しさん
17/05/19 18:29:04.26 NEqlWULX.net
Stay1=c(N=1691,Min=0,lwrQ=4,Med=7,uprQ=13,Max=165)
Stay0=c(N=1702,Min=0,lwrQ=4,Med=8,uprQ=16,Max=320)
Sim_Stay<-function(){
ns=round(Stay1[1]/4)
sty1=c(sample(Stay1[2]:Stay1[3],ns,replace=TRUE),
sample(Stay1[3]:Stay1[4],ns,replace=TRUE),
sample(Stay1[4]:Stay1[5],ns,replace=TRUE),
sample(Stay1[5]:Stay1[6],ns,replace=TRUE))
# hist(sty1,breaks=50,xlim=c(0,320),main='prayed');quantile(sty1)

ns=round(Stay0[1]/4)
sty0=c(sample(Stay0[2]:Stay0[3],ns,replace=TRUE),
sample(Stay0[3]:Stay0[4],ns,replace=TRUE),
sample(Stay0[4]:Stay0[5],ns,replace=TRUE),
sample(Stay0[5]:Stay0[6],ns,replace=TRUE))
# hist(sty0,breaks=100,main='control');quantile(sty0)
wilcox.exact(sty0,sty1)$p.value
}
N=10000
Res=replicate(N,Sim_Stay())
hist(Res,freq=FALSE,col='lightgreen',breaks=100)
lines(density(Res),add=TRUE)
mean(Res<0.05)
max(Res)

806:卵の名無しさん
17/05/20 10:52:57.73 GAnNqfB7.net
Physician age and outcomes in elderly patients in hospital in the US:
observational study
URLリンク(www.bmj.com)
のTable 2のデータを用いて
コクラン・アーミテージ検定をしてみる。

adms=c(309020,280894,115660,30963)
p


807:hys=c(10177,8016,3331,1086) mort=c(.108,.111,.113,.121) deat=round(mort*adms) #Cochran-Armitage Cochran_Armitage<-function(ri,ni,xi=seq_along(ri)){ # ri:患者 ni:総数 xi:病状指標 O<-sum(ri*xi) r<-sum(ri);n<-sum(ni) E<-r*sum(ni*xi)/n V<-r*(n-r)/(n^3)*(n*sum(ni*xi^2)-sum(ni*xi)^2) Z<-(O-E)/sqrt(V) p<-2*pnorm(abs(Z),lower.tail=FALSE) return(p) } Cochran_Armitage(deat,adms) > Cochran_Armitage(deat,adms) [1] 5.095712e-14



808:卵の名無しさん
17/05/20 14:36:09.48 MCXaCATK.net
裏口バカにはコメントできないであろう数式をドヤ顔で再掲してみよう。

検査前確率(有病率)pとして
オッズx=p/(1-p)
感度y, 特異度zとする。

陽性適中率PPV=ω(x,y,z)=xy/(xy+1-z)

偏微分すると
∂ω/∂x=(1-z)y/(xy+1-z)^2
∂ω/∂y=(1-z)y/(xy+1-z)^2
∂ω/∂z=xy/(xy+1-z)^2
すべて0<z<1ゆえ、いずれも正値なのは自明

同様に、

陰性適中率NPV=μ(x,y,z)=z/(z+x(1-y))

∂μ/∂x=-z(1-y)/[z+(1-y)]^2 <0 (∵0<感度y<1)
∂μ/∂y=xz/[z+x(1-y)]^2
∂μ/∂z=x(1-y)/[z+x(1-y)]^2

オッズ上昇(有病率上昇)すれば陰性的中率が低下するという直観の数式での裏付け。

809:卵の名無しさん
17/05/20 23:15:33.12 MCXaCATK.net
curve(dnorm(x,qnorm(0.005)),-5,5,lty=3,ann=FALSE)
curve(dnorm(x),add=TRUE)
abline(v=0,col='gray')


cp=qlnorm(0.005,lower=FALSE) ; cp
curve(dlnorm(x+cp),-cp,20-cp,lty=2,ann=FALSE)
abline(v=cp-cp,col='gray')
curve(dnorm(x+cp,cp)*dlnorm(exp(-1))/dnorm(0),add=TRUE)
legend('center',bty='n',legend=c('慶応','川崎'),lty=1:2)

810:卵の名無しさん
17/05/21 08:20:47.66 4c3djdui.net
NNF <- function(p,conf.level=0.95){
alpha=1-conf.level
q=1-p
log(alpha)/log(q) # q^x < alpha
}

NNF(1/100,0.95)
NNF(1/1000,0.99)

811:卵の名無しさん
17/05/22 07:16:18.24 5XKSKW8x.net
これって名投稿だと感心する。

私は昭和の時代に大学受験したけど、昔は今よりも差別感が凄く、慶応以外の私立医は特殊民のための特殊学校というイメージで開業医のバカ息子以外は誰も受験しようとすらしなかった。
常識的に考えて、数千万という法外な金を払って、しかも同業者からも患者からもバカだの裏口だのと散々罵られるのをわかって好き好んで私立医に行く同級生は一人もいませんでした。
本人には面と向かっては言わないけれど、俺くらいの年代の人間は、おそらくは8-9割は私立卒を今でも「何偉そうなこと抜かしてるんだ、この裏口バカが」と心の底で軽蔑し、嘲笑しているよ。当の本人には面と向かっては絶対にそんなことは言わないけどね。

>同業者からも患者からもバカだの裏口だのと散々罵られるのをわかって好き好んで私立医に行く

同業者の発言:
【ウハも】 開業医達の集い 8診 【粒も】 [無断転載禁止]&#169;2ch.net

670 名前:卵の名無しさん[] 投稿日:2017/05/20(土) 11:15:40.12 ID:46exOAAP
学会で川崎の医者が発表してたら、「馬鹿が何偉そうにしゃべってる。」と思う自分が嫌になるが、
これだけは学生時代から続く反射なので止められない。


患者の発言:
【医療】医者は患者にコレを言われると、内心ものすごくムッとする★4 [無断転載禁止]&#169;2ch.net

810 名前:名無しさん@1周年[] 投稿日:2017/05/21(日) 00:11:22.04 ID:+h+2h2fq0
旧帝医卒の医者が(患者としては嫌だが)
多少偉そうにしているのはわからんでもないが

底辺私立に偉そうにされたら
そりゃ患者としてはむかつくだろww
(unquote)

Last but not least,

it is not the kickass bottom medical school but its enrollee that is despicable, which deserves to be called a bona fide moron beyond redemption.
ド底辺シリツ医大が悪いんじゃない、本人の頭が悪いんだ。

812:卵の名無しさん
17/05/24 14:21:19.79 olQQP7cX.net
   女  男
若 15  5
老 3 10

813:卵の名無しさん
17/05/24 15:47:07.57 Yzk6zYd9O
高見 博 やりチン
高見真理 やりまん

814:卵の名無しさん
17/05/25 13:31:59.33 SNaobD6X.net
死亡患者数 総患者数 医師数
女性医師 46007 415605 18751
男性医師 137811 1199399 39593

死亡患者数/Dr 総患者数/Dr
女性医師 2.45 22.16
男性医師 3.48 30.29

815:卵の名無しさん
17/05/25 13:41:48.70 SNaobD6X.net
記載から逆算して
       死亡患者数    総患者数    医師数
女性医師  46007         415605      18751
男性医師  137811        1199399      39593

を医師数を無視してカイ二乗検定すると

2-sample test for equality of proportions without continuity
correction

data: c(M1[1, 1], M1[2, 1]) out of c(M1[1, 2], M1[2, 2])
X-squared = 54.01, df = 1, p-value = 0.0000000000001994
alternative hypothesis: two.sided
95 percent confidence interval:
-0.005312783 -0.003089587
sample estimates:
prop 1 prop 2
0.1106989 0.1149000
で有意となり、 生存率差の95%信用区間もアブストラクトの95%CI, -0.57% to -0.28%;とほぼ一致。

816:卵の名無しさん
17/05/26 12:02:28.96 5I65LkQjY
毎日新聞社
URLリンク(www.mainichi.co.jp)

817:卵の名無しさん
17/05/26 16:45:01.86 g0v5lQqI.net
10 13
15 6

818:卵の名無しさん
17/05/28 04:15:53.81 23SWWCfN.net
A little old lady goes to the doctor and says, "Doctor I have this problem with gas, but it really doesn't bother me too much.
They never smell and are always silent.
As a matter of fact I've farted at least 20 times since I've been here in your office. You didn't know I was farting because they didn't smell and are silent".
The doctor says, "I see. Take these pills and come back to see me next week."
The next week the lady goes back, "Doctor" she says, "I don't know what the heck you gave me, but now my farts... although still silent they stink terribly."
"Good" the doctor said, “now that we've cleared up your sinuses, let's work on your hearing!"

819:卵の名無しさん
17/05/28 09:12:32.95 sdpbW2IZ.net
これって名投稿だと感心する。

私は昭和の時代に大学受験したけど、昔は今よりも差別感が凄く、慶応以外の私立医は特殊民のための特殊学校というイメージで開業医のバカ息子以外は誰も受験しようとすらしなかった。
常識的に考えて、数千万という法外な金を払って、しかも同業者からも患者からもバカだの裏口だのと散々罵られるのをわかって好き好んで私立医に行く同級生は一人もいませんでした。
本人には面と向かっては言わないけれど、俺くらいの年代の人間は、おそらくは8-9割は私立卒を今でも「何偉そうなこと抜かしてるんだ、この裏口バカが」と心の底で軽蔑し、嘲笑しているよ。当の本人には面と向かっては絶対にそんなことは言わないけどね。

>同業者からも患者からもバカだの裏口だのと散々罵られるのをわかって好き好んで私立医に行く

同業者の発言:
【ウハも】 開業医達の集い 8診 【粒も】 [無断転載禁止]&#169;2ch.net

670 名前:卵の名無しさん[] 投稿日:2017/05/20(土) 11:15:40.12 ID:46exOAAP
学会で川崎の医者が発表してたら、「馬鹿が何偉そうにしゃべってる。」と思う自分が嫌になるが、
これだけは学生時代から続く反射なので止められない。


患者の発言:
【医療】医者は患者にコレを言われると、内心ものすごくムッとする★4 [無断転載禁止]&#169;2ch.net

810 名前:名無しさん@1周年[] 投稿日:2017/05/21(日) 00:11:22.04 ID:+h+2h2fq0
旧帝医卒の医者が(患者としては嫌だが)
多少偉そうにしているのはわからんでもないが

底辺私立に偉そうにされたら
そりゃ患者としてはむかつくだろww
(unquote)

Last but not least,

it is not the kickass bottom medical school but its enrollee that is despicable, which deserves to be called a bona fide moron beyond redemption.
ド底辺シリツ医大が悪いんじゃない、本人の頭が悪いんだ。

820:卵の名無しさん
17/05/28 09:12:56.33 sdpbW2IZ.net
10 5
6 8

821:卵の名無しさん
17/05/28 18:57:09.64 1dIxNVDD.net
##
RR=OR*(1-P1) + P1
OR=(RR-P1)/(1-P1) # P1:暴露群でのイベント発生率=a/(a+b)
P1=(OR-RR)/(OR-1)

RR=OR/(OR*P0 + 1-P0)
OR=(1-P0)*RR/(1-P0*RR) # P0:非暴露群でのイベント発生率=c/(c+d)
P0=(OR-RR)/(OR-1)/RR

RR2ORp1 <- function(RR,P1) (RR-P1)/(1-P1) # P1:暴露群でのイベント発生率=a/(a+b)
RR2ORp0 <- function(RR,P0) (1-P0)*RR/(1-P0*RR) # P0:非暴露群でのイベント発生率=c/(c+d)

R2p1 <- function(RR,OR) (OR-RR)/(OR-1)
R2p0 <- function(RR,OR) (OR-RR)/(OR-1)/RR

822:卵の名無しさん
17/05/28 21:57:18.59 1dIxNVDD.net
data{
int N;
int nor[N];
int S;
int sou[S];
}
parameters{
real<lower=0,upper=1> pn;
real<lower=0,upper=1> ps;
}
model{
for(i in 1:N)
nor[i] ~ bernoulli(pn);
for(j in 1:S)
sou[j] ~ bernoulli(ps);
}
generated quantities{
real OR;
real RR;
RR = pn/ps;
OR = (pn/(1-pn))/(ps/(1-ps));
}

823:卵の名無しさん
17/05/28 21:58:03.99 1dIxNVDD.net
N=50662
n=12
S=6151
s=0

nor=c(rep(1,n),rep(0,N-n))
sou=rep(0,S)

model.tsuda=stan_model('tsuda.stan')
data=list(N=N,nor=nor,S=S,sou=sou)
fit.tsuda <- sampling(model.tsuda, data=data, seed=1234, iter=20000)
print(fit.tsuda,probs=c(.025,.5,.975))

824:卵の名無しさん
17/05/29 23:45:42.11 DAm6Bi0e.net
c(10/100 , 25/200, 35/300)
c(25/150 , 10/300, 35/450)
c(35/250 , 35/500)

825:卵の名無しさん
17/05/31 14:41:43.84 1PckSUIM.net
#多重比較
.m=matrix(c(10,25,20,5,100,200,150,250),ncol=2)
colnames(.m)=c('生存','受持')
rownames(.m)=c('若女','老女','若男','老男')
.m ; prop.test(.m)$p.value
.g=matrix(c(.m[1,1]+.m[2,1],.m[3,1]+.m[4,1],.m[1,2]+.m[2,2],.m[3,2]+.m[4,2]),2)
colnames(.g)=c('生存','受持')
rownames(.g)=c('女','男')
.g ; prop.test(.g)$p.value
.a=matrix(c(.m[1,1]+.m[3,1],.m[2,1]+.m[4,1],.m[1,2]+.m[3,2],.m[2,2]+.m[4,2]),2)
colnames(.a)=c('生存','受持')
rownames(.a)=c('若','老')
.a ; prop.test(.a)$p.value

生存率=round(.m[,1]/.m[,2],3)
cbind(.m,生存率)

prop.test(.g)
prop.test(.a)
prop.test(.m)

826:卵の名無しさん
17/06/01 08:30:15.28 lqqHYMnI.net
# 多重比較
.m=matrix(c(10,25,20,5,100,200,150,250),ncol=2)
colnames(.m)=c('生存','受持')
rownames(.m)=c('若女','老女','若男','老男') ; .m
prop.test(.m[,1],.m[,2])$p.value
.mm=cbind(.m[,1],.m[,2]-.m[,1])
colnames(.mm)=c('生存','死亡')
.mm
prop.test(.mm)$p.value
fisher.test(.mm)$p.value

cbind(.m,生存率=round(.m[,1]/.m[,2],3))

.g=matrix(c(.m[1,1]+.m[2,1],.m[3,1]+.m[4,1],.m[1,2]+.m[2,2],.m[3,2]+.m[4,2]),2)
colnames(.g)=c('生存','受持') ; rownames(.g)=c('女','男') ; .g
.gg=cbind(.g[,1],.g[,2]-.g[,1])
colnames(.gg)=c('生存','死亡') ; .gg
prop.test(.gg)$p.value
fisher.test(.gg)
cbind(.g,生存率=round(.g[,1]/.g[,2],3))

.a=matrix(c(.m[1,1]+.m[3,1],.m[2,1]+.m[4,1],.m[1,2]+.m[3,2],.m[2,2]+.m[4,2]),2)
colnames(.a)=c('生存','受持') ; rownames(.a)=c('若','老') ; .a
.aa=cbind(.a[,1],.a[,2]-.a[,1])
colnames(.aa)=c('生存','死亡') ; .aa
prop.test(.aa)$p.value
fisher.test(.aa)
cbind(.a,生存率=round(.a[,1]/.a[,2],3))

827:卵の名無しさん
17/06/01 08:30:52.40 lqqHYMnI.net
prop.test(.gg)
prop.test(.aa)
prop.test(.mm)

fisher.test(.gg)
fisher.test(.aa)
fisher.test(.mm)

pairwise.prop.test(.mm) # Matrix : success,failure
pairwise.prop.test(.m[,1],.m[,2]) # Vector : success,trial
pairwise.prop.test(.m[,1],.m[,2],p.adjust='bon')
pairwise.prop.test(.m[,1],.m[,2],p.adjust='none')

library(fmsb)
fisher.test(.mm)
pairwise.fisher.test(.mm,p.adjust='holm')
pairwise.fisher.test(.m[,1],.m[,2],p.adjust='holm')
pairwise.fisher.test(.m[,1],.m[,2],p.adjust='bon')
pairwise.fisher.test(.m[,1],.m[,2],p.adjust='none')
pairwise.fisher.test(.mm,p.adjust='holm')

828:卵の名無しさん
17/06/03 06:14:04.74 fHjCdMkb.net
身体診察の教科書において最高峰として名高い『Sapira's Art and Science of Bedside Diagnosis』
にこんな記述がある。

More than 100 books and thousands of articles have been published on EBM.
It has been subjected to major criticism, including the observation that it is not itself evidence based, in that there is no convincing evidence that physicians using it provide any better care than those who do not.

Perhaps the most balanced definition is that EBM constitutes “methods of incorporating epidemiologic evidence into clinical practice” (Cohen et al., 2004).

829:卵の名無しさん
17/06/06 00:38:28.52 vZoASpBs.net
Three business men were sitting in a bar, drinking and discussing how stupid their wives were.
The first says, "I tell you, my wife is so stupid. Last week she went to the supermarket and bought $300 worth of meat because it was on sale, and we don't even have a fridge big enough to keep it in!"
The second agrees that she sounds pretty thick, but says his wife is thicker. "Just last week, she went out and spent $17,000 on a new car," he laments, "and she doesn't even know how to drive!"
The third, a blond male, nods sagely and agrees that these two women sound like they both walked through the stupid forest and got hit by every branch.
However, he still thinks his wife is dumber. "I have to laugh when I think about it," he chuckles.
"Last week my wife left on a vacation to Greece. I watched her packing her bags and she must have taken at least five boxes of condoms with her. She doesn't even have a penis!"

830:卵の名無しさん
17/06/06 13:15:54.93 S1GvLqu2.net
There is no reason for national medical school gradutates to envy uraguchi bona fide morons who bought their way into the bottom medical school.

No offense, but a grim reality.
There is nothing to be more ashamed among doctors than buying their way into the bottom medical school.
Owing to this original sin, they cannot even name their honorable alma mater.

In order to keep their self-esteem, these moronic graduates cannot help but call other genuine doctors charlatans against their better judgement. Uraguchi is an albatross in their neck. What a pity!
The bottom line is , it sucks to be an uraguchi.


If any doctor tells that he will see a patient immediately when he cannot, the patient will label him a liar.
The doctor of his word won't behave in such a dishonest way.
If one insists that he can name ten of his classmates when he actually cannot, he will be a liar.

As for the uraguchi graduates, it seems to be intolerably dishonorable to uncover their alma mater.
Far more dishonorable than being a liar.

URLリンク(i.imgur.com)


There will be no English response from bona fide morons suffering EBMS(Expellee from Bottom Medical School) Syndrome.

Last but not least,
it is not the bottom medical school but its enrollee that is despicable, which deserves to be called a bona fide moron beyond redemption.

831:卵の名無しさん
17/06/06 14:12:24.95 S1GvLqu2.net
There is no reason for national medical school gradutates to envy uraguchi bona fide morons who bought their way into the bottom medical school.

No offense, but a grim reality.
There is nothing to be more ashamed among doctors than buying their way into the bottom medical school.
Owing to this original sin, they cannot even name their honorable alma mater.

In order to keep their self-esteem, these moronic graduates cannot help but call other genuine doctors charlatans against their better judgement. Uraguchi is an albatross about their neck. What a pity!
The bottom line is , it sucks to be an uraguchi.


If any doctor tells that he will see a patient immediately when he cannot, the patient will label him a liar.
The doctor of his word won't behave in such a dishonest way.
If one insists that he can name ten of his classmates when he actually cannot, he will be a liar.

As for the uraguchi graduates, it seems to be intolerably dishonorable to uncover their alma mater.
Far more dishonorable than being a liar.

URLリンク(i.imgur.com)


There will be no English response from bona fide morons suffering EBMS(Expellee from Bottom Medical School) Syndrome.

Last but not le

832:卵の名無しさん
17/06/06 17:44:53.81 7iJ9wwby.net


833:卵の名無しさん
17/06/06 17:45:02.59 7iJ9wwby.net
There is no reason for national medical school gradutates to envy uraguchi bona fide morons who bought their way into the bottom medical school.

No offense, but a grim reality.
There is nothing to be more ashamed among doctors than buying their way into the bottom medical school.
Owing to this original sin, they cannot even name their honorable alma mater.

In order to keep their self-esteem, these moronic graduates cannot help but call other genuine doctors charlatans against their better judgement. Uraguchi is an albatross about their neck. What a pity!
The bottom line is , it sucks to be an uraguchi.


If any doctor tells that he will see a patient immediately when he cannot, the patient will label him a liar.
The doctor of his word won't behave in such a dishonest way.
If one insists that he can name ten of his classmates when he actually cannot, he will be a liar.

As for the uraguchi graduates, it seems to be intolerably dishonorable to uncover their alma mater.
Far more dishonorable than being a liar.

URLリンク(i.imgur.com)


There will be no English response from bona fide morons suffering EBMS(Expellee from Bottom Medical School) Syndrome.

Last but not least,
it is not the bottom medical school but its enrollee that is despicable, which deserves to be called a bona fide moron beyond redemption.

834:卵の名無しさん
17/06/07 13:22:39.80 eJruhvi4.net
findings=c('RS','EFEG','EREG','EAG','EHG','EE&EG','ERHG','ECG','NG','RAC','FP','HP','XA')
# Red Sreak, Endoscopic Flat Erosive Gastritis, Endoscopic Raised Erosive Gastritis,
# Endscopic Atrophic Gastritis, Endoscopic Hemorrhagick Gastritis,Endoscopic Erythematic&Exudative Gastritis,
# Endospopic Rugae Hypertrophic Gastritis,Endoscopic Congestive Gastritis,
# Nodular Gastritis, Regular Arrangement of Collecting venules,
# Fundic Polyp, Hyperplastic Polyp, Xanthoma

neg=c(111,10,28,9,14,0,0,0,0,231,24,0,0) # ピロリ陰性のとき所見が陽性であった患者数
NEG=278    # ピロリ陰性患者総数
pos=c(6,11,9,70,2,37,16,19,6,30,1,6,6) # ピロリ陽性性のとき所見が陽性であった患者数
POS=140    # ピロリ陽性患者総数

#所見陽性をピロリ陽性と判定すると
py_neg NEG FP py_pos POS TP p.value pLR nLR DOR
RS 111 278 0.399 6 140 0.043 0.000 0.107 1.593 0.067
EFEG 10 278 0.036 11 140 0.079 0.067 2.184 0.956 2.285
EREG 28 278 0.101 9 140 0.064 0.237 0.638 1.041 0.613
EAG 9 278 0.032 70 140 0.500 0.000 15.444 0.517 29.889
EHG 14 278 0.050 2 140 0.014 0.075 0.284 1.038 0.273
EE&EG 0 278 0.000 37 140 0.264 0.000 Inf 0.736 Inf
ERHG 0 278 0.000 16 140 0.114 0.000 Inf 0.886 Inf
ECG 0 278 0.000 19 140 0.136 0.000 Inf 0.864 Inf
NG 0 278 0.000 6 140 0.043 0.001 Inf 0.957 Inf
RAC 231 278 0.831 30 140 0.214 0.000 0.258 4.647 0.055
FP 24 278 0.086 1 140 0.007 0.002 0.083 1.087 0.076
HP 0 278 0.000 6 140 0.043 0.001 Inf 0.957 Inf
XA 0 278 0.000 6 140 0.043 0.001 Inf 0.957 Inf

835:卵の名無しさん
17/06/07 13:27:35.29 eJruhvi4.net
#所見陽性をピロリ非感染陽性と判定すると
py_neg NEG TP py_pos POS FP p.value pLR nLR DOR
RS 111 278 0.399 6 140 0.043 0.000 9.317 0.628 14.844
EFEG 10 278 0.036 11 140 0.079 0.067 0.458 1.046 0.438
EREG 28 278 0.101 9 140 0.064 0.237 1.567 0.961 1.630
EAG 9 278 0.032 70 140 0.500 0.000 0.065 1.935 0.033
EHG 14 278 0.050 2 140 0.014 0.075 3.525 0.963 3.659
EE&EG 0 278 0.000 37 140 0.264 0.000 0.000 1.359 0.000
ERHG 0 278 0.000 16 140 0.114 0.000 0.000 1.129 0.000
ECG 0 278 0.000 19 140 0.136 0.000 0.000 1.157 0.000
NG 0 278 0.000 6 140 0.043 0.001 0.000 1.045 0.000
RAC 231 278 0.831 30 140 0.214 0.000 3.878 0.215 18.021
FP 24 278 0.086 1 140 0.007 0.002 12.086 0.920 13.134
HP 0 278 0.000 6 140 0.043 0.001 0.000 1.045 0.000
XA 0 278 0.000 6 140 0.043 0.001 0.000 1.045 0.000

836:卵の名無しさん
17/06/08 20:02:57.03 c2IUt8h2.net
昼休みの製薬会社の説明会はリリカOD錠の説明だったのだが
パンフレットにあったこの論文は面白かった。

Pharmacotherapy for neuropathic pain in adults: a systematic review and meta-analysis
成人の神経痛に対する薬物療法のシステムレビューとメタ解析

Lancet Neurol. 2015 February ; 14(2): 162?173
URLリンク(www.thelancet.com)(14)70251-0.pdf
で無料で読める(Isn't youの語学力では無理だが)

面白いのが、forrest plotの横軸がリスク比でなくNNTで作成されていたこと。
更に、NNTだけでなく、NNHまでも記載記載してあった。
NNH(Numbers Needed to Harm)は、有害事象(眠気等のことか?)により1名の脱落者がでるのに必要な投与患者数として計算されていた。

薬理をいくら学んでも臨床試験をして統計解析しない限り
この数字は出て来ないんだな。

自分なりに大雑把に要約すると
15人投与して2人がプラセボを超えた効果、1人が有害事象により投与中止となる
と理解した。

こういう理解を背景に個々の患者に処方するかを判断するのが
Evidence Based Medicineなんだな。

837:卵の名無しさん
17/06/10 06:33:00.80 v2BE3SGi.net
スレリンク(hosp板:670番)

2 ID:h7TtrsH7(16/29)
0670 卵の名無しさん 2017/02/01 20:57:44
>>657

自分で名誉毀損するのが柔整

柔整の品性
URLリンク(i.imgur.com)
URLリンク(i.imgur.com)

838:卵の名無しさん
17/06/10 07:25:39.72 v2BE3SGi.net
要約するとこうなるね。


知識の欠如
URLリンク(i.imgur.com)

遵法精神の欠如
URLリンク(imagizer.imageshack.com)
URLリンク(imagizer.imageshack.com)

品性の欠如
URLリンク(i.imgur.com)
URLリンク(i.imgur.com)

839:卵の名無しさん
17/06/10 19:33:44.38 S6rQfr0d.net
低血糖でも半身麻痺など脳卒中様の症状をきたすことがあるので
 50%ブドウ糖を50mL投与するまえ脳卒中と診断するな
という有名な臨床格言(Clinical Pearl)があるんだが、
ド底辺シリツの医者はそれも知らずに救急をやっているよ。
URLリンク(i.imgur.com)

そのうち事故を起こすだろうなと思っていたら
URLリンク(i.imgur.com)

これも表にでた分だからもっとひどいのは隠蔽されていると俺は思っている。

840:卵の名無しさん
17/06/10 23:38:30.47 S6rQfr0d.net
URLリンク(community.cochrane.org)

841:卵の名無しさん
17/06/12 07:51:11.39 1A86sl0D.net
イベント発生率が小さければ観察研究での曝露オッズ比は母集団でのリスク比を反映する

842:卵の名無しさん
17/06/12 15:08:00.40 ykGM4sCC.net
Statutory rape, Evan.

Twenty years behind bars.

And that's just for one of us.

And I'm not planning on taking a shower.

I have evidence.

843:卵の名無しさん
17/06/12 16:30:02.06 ykGM4sCC.net
このスレに登場する柔整の紹介
(捏造ではなくエビデンスなのでコピペはご自由に)


知識の実態
URLリンク(i.imgur.com)
URLリンク(i.imgur.com)

遵法精神の実態
URLリンク(imagizer.imageshack.com)
URLリンク(imagizer.imageshack.com)

品性の実態
URLリンク(i.imgur.com)
URLリンク(i.imgur.com)

844:卵の名無しさん
17/06/16 12:14:53.90 dVYxVdFb.net
【なんでも】接骨院の謎【捻挫】に登場する柔整の紹介


知識の実態

柔整が薬理を書くと医師法違反
URLリンク(i.imgur.com)

EBMには薬理と代謝が必須+Drag Delivery System
URLリンク(i.imgur.com)

有資格者のはずなのに複雑骨折=開放骨折を理解していない
URLリンク(i.imgur.com)


遵法精神の実態
保険の不正使用をそそのかすのも説明しているから良心的
URLリンク(imagizer.imageshack.com)
同意したら患者が悪い
URLリンク(imagizer.imageshack.com)

品性の実態
整形外科には治せず、柔整には治せる外傷の例示を求められての汚言
URLリンク(i.imgur.com)
URLリンク(i.imgur.com)

845:卵の名無しさん
17/06/17 19:02:01.03 WGpntzk/.net
MASS::area(function(x) (1-x)^N, 0,1)
F=function(x) -1/(N+1)*(1-x)^(N+1)
F(1)-F(0)

846:卵の名無しさん
17/06/17 19:02:50.51 WGpntzk/.net
pL=uniroot(function(x) dbinom(0,N,x) - 0.975, c(0,0.5))$root
pM=uniroot(function(x) dbinom(0,N,x) - 0.50, c(0,0.5))$root
pU=uniroot(function(x) dbinom(0,N,x) - 0.025, c(0.5,1))$root
round(c(pL,pM,pU),4)

dbinom(0,N,pL) ; dbinom(0,N,pM); dbinom(0,N,pU)

Mean=MASS::area(function(x)dbinom(0,N,x),0,1) ; Mean

847:卵の名無しさん
17/06/17 23:53:04.73 WGpntzk/.net
NNF <- function(p,conf.level=0.95){
alpha=1-conf.level
q=1-p
log(alpha)/log(q) # q^x < alpha
}

NNF(1/100,0.95)
NNF(1/1000,0.99)

848:卵の名無しさん
17/06/18 06:34:11.33 nxMdZkja.net
【なんでも】接骨院の謎【捻挫】に登場する、書けば書くほど墓穴を掘る、自己名誉毀損派の柔道整復師=墓穴師または墓穴術師の御紹介

<知識の実態>

柔整が薬理を書くと医師法違反
  URLリンク(i.imgur.com)
EBMには薬理と代謝が必須+Drag Delivery System
  URLリンク(i.imgur.com)
有資格者のはずなのに複雑骨折=開放骨折を理解していない
  URLリンク(i.imgur.com)
引用元もないのに引用、名前も挙げられないのに高名
  URLリンク(imagizer.imageshack.com)
アクセス限定のフェイスブックの記述を根拠にする
  URLリンク(imagizer.imageshack.com)

<遵法精神の実態>
保険の不正使用をそそのかすのも説明しているから良心的
  URLリンク(imagizer.imageshack.com)
同意したら患者が悪い
  URLリンク(imagizer.imageshack.com)
不正使用をそそのかせて患者に責任を転嫁する素晴らしい制度
  URLリンク(i.imgur.com)

<品性の実態>
整形外科には治せず、柔整には治せる外傷の例示を求められての汚言
  URLリンク(i.imgur.com)
  URLリンク(i.imgur.com)

849:卵の名無しさん
17/06/18 06:39:30.50 dqXZYzZO.net
柔整の狩場=患者を獲物と見做す表現、まさに獣性

URLリンク(imagizer.imageshack.com)

850:卵の名無しさん
17/06/18 11:18:09.53 nxMdZkja.net
柔道整復師の自己名誉毀損=墓穴術症例集

<知識の実態>
柔整が薬理を書くと医師法違反
  URLリンク(i.imgur.com)
EBMには薬理と代謝が必須+Drag Delivery System
  URLリンク(i.imgur.com)
有資格者のはずなのに複雑骨折=開放骨折を理解していない
  URLリンク(i.imgur.com)
引用元もないのに引用、名前も挙げられないのに高名
  URLリンク(imagizer.imageshack.com)
アクセス限定のフェイスブックの記述を根拠にする
  URLリンク(imagizer.imageshack.com)

<遵法精神の実態>
保険の不正使用をそそのかすのも説明しているから良心的
  URLリンク(imagizer.imageshack.com)
同意したら患者が悪い
  URLリンク(imagizer.imageshack.com)
不正使用をそそのかせて患者に責任を転嫁する素晴らしい制度
  URLリンク(i.imgur.com)

<品性の実態>
整形外科には治せず、柔整には治せる外傷の例示を求められての汚言
  URLリンク(i.imgur.com)
  URLリンク(i.imgur.com)
柔整の狩場=患者を獲物と見做す表現、まさに獣性
  URLリンク(imagizer.imageshack.com)

851:卵の名無しさん
17/06/18 16:17:56.30 nxMdZkja.net
# NN(100)個中当たりSS個、N(5)個サンプルしてS個当たりからSSを推測する。
foo <-function(SS,NN=100,N=5){
YY=c(rep(1,SS),rep(0,NN-SS))
return(sum(sample(YY,N)))
}
ss=0:100
S=0
k=10^4
SS=NULL
for(i in 1:k){
x=sapply(ss,foo)
SS=c(SS,which(x==S)-1)
}
hist(SS,freq=FALSE,col='lightblue', main='')
lines(density(SS),lwd=2,lty=3)
summary(SS)
MAP(SS)[1]
quantile(SS,c(0.025,0.50,0.975))

> summary(SS)
Min. 1st Qu. Median Mean 3rd Qu. Max.
0.00 4.00 10.00 13.56 20.00 89.00
> MAP(SS)[1]
x
1.547634
> quantile(SS,c(0.025,0.50,0.975))
2.5% 50% 97.5%
0 10 45
URLリンク(i.imgur.com)

852:卵の名無しさん
17/06/19 18:21:45.58 eYxkRSpz.net
URLリンク(imagizer.imageshack.com)

853:卵の名無しさん
17/06/22 08:24:48.90 0Y8JUQjF.net
NNF <- function(p,conf.level=0.95){
alpha=1-conf.level
q=1-p
log(alpha)/log(q) # q^x < alpha
}

N2P <- function(n,conf.level=0.95){
alpha=1-conf.level
p=1-alpha^(1/n)
P=1/p
return(P)
}

P2conf <- function(n,P){
p=1/P
alpha=(1-p)^n
conf=1-alpha
return(conf)
}

854:卵の名無しさん
17/06/23 18:58:08.79 ApSIiVYz.net
URLリンク(imagizer.imageshack.com)

855:卵の名無しさん
17/06/23 19:22:35.12 ApSIiVYz.net
rule of 3 で近似できる証明

α=1-0.95
(1-pU)^n=α
n*log(1-pU)=log(α) (式1)
テイラー展開
log(1+x) = x -x^2/2 + x^3/3 - x^4/4 + x^5/5 +....
x=-pUとおいて
log(1-pU)= -pU -pU^2/2 -pU^3/3 -pU^4/4 - pU^5/5 -....
pU≒0なら log(1-pU)≒-pU
(式1)に代入すると
n*(-pU)=log(α)
期待値n*pU = - log(α)
> -log(0.05)
[1] 2.995732

856:卵の名無しさん
17/06/24 07:14:42.02 fHNHVNUO.net
巨匠墓穴師>26に曰く
墓穴師なら墓穴学に辿り着けるか?
と言う話なんだけど、実はすべての墓穴が辿り着けるわけではなく、辿り着けない墓穴師も居るわけね。

その巨匠墓穴師の到達点がこれw
>くも膜下出血は外力では発生しないんだけどね?w
URLリンク(imagizer.imageshack.com)

857:卵の名無しさん
17/06/24 20:39:18.39 fHNHVNUO.net
 何度も書くが、脳出血疑いを早期診断に回さずに柔整が5日も抱えるのを同業者は正しい行為だと考えているのだろうか?
転倒の原因が脳出血によるものだった可能性もあるのに。
(再掲)
> 私が遭遇した例で良ければ使っていいぞ。
> 転倒した際に頭部打撲、本人は頸部の痛みで来院、受傷即日。
> 一応、神経症状無し、転倒五日目に脳外科受診を指示、当日CTにて脳内出血を確認
> 根拠はあり、この辺で反応が出ると見たうえでの対診だけどね。

URLリンク(imagizer.imageshack.com)

転倒5日めまで脳外科受診を勧めなかった根拠は何?

脳出血を疑えば医師なら即、CT/MRIをオーダーする。画像検査なしで何日も経過をみたりしない。

> 根拠はあり、この辺で反応が出ると見た

というのだから、きちんとしたエビデンスが示せるんだろ?

858:卵の名無しさん
17/06/25 04:37:41.29 SwCGqXcl.net
 何度も書くが、
 「くも膜下出血は外力では発生しな�


859:「んだけどね?w」 という知識レベルで 脳出血疑いを早期診断に回さずに柔整が5日も抱えるのを同業者は正しい行為だと考えているのか? 転倒の原因が脳出血によるものだった可能性もあるのに。 (再掲) > 私が遭遇した例で良ければ使っていいぞ。 > 転倒した際に頭部打撲、本人は頸部の痛みで来院、受傷即日。 > 一応、神経症状無し、転倒五日目に脳外科受診を指示、当日CTにて脳内出血を確認 > 根拠はあり、この辺で反応が出ると見たうえでの対診だけどね。 http://imagizer.imageshack.com/img922/6201/R3mtdT.jpg 転倒5日めまで脳外科受診を勧めなかった根拠は何? 脳出血を疑えば医師なら即、CT/MRIをオーダーする。画像検査なしで何日も経過をみたりしない。 > 根拠はあり、この辺で反応が出ると見た というのだから、きちんとしたエビデンスが示せるんだろ?



860:卵の名無しさん
17/06/25 08:28:37.56 fTlrn71o.net
 何度も書くが、
 「くも膜下出血は外力では発生しないんだけどね?w」
という知識レベルで 脳出血疑いを早期診断に回さずに柔整が5日も抱えるのを同業者は正しい行為だと考えているのか?
転倒の原因が脳出血によるものだった可能性もあるのに。

> 私が遭遇した例で良ければ使っていいぞ。
> 転倒した際に頭部打撲、本人は頸部の痛みで来院、受傷即日。
> 一応、神経症状無し、転倒五日目に脳外科受診を指示、当日CTにて脳内出血を確認
> 根拠はあり、この辺で反応が出ると見たうえでの対診だけどね。

URLリンク(imagizer.imageshack.com)

転倒5日めまで脳外科受診を勧めなかった根拠は何?

脳出血を疑えば医師なら即、CT/MRIをオーダーする。画像検査なしで何日も経過をみたりしない。
> 根拠はあり、この辺で反応が出ると見た
と書いた根拠を尋ねているだけだぞ。
何での答えられないんだ?

861:卵の名無しさん
17/06/26 00:44:09.71 FUJX41xR.net
柔整は保険が扱えることでミニドクターにでもなったつもりなのか、
「くも膜下出血は外力では発生しないんだけどね?w」という程度の誤知識しかない勘違い野郎が、
脳出血の転帰を画像診断すらせずに予測するとかいう独善「医療」を展開して患者を危険に晒す。

保険を扱えることで正しい医学知識を弁えた人間が治療に当たっていると患者も誤解する。

柔整への保険適応を外すのが社会正義に思えてきた。

URLリンク(imagizer.imageshack.com)
脳出血を疑えば医師なら即、CT/MRIをオーダーする。
画像検査なしで何日も経過をみたりしない。
この症例は転倒の原因が脳出血によるものだった可能性もある。

862:卵の名無しさん
17/06/26 07:34:15.57 T1YyhOds.net
柔整は保険が扱えることでミニドクターにでもなったつもりなのか、
「くも膜下出血は外力では発生しないんだけどね?w」という程度の誤知識しかない勘違い野郎が、
脳出血の転帰を画像診断すらせずに予測するとかいう独善「医療」を展開して患者を危険に晒す。

柔整が保険を扱えることで正しい医学知識を弁えた人間が治療に当たっていると患者も誤解する。

柔整への保険適応を外すのが社会正義に思えてきた。

URLリンク(imagizer.imageshack.com)
脳出血を疑えば医師なら即、CT/MRIをオーダーする。
画像検査なしで何日も経過をみたりしない。
この症例は転倒の原因が脳出血によるものだった可能性もある。

863:卵の名無しさん
17/06/26 08:41:12.78 FUJX41xR.net
Wikipediaで沖縄の医介輔を調べるとこんな記述が
>資格には「一代限り」、「現地開業」などの条件が付いており[1]、さらに抗生物質や麻酔薬を自由に使えないこと(後に制限解除)、手術が行えないなどの制限もあった。

この記述に従うと、制度廃止前には抗生物質や麻酔薬も使えていたことになる。
今の柔道整復師よりも行える医療の範囲が広いと思える。
医介輔に脱臼整復やマッサージを禁じる条項はなさそうだし。

医師の充足とともに消滅した資格である。

864:卵の名無しさん
17/06/26 18:40:54.65 3+F1lMYo.net
>残念ながらド底辺特殊シリツ医大卒の裏口バカなのでとは付言できなかったw  その点、ド底辺は有利だなwwww

この当直の極意(=馬鹿のふりをしてリスクを避ける)の英訳を試みてみる。

試訳 playing uraguchi to count on

Google和訳 数え上げるウラグチを演奏する

拙訳:裏口馬鹿のふりをして当てにされないようにする

そのGoogle 英訳

Do not pretend to be counted on behind the back door pretending to be an idiot


参考英熟語

playing hard to get

what girls do when they want a guy but don't want to seem too easy to get..but sometimes it's not even worth it, because the guy might just give up. believe me.

shelly: what happened with you and brandon ?

samantha: i was playing hard to get, and he gave up. i guess i kept it up for too long

865:卵の名無しさん
17/06/27 06:46:37.83 H9+CPd7+.net
整形外科は手を出さず、勘違い柔整が手を出す傷病が脳出血と明らかになったな。

整形外科には治せず、柔整には治せる外傷の例示を求められての汚言
  URLリンク(i.imgur.com)
  URLリンク(i.imgur.com)

脳出血を画像診断に委ねず放置するのが柔整術? 

URLリンク(imagizer.imageshack.com) 
URLリンク(imagizer.imageshack.com)

866:卵の名無しさん
17/06/27 07:12:46.13 H9+CPd7+.net
402 卵の名無しさん sage 2017/06/20(火) 16:30:28.56 ID:AQI57Ggp.net
くも膜下出血は外力では発生しないんだけどね?w
何で一緒にするわけ?w

もう少し、妥当な例出した方がいいよw
直達外力、介達外力で発生する重篤な症例上げないとw

私が遭遇した例で良ければ使っていいぞ。
転倒した際に頭部打撲、本人は頸部の痛みで来院、受傷即日。
一応、神経症状無し、転倒五日目に脳外科受診を指示、当日CTにて脳内出血を確認
根拠はあり、この辺で反応が出ると見たうえでの対診だけどね。

もう一例、お風呂場のタイルを掃除をしていて下を向いて顔をあげたら頸部の痛み。
第一中手指関節掌部側に疼痛、屈曲傷害。
一週間後に転医を指示。
これなんだと思う?w

867:卵の名無しさん
17/06/27 07:14:00.05 H9+CPd7+.net
420 卵の名無しさん sage 2017/06/20(火) 17:56:16.36 ID:AQI57Ggp.net
通常、柔整が扱う物には、外傷性くも膜下は無いとみていい話。
たとえ、遭遇したとしても>>402の対応で問題なし。
実際、三十年この対応で問題のある患者は適正な機関に搬送できていると。

実際の話、くも膜下を柔整が対応して見落とすという話に持っていきたかったんだろうけど、
その場合は、明確な外傷がない場合になるしね。
それでも、>>402の対応でOK

で、わざわざ>>402を書いたのは、風呂のタイルのケース、これも脳出血だったんだけどね。
非常に紛らわしい原因になるのだけどね。
注目が、頸部よりも、中手指関節掌側、疼痛、屈曲傷害はあるんだけど、腱の緊張等のが見られなかったと
疼痛と組織の変化は付き物なので、この辺で警戒していた。
同業の方、特に若い柔整に紹介したかった症例。
見た目は、受傷機転があり受傷日も明確であっても、中枢神経の問題もあるということ。
50代以上の患者はこの可能性を考慮しながら見たらいいだろうね。
因みに、この患者は60代女性です、脳外科から回ってきた回答書は脳出血。

柔整は頭に留めておいてください。


次ページ
最新レス表示
レスジャンプ
類似スレ一覧
スレッドの検索
話題のニュース
おまかせリスト
オプション
しおりを挟む
スレッドに書込
スレッドの一覧
暇つぶし2ch