型号: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$exp
和type= "link"
完美配合。
有什么主意吗?