mirror of
https://github.com/agdamsbo/daDoctoR.git
synced 2024-11-24 20:51:54 +01:00
u
This commit is contained in:
parent
84e390f378
commit
80975f65e7
12
R/rep_glm.R
12
R/rep_glm.R
@ -9,17 +9,7 @@
|
||||
#' @param fixed.var flag to set "vars" as fixed in the model. When FALSE, then true bivariate logistic regression is performed.
|
||||
#' @keywords logistic
|
||||
#' @export
|
||||
#' @examples
|
||||
#' l<-50
|
||||
#' y<-factor(rep(c("a","b"),l))
|
||||
#' x<-rnorm(length(y), mean=50, sd=10)
|
||||
#' v1<-factor(rep(c("r","s"),length(y)/2))
|
||||
#' v2<-sample(1:100, length(y), replace=FALSE)
|
||||
#' v3<-as.numeric(1:length(y))
|
||||
#' d<-data.frame(y,x,v1,v2,v3)
|
||||
#' preds<-c("v1","v2","x")
|
||||
#' rep_glm(meas="y",vars="v3",string=preds,ci=F,data=d)
|
||||
|
||||
#'
|
||||
|
||||
rep_glm<-function(meas,vars=NULL,string,ci=FALSE,data,fixed.var=FALSE){
|
||||
|
||||
|
@ -23,15 +23,4 @@ rep_glm(meas, vars = NULL, string, ci = FALSE, data,
|
||||
\description{
|
||||
For bivariate analyses. The confint() function is rather slow, causing the whole function to hang when including many predictors and calculating the ORs with CI.
|
||||
}
|
||||
\examples{
|
||||
l<-50
|
||||
y<-factor(rep(c("a","b"),l))
|
||||
x<-rnorm(length(y), mean=50, sd=10)
|
||||
v1<-factor(rep(c("r","s"),length(y)/2))
|
||||
v2<-sample(1:100, length(y), replace=FALSE)
|
||||
v3<-as.numeric(1:length(y))
|
||||
d<-data.frame(y,x,v1,v2,v3)
|
||||
preds<-c("v1","v2","x")
|
||||
rep_glm(meas="y",vars="v3",string=preds,ci=F,data=d)
|
||||
}
|
||||
\keyword{logistic}
|
||||
|
Loading…
Reference in New Issue
Block a user