Skip to content

Commit

Permalink
version 0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Luke J. Keele authored and gaborcsardi committed Oct 21, 2009
1 parent 70ee703 commit 00f29d4
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 10 deletions.
8 changes: 4 additions & 4 deletions DESCRIPTION
@@ -1,8 +1,8 @@
Package: rbounds
Type: Package
Title: Perform Rosenbaum bounds sensitivity tests for matched data.
Version: 0.3
Date: 2009-05-21
Version: 0.4
Date: 2009-10-21
Author: Luke J. Keele
Maintainer: Luke J. Keele <keele.4@osu.edu>
Depends: R (>= 2.7.1), Matching (>= 4.6-2)
Expand All @@ -12,6 +12,6 @@ Description: Takes matched data and calculates Rosenbaum bounds for the
for data with multiple matched controls. Is designed to work
with the Matching package and operate on Match() objects.
License: GPL (>= 2)
Packaged: Thu May 21 21:18:16 2009; Luke
Packaged: Wed Oct 21 21:05:14 2009; Luke
Repository: CRAN
Date/Publication: 2009-05-24 08:37:13
Date/Publication: 2009-10-23 06:41:12
17 changes: 13 additions & 4 deletions R/binarysens.R
Expand Up @@ -6,14 +6,24 @@ binarysens <- function(x, y=NULL, Gamma=6, GammaInc=1)
}
else
{
ctrl <- sum(x$mdata$Y[x$mdata$Tr==0])
trt <- sum(x$mdata$Y[x$mdata$Tr==1])
y.c <- x$mdata$Y[x$mdata$Tr==0]
y.t <- x$mdata$Y[x$mdata$Tr==1]
table(y.t, y.c)
y.tmp1 <- table(y.t, y.c)[2]
y.tmp2 <- table(y.t, y.c)[3]
if(y.tmp1 >= y.tmp2){
trt <- y.tmp1
ctrl <- y.tmp2
} else {
trt <- y.tmp2
ctrl <- y.tmp1
}
}
gamma <- seq(1, Gamma, by=GammaInc)
mx <- ctrl + trt
up <- c()
lo <- c()
series <- seq(trt,mx, by=1)
series <- seq(trt, mx, by=1)
n.it <- length(gamma)
for(i in 1:n.it)
{
Expand All @@ -33,4 +43,3 @@ binarysens <- function(x, y=NULL, Gamma=6, GammaInc=1)
cat("Note: Gamma is Log Odds of Differential Assignment To Treatment Due To Unobserved Factors \n")
} #end of binary.sens function


2 changes: 1 addition & 1 deletion man/binarysens.Rd
Expand Up @@ -33,7 +33,7 @@ binarysens(x,y, Gamma=6, GammaInc=1)
#
# Sensitivity Test
#
binarysens(12,100)
binarysens(12,110)

#
# Example Using Match()
Expand Down
2 changes: 1 addition & 1 deletion man/hlsens.Rd
@@ -1,6 +1,6 @@
\name{hlsens}
\alias{hlsens}
\title{Demostration Autocorrelation Function}
\title{Rosenbaum Bounds for Hodges-Lehmann Point Estimate}
\description{
Function to calculate Rosenbaum bounds for continuous or ordinal outcomes based on Hodges-Lehmann point estimate.
}
Expand Down

0 comments on commit 00f29d4

Please sign in to comment.