预测模型泊松

时间:2018-07-25 09:38:11

标签: model predict poisson

型号:library(shiny) ui <- fluidPage( div(textInput("x", "Text"), id = "killme"), actionButton("del", "Delete"), verbatimTextOutput("out") ) server <- function(input, output) { output$out <- renderPrint(req(input$x)) observeEvent(input$del, removeUI("#killme")) } shinyApp(ui, server)

模型的预测:

fit2<-glm(data=data,Fecondity~Food*Day,family=poisson(link=log))

置信区间

temp.data<-data.frame(Food,Day)   predict.data<-as.data.frame(predict(fit2,newdata=temp.data,type="response",se=TRUE))

我对置信区间有疑问。 R不加new.data<-cbind(temp.data,predict.data) new.data$ymin<-fit2$family$exp(new.data$fit-std*new.data$se) new.data$ymax<-fit2$family$exp(new.data$fit+std*new.data$se) new.data$fit<-fit2$family$exp(new.data$fit) 。但是,当我为二项式模型运行相同的脚本时,它可以与fit2$family$exptype= "link"完美配合。

有什么主意吗?

0 个答案:

没有答案