Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require(MPTinR)
- evsd_c_shift <- "
- 1-pnorm(c-mu)
- pnorm(c-mu)
- 1-pnorm(c)
- pnorm(c)
- 1-pnorm(c+shift-mu)
- pnorm(c+shift-mu)
- 1-pnorm(c+shift)
- pnorm(c+shift)
- "
- evsd_mu_shift <- "
- 1-pnorm(c-mu)
- pnorm(c-mu)
- 1-pnorm(c)
- pnorm(c)
- 1-pnorm(c-(mu+shift))
- pnorm(c-(mu+shift))
- 1-pnorm(c-(0+shift))
- pnorm(c-(0+shift))
- "
- dube2 <- c(.86, .14, .61, .39, .68, .32, .32, .68)
- cs <- fit.model(dube2, textConnection(evsd_c_shift), lower.bound=c(-Inf, 0, 0), upper.bound=Inf)
- mus <- fit.model(dube2, textConnection(evsd_mu_shift), lower.bound=c(-Inf, 0, -Inf), upper.bound=Inf)
- cs$goodness.of.fit
- mus$goodness.of.fit
- cs$parameters
- mus$parameters
- round(gen.predictions(c(c = -.25, mu = .87, shift = .69), model.filename=textConnection(evsd_c_shift)), 2)
- round(gen.predictions(c(c = -.25, mu = .87, shift = -.69), model.filename=textConnection(evsd_mu_shift)), 2)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement