set.seed(50)
# linear model, adding an arbitrary string to the object
dat <- data.frame(y=runif(50,-1,1), x1=runif(50), x2=runif(50), z=runif(50))
expnms = c('x1')
q=NULL
ft = glm(f=y ~ z + x1 + x2, data=dat, family=gaussian())
z = coef(ft)[2]/sqrt(vcov(ft)[2,2])
pval = (1-pnorm(abs(z)))*2
.qgcomp_object(fit = ft, coef=coef(ft)[2], q=NULL, var.coef = vcov(ft)[2,2],
ci.coef=coef(ft)[2] + c(-1.96, 1.96)*sqrt(vcov(ft)[2,2]), tstat = z, pval = pval,
bootstrap=FALSE)
Run the code above in your browser using DataLab