mirror of
https://github.com/agdamsbo/daDoctoR.git
synced 2024-11-23 12:20:22 +01:00
trying to resolve
Merge branch 'master' of github.com:agdamsbo/daDoctoR # Conflicts: # DESCRIPTION # R/print_diff_bygroup.R # R/print_diff_byvar.R # R/print_log.R # R/print_olr.R # R/print_pred.R
This commit is contained in:
commit
09719ea905
@ -1,6 +1,10 @@
|
|||||||
Package: daDoctoR
|
Package: daDoctoR
|
||||||
Title: Functions For Health Research
|
Title: Functions For Health Research
|
||||||
|
<<<<<<< HEAD
|
||||||
Version: 0.21.7
|
Version: 0.21.7
|
||||||
|
=======
|
||||||
|
Version: 0.21.5
|
||||||
|
>>>>>>> d8ffa3dc7b67e43a846bbd58e055a141a010b304
|
||||||
Year: 2021
|
Year: 2021
|
||||||
Author: Andreas Gammelgaard Damsbo <agdamsbo@pm.me>
|
Author: Andreas Gammelgaard Damsbo <agdamsbo@pm.me>
|
||||||
Maintainer: Andreas Gammelgaard Damsbo <agdamsbo@pm.me>
|
Maintainer: Andreas Gammelgaard Damsbo <agdamsbo@pm.me>
|
||||||
|
@ -18,7 +18,11 @@
|
|||||||
#' mtcars$am<-factor(mtcars$am)
|
#' mtcars$am<-factor(mtcars$am)
|
||||||
#' strobe_diff_bygroup(meas="mpg",var="vs",group = "am",adj=c("disp","wt"),data=mtcars)
|
#' strobe_diff_bygroup(meas="mpg",var="vs",group = "am",adj=c("disp","wt"),data=mtcars)
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
print_diff_bygroup<-function(meas,var,group,adj,data,dec=2){
|
print_diff_bygroup<-function(meas,var,group,adj,data,dec=2){
|
||||||
|
=======
|
||||||
|
strobe_diff_bygroup<-function(meas,var,group,adj,data,dec=2){
|
||||||
|
>>>>>>> d8ffa3dc7b67e43a846bbd58e055a141a010b304
|
||||||
|
|
||||||
## meas: sdmt
|
## meas: sdmt
|
||||||
## var: rtreat
|
## var: rtreat
|
||||||
|
@ -17,7 +17,11 @@
|
|||||||
#' mtcars$am<-factor(mtcars$am)
|
#' mtcars$am<-factor(mtcars$am)
|
||||||
#' strobe_diff_byvar(meas="mpg",var="vs",group = "am",adj=c("disp","wt","hp"),data=mtcars)
|
#' strobe_diff_byvar(meas="mpg",var="vs",group = "am",adj=c("disp","wt","hp"),data=mtcars)
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
print_diff_byvar<-function(meas,var,group,adj,data,dec=2){
|
print_diff_byvar<-function(meas,var,group,adj,data,dec=2){
|
||||||
|
=======
|
||||||
|
strobe_diff_byvar<-function(meas,var,group,adj,data,dec=2){
|
||||||
|
>>>>>>> d8ffa3dc7b67e43a846bbd58e055a141a010b304
|
||||||
|
|
||||||
## meas: sdmt
|
## meas: sdmt
|
||||||
## var: rtreat
|
## var: rtreat
|
||||||
|
@ -9,7 +9,11 @@
|
|||||||
#' @keywords logistic
|
#' @keywords logistic
|
||||||
#' @export
|
#' @export
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
print_log<-function(meas,var,adj,data,dec=2){
|
print_log<-function(meas,var,adj,data,dec=2){
|
||||||
|
=======
|
||||||
|
strobe_log<-function(meas,var,adj,data,dec=2){
|
||||||
|
>>>>>>> d8ffa3dc7b67e43a846bbd58e055a141a010b304
|
||||||
## Ønskeliste:
|
## Ønskeliste:
|
||||||
##
|
##
|
||||||
## - Sum af alle, der indgår (Overall N)
|
## - Sum af alle, der indgår (Overall N)
|
||||||
|
@ -11,7 +11,11 @@
|
|||||||
#' @keywords olr
|
#' @keywords olr
|
||||||
#' @export
|
#' @export
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
print_olr<-function(meas,vars,data,dec=2,n.by.adj=FALSE){
|
print_olr<-function(meas,vars,data,dec=2,n.by.adj=FALSE){
|
||||||
|
=======
|
||||||
|
strobe_olr<-function(meas,vars,data,dec=2,n.by.adj=FALSE){
|
||||||
|
>>>>>>> d8ffa3dc7b67e43a846bbd58e055a141a010b304
|
||||||
## For calculation of p-value from t-value see rep_olr()
|
## For calculation of p-value from t-value see rep_olr()
|
||||||
|
|
||||||
require(MASS)
|
require(MASS)
|
||||||
|
@ -14,7 +14,11 @@
|
|||||||
#' @keywords logistic
|
#' @keywords logistic
|
||||||
#' @export
|
#' @export
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
print_pred<-function(meas,adj,data,dec=2,n.by.adj=FALSE,p.val=FALSE){
|
print_pred<-function(meas,adj,data,dec=2,n.by.adj=FALSE,p.val=FALSE){
|
||||||
|
=======
|
||||||
|
strobe_pred<-function(meas,adj,data,dec=2,n.by.adj=FALSE,p.val=FALSE){
|
||||||
|
>>>>>>> d8ffa3dc7b67e43a846bbd58e055a141a010b304
|
||||||
|
|
||||||
## Wish list:
|
## Wish list:
|
||||||
## - SPEED, maybe flags to include/exclude time consuming tasks
|
## - SPEED, maybe flags to include/exclude time consuming tasks
|
||||||
|
@ -1,9 +1,11 @@
|
|||||||
% Generated by roxygen2: do not edit by hand
|
% Generated by roxygen2: do not edit by hand
|
||||||
% Please edit documentation in R/strobe_diff_bygroup.R
|
% Please edit documentation in R/print_diff_bygroup.R, R/strobe_diff_bygroup.R
|
||||||
\name{strobe_diff_bygroup}
|
\name{strobe_diff_bygroup}
|
||||||
\alias{strobe_diff_bygroup}
|
\alias{strobe_diff_bygroup}
|
||||||
\title{REWRITE UNDERWAY - replaced by 'print_diff_bygroup'}
|
\title{REWRITE UNDERWAY - replaced by 'print_diff_bygroup'}
|
||||||
\usage{
|
\usage{
|
||||||
|
strobe_diff_bygroup(meas, var, group, adj, data, dec = 2)
|
||||||
|
|
||||||
strobe_diff_bygroup(meas, var, group, adj, data, dec = 2)
|
strobe_diff_bygroup(meas, var, group, adj, data, dec = 2)
|
||||||
}
|
}
|
||||||
\arguments{
|
\arguments{
|
||||||
@ -20,9 +22,14 @@ strobe_diff_bygroup(meas, var, group, adj, data, dec = 2)
|
|||||||
\item{dec}{decimals for results, standard is set to 2. Mean and sd is dec-1. pval has 3 decimals.}
|
\item{dec}{decimals for results, standard is set to 2. Mean and sd is dec-1. pval has 3 decimals.}
|
||||||
}
|
}
|
||||||
\description{
|
\description{
|
||||||
|
Print regression results according to STROBE
|
||||||
|
|
||||||
Print regression results according to STROBE
|
Print regression results according to STROBE
|
||||||
}
|
}
|
||||||
\details{
|
\details{
|
||||||
|
Printable table of two dimensional regression analysis of group vs variable for outcome measure. By group. Includes p-value
|
||||||
|
Group and variable has to be dichotomous factor.
|
||||||
|
|
||||||
Printable table of two dimensional regression analysis of group vs variable for outcome measure. By group. Includes p-value
|
Printable table of two dimensional regression analysis of group vs variable for outcome measure. By group. Includes p-value
|
||||||
Group and variable has to be dichotomous factor.
|
Group and variable has to be dichotomous factor.
|
||||||
}
|
}
|
||||||
@ -31,5 +38,9 @@ Group and variable has to be dichotomous factor.
|
|||||||
mtcars$vs<-factor(mtcars$vs)
|
mtcars$vs<-factor(mtcars$vs)
|
||||||
mtcars$am<-factor(mtcars$am)
|
mtcars$am<-factor(mtcars$am)
|
||||||
strobe_diff_bygroup(meas="mpg",var="vs",group = "am",adj=c("disp","wt"),data=mtcars)
|
strobe_diff_bygroup(meas="mpg",var="vs",group = "am",adj=c("disp","wt"),data=mtcars)
|
||||||
|
data('mtcars')
|
||||||
|
mtcars$vs<-factor(mtcars$vs)
|
||||||
|
mtcars$am<-factor(mtcars$am)
|
||||||
|
strobe_diff_bygroup(meas="mpg",var="vs",group = "am",adj=c("disp","wt"),data=mtcars)
|
||||||
}
|
}
|
||||||
\keyword{strobe}
|
\keyword{strobe}
|
||||||
|
@ -1,9 +1,11 @@
|
|||||||
% Generated by roxygen2: do not edit by hand
|
% Generated by roxygen2: do not edit by hand
|
||||||
% Please edit documentation in R/strobe_diff_byvar.R
|
% Please edit documentation in R/print_diff_byvar.R, R/strobe_diff_byvar.R
|
||||||
\name{strobe_diff_byvar}
|
\name{strobe_diff_byvar}
|
||||||
\alias{strobe_diff_byvar}
|
\alias{strobe_diff_byvar}
|
||||||
\title{REWRITE UNDERWAY - replaced by 'print_diff_byvar'}
|
\title{REWRITE UNDERWAY - replaced by 'print_diff_byvar'}
|
||||||
\usage{
|
\usage{
|
||||||
|
strobe_diff_byvar(meas, var, group, adj, data, dec = 2)
|
||||||
|
|
||||||
strobe_diff_byvar(meas, var, group, adj, data, dec = 2)
|
strobe_diff_byvar(meas, var, group, adj, data, dec = 2)
|
||||||
}
|
}
|
||||||
\arguments{
|
\arguments{
|
||||||
@ -20,9 +22,13 @@ strobe_diff_byvar(meas, var, group, adj, data, dec = 2)
|
|||||||
\item{dec}{decimals for results, standard is set to 2. Mean and sd is dec-1.}
|
\item{dec}{decimals for results, standard is set to 2. Mean and sd is dec-1.}
|
||||||
}
|
}
|
||||||
\description{
|
\description{
|
||||||
|
Print regression results according to STROBE
|
||||||
|
|
||||||
Print regression results according to STROBE
|
Print regression results according to STROBE
|
||||||
}
|
}
|
||||||
\details{
|
\details{
|
||||||
|
Printable table of three dimensional regression analysis of group vs var for meas. By var. Includes p-values.
|
||||||
|
|
||||||
Printable table of three dimensional regression analysis of group vs var for meas. By var. Includes p-values.
|
Printable table of three dimensional regression analysis of group vs var for meas. By var. Includes p-values.
|
||||||
}
|
}
|
||||||
\examples{
|
\examples{
|
||||||
@ -30,5 +36,9 @@ Printable table of three dimensional regression analysis of group vs var for mea
|
|||||||
mtcars$vs<-factor(mtcars$vs)
|
mtcars$vs<-factor(mtcars$vs)
|
||||||
mtcars$am<-factor(mtcars$am)
|
mtcars$am<-factor(mtcars$am)
|
||||||
strobe_diff_byvar(meas="mpg",var="vs",group = "am",adj=c("disp","wt","hp"),data=mtcars)
|
strobe_diff_byvar(meas="mpg",var="vs",group = "am",adj=c("disp","wt","hp"),data=mtcars)
|
||||||
|
data('mtcars')
|
||||||
|
mtcars$vs<-factor(mtcars$vs)
|
||||||
|
mtcars$am<-factor(mtcars$am)
|
||||||
|
strobe_diff_byvar(meas="mpg",var="vs",group = "am",adj=c("disp","wt","hp"),data=mtcars)
|
||||||
}
|
}
|
||||||
\keyword{strobe}
|
\keyword{strobe}
|
||||||
|
@ -1,9 +1,11 @@
|
|||||||
% Generated by roxygen2: do not edit by hand
|
% Generated by roxygen2: do not edit by hand
|
||||||
% Please edit documentation in R/strobe_log.R
|
% Please edit documentation in R/print_log.R, R/strobe_log.R
|
||||||
\name{strobe_log}
|
\name{strobe_log}
|
||||||
\alias{strobe_log}
|
\alias{strobe_log}
|
||||||
\title{OBSOLETE - use 'print_log'}
|
\title{OBSOLETE - use 'print_log'}
|
||||||
\usage{
|
\usage{
|
||||||
|
strobe_log(meas, var, adj, data, dec = 2)
|
||||||
|
|
||||||
strobe_log(meas, var, adj, data, dec = 2)
|
strobe_log(meas, var, adj, data, dec = 2)
|
||||||
}
|
}
|
||||||
\arguments{
|
\arguments{
|
||||||
@ -18,6 +20,11 @@ strobe_log(meas, var, adj, data, dec = 2)
|
|||||||
\item{dec}{decimals for results, standard is set to 2. Mean and sd is dec-1.}
|
\item{dec}{decimals for results, standard is set to 2. Mean and sd is dec-1.}
|
||||||
}
|
}
|
||||||
\description{
|
\description{
|
||||||
|
Print regression results according to STROBE
|
||||||
|
}
|
||||||
|
\details{
|
||||||
|
Printable table of logistic regression analysis according to STROBE.
|
||||||
|
|
||||||
Print regression results according to STROBE
|
Print regression results according to STROBE
|
||||||
}
|
}
|
||||||
\details{
|
\details{
|
||||||
|
@ -1,9 +1,11 @@
|
|||||||
% Generated by roxygen2: do not edit by hand
|
% Generated by roxygen2: do not edit by hand
|
||||||
% Please edit documentation in R/strobe_olr.R
|
% Please edit documentation in R/print_olr.R, R/strobe_olr.R
|
||||||
\name{strobe_olr}
|
\name{strobe_olr}
|
||||||
\alias{strobe_olr}
|
\alias{strobe_olr}
|
||||||
\title{OBSOLETE - use 'print_olr'}
|
\title{OBSOLETE - use 'print_olr'}
|
||||||
\usage{
|
\usage{
|
||||||
|
strobe_olr(meas, vars, data, dec = 2, n.by.adj = FALSE)
|
||||||
|
|
||||||
strobe_olr(meas, vars, data, dec = 2, n.by.adj = FALSE)
|
strobe_olr(meas, vars, data, dec = 2, n.by.adj = FALSE)
|
||||||
}
|
}
|
||||||
\arguments{
|
\arguments{
|
||||||
@ -18,6 +20,13 @@ strobe_olr(meas, vars, data, dec = 2, n.by.adj = FALSE)
|
|||||||
\item{n.by.adj}{flag to indicate wether to count number of patients in adjusted model or overall for outcome meassure not NA.}
|
\item{n.by.adj}{flag to indicate wether to count number of patients in adjusted model or overall for outcome meassure not NA.}
|
||||||
}
|
}
|
||||||
\description{
|
\description{
|
||||||
|
Print ordinal logistic regression results according to STROBE
|
||||||
|
}
|
||||||
|
\details{
|
||||||
|
Printable table of ordinal logistic regression with bivariate and multivariate analyses.
|
||||||
|
Table according to STROBE. Uses polr() funtion of the MASS-package.
|
||||||
|
Formula analysed is the most simple m~v1+v2+vn. The is no significance test. Results are point estimates with 95 percent CI.
|
||||||
|
|
||||||
Print ordinal logistic regression results according to STROBE
|
Print ordinal logistic regression results according to STROBE
|
||||||
}
|
}
|
||||||
\details{
|
\details{
|
||||||
|
@ -1,9 +1,11 @@
|
|||||||
% Generated by roxygen2: do not edit by hand
|
% Generated by roxygen2: do not edit by hand
|
||||||
% Please edit documentation in R/strobe_pred.R
|
% Please edit documentation in R/print_pred.R, R/strobe_pred.R
|
||||||
\name{strobe_pred}
|
\name{strobe_pred}
|
||||||
\alias{strobe_pred}
|
\alias{strobe_pred}
|
||||||
\title{OBSOLETE - use 'print_pred'}
|
\title{OBSOLETE - use 'print_pred'}
|
||||||
\usage{
|
\usage{
|
||||||
|
strobe_pred(meas, adj, data, dec = 2, n.by.adj = FALSE, p.val = FALSE)
|
||||||
|
|
||||||
strobe_pred(meas, adj, data, dec = 2, n.by.adj = FALSE, p.val = FALSE)
|
strobe_pred(meas, adj, data, dec = 2, n.by.adj = FALSE, p.val = FALSE)
|
||||||
}
|
}
|
||||||
\arguments{
|
\arguments{
|
||||||
@ -20,6 +22,15 @@ strobe_pred(meas, adj, data, dec = 2, n.by.adj = FALSE, p.val = FALSE)
|
|||||||
\item{p.val}{flag to include p-values in table, set to FALSE as standard.}
|
\item{p.val}{flag to include p-values in table, set to FALSE as standard.}
|
||||||
}
|
}
|
||||||
\description{
|
\description{
|
||||||
|
Regression model of predictors according to STROBE, bi- and multivariable.
|
||||||
|
}
|
||||||
|
\details{
|
||||||
|
Printable table of regression model according to STROBE for linear or binary outcome-variables.
|
||||||
|
Includes both bivariate and multivariate in the same table.
|
||||||
|
Output is a list, with the first item being the main "output" as a dataframe.
|
||||||
|
Automatically uses logistic regression model for dichotomous outcome variable and linear regression model for continuous outcome variable. Linear regression will give estimated adjusted true mean in list.
|
||||||
|
For logistic regression gives count of outcome variable pr variable level.
|
||||||
|
|
||||||
Regression model of predictors according to STROBE, bi- and multivariable.
|
Regression model of predictors according to STROBE, bi- and multivariable.
|
||||||
}
|
}
|
||||||
\details{
|
\details{
|
||||||
|
Loading…
Reference in New Issue
Block a user