Displaying 1 result from an estimated 1 matches for "ret_typ_cd_ll".
2013 Apr 26
1
Stratified Random Sampling Proportional to Size
...Library(RODBC)
library(sqldf)
library(sampling)
#After establishing connection I query the data and sort it by strata APPT_TYP_CD_LL and EMPL_TYPE and store it in a dataframe
CURRPOP<-sqlQuery(ch,"SELECT APPT_TYP_CD_LL, EMPL_TYPE,ASOFDATE,EMPLID,NAME,DEPTID,JOBCODE,JOBTITLE,SAL_ADMIN_PLAN,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...