Description Usage Arguments Details Value See Also Examples
The function draws randomly n1+n0 individuals among N1 + N0 individuals with N0 > n0 representing the numbers of non-cases and N1 > n1 representing the number of cases.
1 | SeltcEch(outc, n1, n0, id, datf)
|
outc |
Outcome variable (0,1). |
n1 |
Numeric value representing the number of cases. |
n0 |
Numeric value representing the number of controls. |
id |
Identifying number of the mother-child pair. |
datf |
|
The function uses the sample
function to resample the database.
A data.frame
with n0 + n1 rows.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | set.seed(13200)
M=5000;
fl1=outc~Z1+Z2+Gm+Gc+Z2:Gm;
vpo=c(3,4)
vprob=c(0.35,0.55)
vcorr=c(2,1)
theta=0.3
beta=c(-0.916,0.857,0.405,-0.693,0.573)
interc=-2.23
Dataf<-FtSmlrmCMCM(fl1,M,theta,beta,interc,vpo,vprob,vcorr)
# Number of subjects eligible to the study in the population
N0=dim(Dataf[Dataf["outc"]==0,])[1];
N1=dim(Dataf[Dataf["outc"]==1,])[1]
N=c(N0,N1)
# Sampling of the study database
n0=308
n1=83
DatfE1<-SeltcEch("outc",n1,n0,"obs",Dataf)
DatfE1[1:10,]
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.