История изменений
Исправление psv1967, (текущая версия) :
Чего попросили, того и подогнала :)
> read.table("dat.txt", header=T)
C IC
1 1e+00 0.60
2 1e-01 0.30
3 1e-02 0.20
4 1e-03 0.03
5 1e-04 0.06
> data<-read.table("dat.txt", header=T)
> library(MASS)
> glm(IC~C,data=data,family=quasibinomial(link=probit))
Call: glm(formula = IC ~ C, family = quasibinomial(link = probit),
data = data)
Coefficients:
(Intercept) C
-1.108 1.401
Degrees of Freedom: 4 Total (i.e. Null); 3 Residual
Null Deviance: 1.196
Residual Deviance: 0.3282 AIC: NA
> plot(seq(from=0,to=1,length.out=25), predict(glm(IC~C,data=data,family=quasibinomial(link=probit)), list(C=seq(from=0,to=1,length.out=25)), type = "response"))
> points(seq(from=0,to=1,length.out=25), predict(glm(IC~C,data=data,family=quasibinomial(link=probit)), list(C=seq(from=0,to=1,length.out=25)), type = "response"), col="red")
Исправление psv1967, :
Чего попросили, того и подогнала :)
[quote] read.table("dat.txt")[br][/quote] V1 V2
1 C IC
2 1 0.6
3 0.1 0.3
4 0.01 0.2
5 0.001 0.03
6 0.0001 0.06
[quote] data<-read.table("dat.txt", header=T)[br] library(MASS)[br] glm(IC~C,data=data,family=quasibinomial(link=probit))[br][/quote]Call: glm(formula = IC ~ C, family = quasibinomial(link = probit),
data = data)
Coefficients:
(Intercept) C
-1.108 1.401
Degrees of Freedom: 4 Total (i.e. Null); 3 Residual
Null Deviance: 1.196
Residual Deviance: 0.3282 AIC: NA
[quote] predict(glm(IC~C,data=data,family=quasibinomial(link=probit)))[br][/quote] 1 2 3 4 5
0.2935722 -0.9676437 -1.0937653 -1.1063774 -1.1076387
[quote] predict(glm(IC~C,data=data,family=quasibinomial(link=probit)), list(C=2))[br][/quote] 1
1.694923
[quote] predict(glm(IC~C,data=data,family=quasibinomial(link=probit)), list(C=3))[br][/quote] 1
3.096274
[quote] predict(glm(IC~C,data=data,family=quasibinomial(link=probit)), list(C=1))[br][/quote] 1
0.2935722
[quote] predict(glm(IC~C,data=data,family=quasibinomial(link=probit)), type = "response", list(C=1))[br][/quote] 1
0.6154576
[quote] predict(glm(IC~C,data=data,family=quasibinomial(link=probit)), type = "response", list(C=0.5))[br][/quote] 1
0.3419661
[quote] points(seq(from=0,to=1,length.out=25), predict(glm(IC~C,data=data,family=quasibinomial(link=probit)), list(C=seq(from=0,to=1,length.out=25)), type = "response"), col="red")[br][/quote]
Исходная версия psv1967, :
Чего попросили, того и подогнала :)
[data]
read.table(«dat.txt»)
V1 V2 1 C IC 2 1 0.6 3 0.1 0.3 4 0.01 0.2 5 0.001 0.03 6 0.0001 0.06
data<-read.table(«dat.txt», header=T)
library(MASS)
glm(IC~C,data=data,family=quasibinomial(link=probit))
Call: glm(formula = IC ~ C, family = quasibinomial(link = probit), data = data)
Coefficients: (Intercept) C -1.108 1.401
Degrees of Freedom: 4 Total (i.e. Null); 3 Residual Null Deviance: 1.196 Residual Deviance: 0.3282 AIC: NA
predict(glm(IC~C,data=data,family=quasibinomial(link=probit)))
1 2 3 4 5 0.2935722 -0.9676437 -1.0937653 -1.1063774 -1.1076387
predict(glm(IC~C,data=data,family=quasibinomial(link=probit)), list(C=2))
1 1.694923
predict(glm(IC~C,data=data,family=quasibinomial(link=probit)), list(C=3))
1 3.096274
predict(glm(IC~C,data=data,family=quasibinomial(link=probit)), list(C=1))
1 0.2935722
predict(glm(IC~C,data=data,family=quasibinomial(link=probit)), type = «response», list(C=1))
1 0.6154576
predict(glm(IC~C,data=data,family=quasibinomial(link=probit)), type = «response», list(C=0.5))
1 0.3419661
points(seq(from=0,to=1,length.out=25), predict(glm(IC~C,data=data,family=quasibinomial(link=probit)), list(C=seq(from=0,to=1,length.out=25)), type = «response»), col=«red»)
[/data]