Package 'VIMean'

Title: Variability Independent of Mean
Description: To computed the variability independent of mean (VIM) or variation independent of mean (VIM). The methodology can be found at Peter M Rothwell et al. (2010) <doi:10.1016/S1474-4422(10)70067-3>.
Authors: Zhicheng Du
Maintainer: Zhicheng Du <[email protected]>
License: GPL-3
Version: 0.1.0
Built: 2024-11-17 03:08:26 UTC
Source: https://github.com/cran/VIMean

Help Index


variability independent of mean (VIM)

Description

Please feel free to contact us, if you have any advice and find any bug!

Version History:

Version 0.1.0: The first version.

Usage

VIM(data,id,repeat.vars)

Arguments

data

a width type data frame

id

the name of variable indicating the subjects, e.g., "ID"

repeat.vars

the name of variables indicating the repeated measurement data, e.g., c("x1","x2","x3")

Value

vim

the VIM of each subject

coef

the coefficients fitted from the regression of "sntd ~ k*avg^p"

r.squared, adj.r.squared

the r-squared and adjusted r-squared of the regression

Examples

set.seed(123)
df <- data.frame( "ID" = paste("ID", seq(1,100,1), sep = ""),
                  "x1" = sample(90:220, size = 100, replace = TRUE),
                  "x2" = sample(90:220, size = 100, replace = TRUE),
                  "x3" = sample(90:220, size = 100, replace = TRUE),
                  "x4" = sample(90:220, size = 100, replace = TRUE),
                  "x5" = sample(90:220, size = 100, replace = TRUE))
rst <- VIM(data=df,id="ID",repeat.vars=paste0("x",1:5))