leeper / prediction

Tidy, Type-Safe 'prediction()' Methods

Home Page:https://cran.r-project.org/package=prediction

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

No SEs for speedglm

ballardao opened this issue · comments

Please specify whether your issue is about:

  • a possible bug
  • [ x] a question about package functionality
  • a suggested code or documentation change, improvement to the code, or feature request

SE fits don't seem to work for model objects from the speedglm package. Am I missing something or is this functionality not included/not possible?

Code below:

## load packages
library("prediction")
library("speedglm")

## run a simple model
n <- 1000
k <- 3
y <- rbinom(n, 1, 0.5)
x <- round(matrix(rnorm(n * k), n, k), digits = 3)
colnames(x) <- c("s1", "s2", "s3") 
dat <- data.frame(y, x)
m1 <- speedglm(y ~ s1 + s2 + s3, data=dat, model=TRUE)

## get predictions
preds <- prediction(m1)
head(preds)

## session info
sessionInfo()