Description Usage Arguments Value Author(s) See Also Examples
Change the values of parameters in a migpd
object. You
might want to do this after modelling marginal distributions
as functions of covariates.
1 | migpdCoefs(object, which, coefs)
|
object |
An object of class |
which |
Which models in the |
coefs |
The coefficients that you want to change to. If |
A migpd
object. See the help for migpd
.
Harry Southworth
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | library(MASS)
liver <- liver
liver$ndose <- as.numeric(liver$dose)
d <- data.frame(alt = resid(rlm(log(ALT.M) ~ log(ALT.B) + ndose, data=liver)),
ast = resid(rlm(log(AST.M) ~ log(AST.B) + ndose, data=liver)),
alp = resid(rlm(log(ALP.M) ~ log(ALP.B) + ndose, data=liver)),
tbl = resid(rlm(log(TBL.M) ~ log(TBL.B) + ndose, data=liver)))
Dgpds <- migpd(d[liver$dose == "D", 1:4], mqu=.7)
d$ndose <- liver$ndose
galt <- gpd(alt, data=d, qu=.7, xi = ~ ndose)
gast <- gpd(ast, data=d, qu=.7, xi = ~ ndose)
galp <- gpd(alp, data=d, qu=.7, xi = ~ ndose)
altco <- predict(galt,type="lp",newdata=data.frame(ndose=4))[1:2]
astco <- predict(gast,type="lp",newdata=data.frame(ndose=4))[1:2]
alpco <- predict(galp,type="lp",newdata=data.frame(ndose=4))[1:2]
Dgpd <- migpdCoefs(Dgpds, which=c("alt", "ast", "alp"),
coefs=list(altco, astco, alpco))
summary(Dgpd)
summary(Dgpds)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.