公式中的最后三个变量不会出现在输出中。我该怎么做才能让它们也出现?
library(foreign)
library(discSurv)
library(gamlss)
library(gamlss.mx)
mydata <- read.dta("http://www.stata-press.com/data/r16/mortality.dta")
mydata<-contToDisc(mydata, "time",intervalLimits = c(0 ,1 ,6, 12, 24, 61) , equi=FALSE)
mydata$timeDisc<-as.numeric(as.character(mydata$timeDisc))-1
mydata$comp12 <-mydata$f0011*(mydata$timeDisc==4)
mydata$comp24e <-mydata$f0011*(mydata$timeDisc==5)
mydata$comp24l <-mydata$f1223*(mydata$timeDisc==5)
mydata$mage<-c(scale(mydata$mage,scale=T))
mydata$p0014<-as.factor(mydata$p0014)
mydata$p2435<-as.factor(mydata$p2435)
mydata$p1523<-as.factor(mydata$p1523)
mydata$p36up<-as.factor(mydata$p36up)
mydata$pdead<-as.factor(mydata$pdead)
mydl <-dataLong(mydata, timeColumn = "timeDisc",censColumn = "death")
par(mar=c(1,1,1,1))
model1 <- gamlssNP(y ~ -1+pdead+comp12+comp24e+comp24l+p0014+p1523+p2435+p36up+pb(as.numeric(timeInt))+poly(mage,2),
random=~1|momid, family=BI(mu.link="cloglog"),
data=mydl, K=9, mixture="gq", tol=0.7, control = NP.control(EMcc=0.001, trace=FALSE),
g.control = gamlss.control(trace=FALSE))