Description Usage Arguments Value Author(s) References Examples

`SIDES`

apply Subgroup Identification based on Differential Effect Search algorithm on a data set for binary, continuous, survival or count outcome.

1 2 3 4 |

`all_set` |
Data frame representing the global data set. The first column must be the outcome (if the outcome is survival, this column should contain a data frame with the time-to-event in the first column and the indicator status in the second column), the second column must be the treatment variable, and other columns are for covariates. |

`type_var` |
A vector of length the number of covariates giving for each of them their type. Must be either "continuous", "ordinal" or "nominal". |

`type_outcome` |
Type of outcome. Are implementing "continuous", "binary", "survival" and "count". |

`level_control` |
Value representing the control in the data set. |

`D` |
Minimum desired difference to be demonstrated between the treatment and the control. |

`L` |
Maximum number of covariates used to define a subgroup (= depth of the tree). The default value is set at 3. |

`S` |
Minimum subgroup size desired. (Subgroups that do not meet this requirement will be excluded). |

`M` |
Maximum number of best promising subgroups selected at each step of the algorithm. The default value is set at 5. |

`gamma` |
Vector of length |

`H` |
Number of data sets the global data set is split into. There will be 1 training data set and H-1 validation sets. The default value is set at 1. |

`pct_rand` |
Proportion of the global data set that is randomly allocated between training and validation sets. The default value is set at 0.5. |

`prop_gpe` |
Vector of size |

`alloc_high_prob` |
Boolean with value TRUE indicating that patients are allocated to the set the minimizing the imbalanced score, or FALSE indicated that patients are randomized into those sets inversely proportional to their imbalanced score. |

`num_crit` |
Integer representing the splitting criterion used. Value equal to 1 stands for criterion maximizing the differential effect between the two child subgroups, while value equal to 2 stands for criterion maximizing the treatment effect in at least one of the two child subgroups. The default value is set at 1. |

`step` |
When |

`nb_sub_cross` |
Number of folds for cross-validation to determine |

`alpha` |
Overall type I error rate. |

`nsim` |
Number of permutations for the resampling-based method used to protect the overall Type I error rate in a weak sense. |

`nsim_cv` |
Number of permutations for the resampling-based method used to protect the overall Type I error rate in the cross-validation part to determine |

`ord.bin` |
Number of classes continuous covariates will be discretized into. |

`M_per_covar` |
Boolean indicating if the |

`upper_best` |
Boolean indicating if greater values of the outcome mean better responses. |

`selec` |
Boolean indicating if in addition of the validated subgroups, the output should also contain subgroups that were selected (before validation). |

`seed` |
Seed. The default value is set at 42. |

`modified` |
Boolean indicating if modified or original Sidak correction is used for over-representation of covariates with more than 2 levels. Default value is TRUE. |

An object of class "SIDES" is returned, consisting of:

`candidates` |
A list containing selected candidates subgroups (before validation step) and their associated p-values. |

`confirmed` |
A list containing confirmed/validated subgroups and their associated p-values. |

Marie-Karelle Riviere-Jourdan eldamjh@gmail.com

Ilya Lipkovich, Alex Dmitrienko, Jonathan Denne and Gregory Enas. Subgroup identification based on differential effect search - A recursive partitioning method for establishing response to treatment in patient subpopulations. Statistics in Medicine, 2011. <doi:10.1002/sim.4289>

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | ```
n=500
x=data.frame(matrix(rnorm(n*10,10,5),n,10),matrix(rbinom(n*10,1,0.5),n,10))
colnames(x)=paste("x",c(1:10),sep='')
rownames(x)=1:n
trt=rbinom(n,1,0.5)
I1=(x$x1>10);n1=sum(I1)
I6=(x$x6==0);n6=sum(I6)
I7=(x$x7==0);n7=sum(I7)
y=trt*(I1*(n-n1)-(1-I1)*n1+I6*(n-n6)-(1-I6)*n6+I7*(n-n7)-(1-I7)*n7)/n+rnorm(n)
data=cbind(y,trt,x)
head(data)
# REAL EXAMPLES TO UNCOMMENT
#s1 = SIDES(all_set=data,
#type_var=c(rep("continuous",5),rep("ordinal",5)), type_outcome="continuous",
#level_control=0, D=0, L=3, S=30, M=5, gamma=c(1,1,1), H=1, num_crit=1,
#alpha=0.10, nsim=1000, ord.bin=10, upper_best=TRUE, seed=42)
#s1 = SIDES(all_set=data,
#type_var=c(rep("continuous",5),rep("ordinal",5)), type_outcome="continuous",
#level_control=0, D=0, L=3, S=30, M=5, gamma=c(1,1,1), H=2, pct_rand=0.5,
#prop_gpe=c(0.7,0.3), num_crit=1, alpha=0.10, nsim=1000, ord.bin=10,
#upper_best=TRUE, seed=42)
#Example on how to enter data for survival
#n=200
#data=data.frame(rep(NA,n), rbinom(n,1,0.5), matrix(rbinom(n*5,1,0.5),n,5))
#colnames(data)=c("y", "trt", paste("x",c(1:5),sep=''))
#rownames(data)=1:n
#data$y = matrix(NA,ncol=2,nrow=n)
#data$y[,1] = rexp(n)
#data$y[,2] = rbinom(n,1,0.5)
#head(data)
``` |

```
y trt x1 x2 x3 x4 x5 x6
1 -0.6115412 0 0.6054447 10.112935 12.517332 13.0760589 1.346203 9.382402
2 2.5187207 1 10.3903907 4.759346 11.267261 0.7114921 14.790119 8.361552
3 0.5296717 0 0.1425679 -1.231651 14.441606 14.6841790 11.531254 8.931293
4 0.3317920 0 7.6486900 16.222420 6.328635 16.8050517 8.831955 12.763078
5 -0.3165886 1 6.6752012 10.424792 11.363162 11.5460701 16.700411 2.386735
6 -1.7956548 0 9.5809128 10.241521 4.192454 -2.8553708 9.163504 6.953955
x7 x8 x9 x10 NA NA NA NA NA NA NA NA NA NA
1 11.322997 7.527573 11.332490 6.088803 1 1 1 1 0 1 1 0 1 1
2 3.936754 12.648746 12.082476 6.952925 1 1 0 0 1 1 1 0 1 1
3 14.882434 12.748384 7.548332 12.709823 0 1 0 0 1 1 0 1 1 1
4 14.881745 5.528115 7.013269 12.685180 0 0 0 0 0 1 1 1 1 1
5 13.922916 5.586791 4.866663 8.975644 1 1 1 0 0 0 0 0 0 1
6 19.582125 12.069268 3.849943 13.887611 0 0 1 0 0 1 1 1 1 1
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.