メモ

Rで線形回帰
テキストはこれ
webリンクもあってよいですね。
p151 1コンパートメントモデル、IV投与
Rでやってみる

 time <- c(0.1,0.2,0.5,1,1.5,2,3,5,7,10,12,15)
 conc<-c(2.45,2.40,2.26,2.04,1.85,1.67,1.37,0.92,0.61,0.33,0.22,0.12)
 lnc<-log(conc)
 test2<-cbind(lnc,time)
  reg<-lm(lnc~time,data=data.frame(test2))
  reg

Call:
lm(formula = lnc ~ time, data = data.frame(test2))

Coefficients:
(Intercept) time
0.9187 -0.2025

ということでk=0.20h-1
lnCp0 = 0.919
Cp0 = exp(0.919)=2.5mg/L
となりました。
lm(formura, data)にて線形回帰を実行する

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s