search for: stratp

Displaying 1 result from an estimated 1 matches for "stratp".

Did you mean: startp
2013 Apr 26
1
Stratified Random Sampling Proportional to Size
...RET_TYP_CD_LL FROM PS_EMPLOYEES_LL WHERE EMPL_STATUS NOT IN('R','T') ORDER BY APPT_TYP_CD_LL, EMPL_TYPE") #ROWID is a dummy ID I added and repositioned after the strat columns for later use CURRPOP$ROWID<-seq(nrow(CURRPOP)) CURRPOP<-CURRPOP[,c(1:2,11,3:10)] # My strata. Stratp is how many I want to sampled from each strata. NOTE THERE ARE SOME 0's which just means I won't sample from that group. stratum_cp<-sqldf("SELECT APPT_TYP_CD_LL,EMPL_TYPE, count(*) HC FROM CURRPOP GROUP BY APPT_TYP_CD_LL,EMPL_TYPE") stratum_cp$stratp<-round(stratum_cp$HC/nr...