MyNixOS website logo
Description

Data Analysis with Ceiling and/or Floor Data.

An implementation of data analytic methods in R for analyses for data with ceiling/floor effects. The package currently includes functions for mean/variance estimation and mean comparison tests. Implemented methods are from Aitkin (1964) <doi:10.1007/BF02289723> and Liu & Wang (in prep).

DACF

The goal of DACF is to implement methods to deal with challenges associated with ceiling/floor effects in the data using paramtric methods that assume normality for the true scores.

Installation

You can install DACF from github with:

# install.packages("devtools")
devtools::install_github("QMmmmLiu/DACFD")

Example

This is a basic example which shows you how to solve a common problem:

library(DACF)
# Simulate healthy data for two groups
x.1=rnorm(300,2,4)
x.2=rnorm(300,3,5)
# check mean and variance for simulated healthy data
mean(x.1);var(x.1)
#> [1] 2.046914
#> [1] 12.34239
mean(x.2);var(x.2)
#> [1] 3.054255
#> [1] 19.49582
# induce ceiling effects of 20% in group 1
x.1.cf=induce.cfe(.2,0,x.1)
# induce floor effects of 10% in group 2
x.2.cf=induce.cfe(0,.1,x.2)
# recover the mean and variance for ceiling/floor data
rec.mean.var(x.1.cf)
#> $ceiling.percentage
#> [1] 0.003333333
#> 
#> $floor.percentage
#> [1] 0.24
#> 
#> $est.mean
#> [1] 2.141253
#> 
#> $est.var
#> [1] 11.79842
rec.mean.var(x.2.cf)
#> $ceiling.percentage
#> [1] 0.1
#> 
#> $floor.percentage
#> [1] 0.003333333
#> 
#> $est.mean
#> [1] 2.959067
#> 
#> $est.var
#> [1] 18.01588
# conduct a t test on healthy data
t.test(x.1,x.2)
#> 
#>  Welch Two Sample t-test
#> 
#> data:  x.1 and x.2
#> t = -3.0922, df = 569.26, p-value = 0.002084
#> alternative hypothesis: true difference in means is not equal to 0
#> 95 percent confidence interval:
#>  -1.6472027 -0.3674792
#> sample estimates:
#> mean of x mean of y 
#>  2.046914  3.054255
t.test(x.1.cf,x.2.cf)
#> 
#>  Welch Two Sample t-test
#> 
#> data:  x.1.cf and x.2.cf
#> t = -1.1283, df = 550.93, p-value = 0.2597
#> alternative hypothesis: true difference in means is not equal to 0
#> 95 percent confidence interval:
#>  -0.8717900  0.2356737
#> sample estimates:
#> mean of x mean of y 
#>  2.473312  2.791370
# conduct an adjusted t test on ceiling/floor data
lw.t.test(x.1.cf,x.2.cf,"a")
#> $statistic
#> [1] -2.37371
#> 
#> $p.value
#> [1] 0.0183786
#> 
#> $est.d
#> [1] -0.2099299
#> 
#> $conf.int
#> [1] -1.4964171 -0.1392114
lw.t.test(x.1.cf,x.2.cf,"b")
#> $statistic
#> [1] -2.594197
#> 
#> $p.value
#> [1] 0.009970491
#> 
#> $est.d
#> [1] -0.2118153
#> 
#> $conf.int
#> [1] -1.4383181 -0.1973104
# generate a dataframe for ANOVA demo
testdat=threeganova.sim(10000,.0625,1)
# induce ceiling/floor effects in the data
testdat.cf=testdat
testdat.cf[testdat.cf$group==2,]$y=induce.cfe(.2,0,testdat.cf[testdat.cf$group==2,]$y)
# conduct an adjusted F star test on ceiling/floor data
lw.f.star(testdat.cf,y~group,"a")
#> $statistic
#> [1] 868.0733
#> 
#> $p.value
#> [1] 0
#> 
#> $est.f.squared
#> [1] 0.05787155
lw.f.star(testdat.cf,y~group,"b")
#> $statistic
#> [1] 781.9596
#> 
#> $p.value
#> [1] 0
#> 
#> $est.f.squared
#> [1] 0.05591017
Metadata

Version

1.0.0

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows