This commit is contained in:
agdamsbo 2018-10-23 14:17:33 +02:00
parent dc288f047b
commit 538b769289
5 changed files with 13 additions and 11 deletions

View File

@ -1,7 +1,7 @@
Package: daDoctoR Package: daDoctoR
Type: Package Type: Package
Title: FUNCTIONS FOR HEALTH RESEARCH Title: FUNCTIONS FOR HEALTH RESEARCH
Version: 0.1.0.9012 Version: 0.1.0.9013
Author@R: c(person("Andreas", "Gammelgaard Damsbo", email = "agdamsbo@pm.me", role = c("cre", "aut"))) Author@R: c(person("Andreas", "Gammelgaard Damsbo", email = "agdamsbo@pm.me", role = c("cre", "aut")))
Maintainer: Andreas Gammelgaard Damsbo <agdamsbo@pm.me> Maintainer: Andreas Gammelgaard Damsbo <agdamsbo@pm.me>
Description: I am a Danish medical doctor involved in neuropsychiatric research. Description: I am a Danish medical doctor involved in neuropsychiatric research.

View File

@ -3,9 +3,9 @@
#' 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. #' 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.
#' @param meas Effect meassure. Input as c() of columnnames, use dput(). #' @param meas Effect meassure. Input as c() of columnnames, use dput().
#' @param vars variables in model. Input as c() of columnnames, use dput(). #' @param vars variables in model. Input as c() of columnnames, use dput().
#' @param str variables to test. Input as c() of columnnames, use dput(). #' @param string variables to test. Input as c() of columnnames, use dput().
#' @param ci flag to get results as OR with 95% confidence interval. #' @param ci flag to get results as OR with 95% confidence interval.
#' @param dta data frame to pull variables from. #' @param data data frame to pull variables from.
#' @param fixed.var flag to set "vars" as fixed in the model. When FALSE, then true bivariate logistic regression is performed. #' @param fixed.var flag to set "vars" as fixed in the model. When FALSE, then true bivariate logistic regression is performed.
#' @keywords logistic #' @keywords logistic
#' @export #' @export
@ -21,7 +21,7 @@
#' rep_glm(meas="y",vars="v3",string=preds,ci=F,data=d) #' rep_glm(meas="y",vars="v3",string=preds,ci=F,data=d)
rep_glm<-function(meas,vars,string,ci=FALSE,data,fixed.var=FALSE){ rep_glm<-function(meas,vars=NULL,string,ci=FALSE,data,fixed.var=FALSE){
require(broom) require(broom)
y<-data[,c(meas)] y<-data[,c(meas)]

View File

@ -12,7 +12,7 @@
#' @examples #' @examples
#' rep_lm() #' rep_lm()
rep_lm<-function(meas,vars,string,ci=FALSE,data,fixed.var=FALSE){ rep_lm<-function(meas,vars=NULL,string,ci=FALSE,data,fixed.var=FALSE){
require(broom) require(broom)
y<-data[,c(meas)] y<-data[,c(meas)]

View File

@ -4,20 +4,21 @@
\alias{rep_glm} \alias{rep_glm}
\title{A repeated logistic regression function} \title{A repeated logistic regression function}
\usage{ \usage{
rep_glm(meas, vars, string, ci = FALSE, data, fixed.var = FALSE) rep_glm(meas, vars = NULL, string, ci = FALSE, data,
fixed.var = FALSE)
} }
\arguments{ \arguments{
\item{meas}{Effect meassure. Input as c() of columnnames, use dput().} \item{meas}{Effect meassure. Input as c() of columnnames, use dput().}
\item{vars}{variables in model. Input as c() of columnnames, use dput().} \item{vars}{variables in model. Input as c() of columnnames, use dput().}
\item{string}{variables to test. Input as c() of columnnames, use dput().}
\item{ci}{flag to get results as OR with 95% confidence interval.} \item{ci}{flag to get results as OR with 95% confidence interval.}
\item{data}{data frame to pull variables from.}
\item{fixed.var}{flag to set "vars" as fixed in the model. When FALSE, then true bivariate logistic regression is performed.} \item{fixed.var}{flag to set "vars" as fixed in the model. When FALSE, then true bivariate logistic regression is performed.}
\item{str}{variables to test. Input as c() of columnnames, use dput().}
\item{dta}{data frame to pull variables from.}
} }
\description{ \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. 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.

View File

@ -4,7 +4,8 @@
\alias{rep_lm} \alias{rep_lm}
\title{A repeated linear regression function} \title{A repeated linear regression function}
\usage{ \usage{
rep_lm(meas, vars, string, ci = FALSE, data, fixed.var = FALSE) rep_lm(meas, vars = NULL, string, ci = FALSE, data,
fixed.var = FALSE)
} }
\arguments{ \arguments{
\item{meas}{Effect meassure. Input as c() of columnnames, use dput().} \item{meas}{Effect meassure. Input as c() of columnnames, use dput().}