Return predictions from a ZlmFit object.
# S3 method for ZlmFit
predict(object, newdata = NULL, modelmatrix = NULL, ...)
A ZlmFit
The data to predict from. Currently ignored, will use the data in the object.
The model matrix specifying the linear combination of coefficients.
ignored
Predictions (on the link scale) and standard errors.
##See stat_ell
example(stat_ell)
#>
#> stt_ll> data(vbetaFA)
#>
#> stt_ll> library(ggplot2)
#>
#> stt_ll> zlmCond <- zlm(~Stim.Condition, vbetaFA[1:10,])
#>
#> Done!
#>
#> stt_ll> MM <- model.matrix(~Stim.Condition,unique(colData(vbetaFA)[,c("Stim.Condition"),drop=FALSE]))
#>
#> stt_ll> predicted <- predict(zlmCond,modelmatrix=MM)
#>
#> stt_ll> plt <- ggplot(predicted)+aes(x=invlogit(etaD),y=muC,xse=seD,yse=seC,col=sample)+
#> stt_ll+ facet_wrap(~primerid,scales="free_y")+theme_linedraw()+
#> stt_ll+ geom_point(size=0.5)+scale_x_continuous("Proportion expression")+
#> stt_ll+ scale_y_continuous("Estimated Mean")+
#> stt_ll+ stat_ell(aes(x=etaD,y=muC),level=0.95, invert='x')
#>
#> stt_ll> ## plot with inverse logit transformed x-axis
#> stt_ll> print(plt)
#> Warning: Removed 3 rows containing non-finite values (stat_ell).
#> Warning: Removed 1 rows containing missing values (geom_point).
#>
#> stt_ll> # doesn't do anything in this case because there are no inestimable coefficients
#> stt_ll> predictI <- impute(predicted, groupby='primerid')
#> Warning: no non-missing arguments to max; returning -Inf