erickasimmonshosten-blog
Data Management
18 posts
Don't wanna be here? Send us removal request.
erickasimmonshosten-blog · 5 years ago
Text
K-Means Cluster Analysis
A k-means cluster analysis was conducted to identify factors that could result in persons attempting suicide based on their similarity of responses on 14 variables.  Clustering variables included binary variables substance abuse, as well as quantitative variables measuring alcohol problems, age and income. All clustering variables were standardized to have a mean of 0 and a standard deviation of 1.
Tumblr media
The elbow curve was inconclusive.  Canonical discriminant analyses were used to reduce the 14 clustering variables down fewer variables that accounted for most of the variance in the clustering variables. A scatterplot indicated that the observations in clusters 5, 2 and 7 were densely packed with relatively low within cluster variance and did not overlap very much with the other clusters.
Tumblr media
LIBNAME mydata "/courses/d1406ae5ba27fe300 " access=readonly; DATA CLUST; set mydata.nesarc_pds; /*DATA MANAGEMENT IF S1Q2312=9 THEN S1Q2312=.; IF S1Q2310=9 THEN S1Q2310=.; IF S3DQ1=9 THEN S3DQ1=.; IF S4AQ4A16=1 THEN ATTEMPTSUICIDE=1; ELSE ATTEMPTSUICIDE=0; IF S1Q2311=1 THEN TROPOL=1; ELSE TROPOL=0; IF S4AQ1=1 THEN DEPRESS=1; ELSE DEPRESS=0; IF  HAL12ABDEP=3 THEN HALLDEP=1; ELSE HALLDEP=0; IF COC12ABDEP=3 THEN COCDEP=1; ELSE COCDEP=0; IF S1Q2310=1 THEN FINCRIS=1; ELSE FINCRIS=0; IF S3DQ1= 1 THEN SOUHELP=1; ELSE SOUHELP=0; IF SEX=1 THEN MALE=1; IF SEX=2 THEN MALE=0; /*CREATE A UNIQUE INDENTIFIER TO MERGE CLUSTER ASSIGNMENT VARIABLE WITH THE MAIN DATA SET*/ IDNUM=_N_; KEEP IDNUM ATTEMPTSUICIDE TROPOL HALLDEP COCDEP FINCRIS SOUHELP MALE AGE S1Q10A marital alcabdep12dx consumer s2aq5d DEPRESS; /*DELETE OBSERVATIONS WITH MISSING DATA IF CMISS (OF _ALL_) THEN DELETE; RUN;*/ ODS GRAPHICS ON; /*SPLIT DATA RANDOMLY INTO TEST AND TRAINING DATA*/ PROC SURVEYSELECT DATA=CLUST OUT=TRAINTEST SEED=123 SAMPRATE=0.7 METHOD=SRS OUTALL; RUN; DATA CLUS_TRAIN; SET TRAINTEST; IF SELECTED=1; RUN; DATA CLUS_TEST; SET TRAINTEST; IF SELECTED=0; RUN; /*STANDARDIZE THE CLUSTERING VARIABLE TO HAVE A MEAN OF 0 STANDARD DEVIATION OF 1*/ PROC STANDARD DATA=CLUS_TRAIN OUT=CLUSTVAR MEAN=0 STD=1; VAR ATTEMPTSUICIDE TROPOL HALLDEP COCDEP FINCRIS SOUHELP MALE AGE DEPRESS; RUN; %MACRO KMEAN (K); PROC FASTCLUS DATA=CLUSTVAR OUT=OUTDATA&K. OUTSTAT=CLUSTSTAT&K. MAXCLUSTERS=&K. MAXITER=300; VAR ATTEMPTSUICIDE TROPOL HALLDEP COCDEP FINCRIS SOUHELP MALE AGE S1Q10A marital alcabdep12dx consumer s2aq5d DEPRESS; RUN; %MEND; %KMEAN (1); %KMEAN (2); %KMEAN (3); %KMEAN (4); %KMEAN (5); %KMEAN (6); %KMEAN (7); %KMEAN (8); %KMEAN (9); /*EXTRACT R-SQUARE VALUES FROM EACH CLUSTER SOLUTION AND THEN TO PLOT ELBOW CURVE*/ DATA CLUS1; SET CLUSTSTAT1; NCLUST=1; IF _TYPE_='RSQ'; KEEP NCLUST OVER_ALL; RUN; DATA CLUS2; SET CLUSTSTAT2; NCLUST=2; IF _TYPE_='RSQ'; KEEP NCLUST OVER_ALL; RUN; DATA CLUS3; SET CLUSTSTAT3; NCLUST=3; IF _TYPE_='RSQ'; KEEP NCLUST OVER_ALL; RUN; DATA CLUS4; SET CLUSTSTAT4; NCLUST=4; IF _TYPE_='RSQ'; KEEP NCLUST OVER_ALL; RUN; DATA CLUS5; SET CLUSTSTAT5; NCLUST=5; IF _TYPE_='RSQ'; KEEP NCLUST OVER_ALL; RUN; DATA CLUS6; SET CLUSTSTAT6; NCLUST=6; IF _TYPE_='RSQ'; KEEP NCLUST OVER_ALL; RUN; DATA CLUS7; SET CLUSTSTAT7; NCLUST=7; IF _TYPE_='RSQ'; KEEP NCLUST OVER_ALL; RUN; DATA CLUS8; SET CLUSTSTAT8; NCLUST=8; IF _TYPE_='RSQ'; KEEP NCLUST OVER_ALL; RUN; DATA CLUS9; SET CLUSTSTAT9; NCLUST=9; IF _TYPE_='RSQ'; KEEP NCLUST OVER_ALL; RUN; DATA CLUSRSQUARE; SET CLUS1 CLUS2 CLUS3 CLUS4 CLUS5 CLUS6 CLUS7 CLUS8 CLUS9; RUN; /*PLOT ELBOW CURVE USING R-SQUARE VALUES*/ SYMBOL1 COLOR=BLUE INTERPOL=JOIN; PROC GPLOT DATA=CLUSRSQUARE; PLOT OVER_ALL*NCLUST; RUN; /*FURTHER EXAMINE CLUSTER SOLUTION FOR THE NUMBER OF CLUSTERS SUGGESTED BY THE ELBOW CURVE PLOT CLUSTERS FOR 4 SOLUTION*/ PROC CANDISC DATA=OUTDATA8 OUT=CLUSTCAN; CLASS CLUSTER; VAR ATTEMPTSUICIDE TROPOL HALLDEP COCDEP FINCRIS SOUHELP MALE AGE S1Q10A marital alcabdep12dx consumer s2aq5d DEPRESS; RUN; PROC SGPLOT DATA=CLUSTCAN; SCATTER Y=CAN2 X=CAN1 / GROUP=CLUSTER; RUN;
0 notes
erickasimmonshosten-blog · 5 years ago
Text
Running a Lasso Regression Analysis
LIBNAME mydata "/courses/d1406ae5ba27fe300 " access=readonly; DATA new1; set mydata.nesarc_pds; /*DATA MANAGEMENT IF S1Q2312=9 THEN S1Q2312=.; IF S1Q2310=9 THEN S1Q2310=.; IF S3DQ1=9 THEN S3DQ1=.;*/ RENAME S1Q10A = INCOME; IF S4AQ4A16=1 THEN ATTEMPTSUICIDE=1; ELSE ATTEMPTSUICIDE=0; IF S1Q2311=1 THEN TROPOL=1; ELSE TROPOL=0; IF HER12ABDEP=3 THEN HERODEP=1; ELSE HERODEP=0; IF MAR12ABDEP=3 THEN MARIDEP=1; ELSE MARIDEP=0; IF  HAL12ABDEP=3 THEN HALLDEP=1; ELSE HALLDEP=0; IF COC12ABDEP=3 THEN COCDEP=1; ELSE COCDEP=0; IF ALCABDEP12DX=3 THEN ALCODEP=1; ELSE ALCODEP=0; IF TABLIFEDX=1 THEN NICDEP=1; ELSE NICDEP=0; IF S1Q2310=1 THEN FINCRIS=1; ELSE FINCRIS=0; IF S3DQ1= 1 THEN SOUHELP=1; ELSE SOUHELP=0; IF MARITAL=4 THEN MARSTAT=1; ELSE MARSTAT=0; IF SEX=1 THEN MALE=1; IF SEX=2 THEN MALE=0; DELETE OBSERVATIONS WITH MISSING DATA IF CMISS (OF _ALL_) THEN DELETE; RUN; ODS GRAPHICS ON; /*SPLIT DATA RANDOMLY INTO TEST AND TRAINING DATA*/ PROC SURVEYSELECT DATA=NEW1 OUT=TRAINTEST SEED=123 SAMPRATE=0.7 METHOD=SRS OUTALL; RUN; /*LASS0 MULTIPLE REGRESSION WITH LARS ALGORITHM K=10 FOLD VALIDATION*/ PROC GLMSELECT DATA=TRAINTEST PLOTS=ALL SEED=123; PARTITION ROLE=SELECTED (TRAIN='1' TEST='0'); MODEL ATTEMPTSUICIDE=TROPOL HERODEP MARIDEP HALLDEP COCDEP ALCODEP SOUHELP NICDEP FINCRIS MARSTAT INCOME SEX/SELECTION=LAR (CHOOSE=CV STOP=NONE) CVMETHOD=RANDOM (10); RUN;
Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media
The dependent variable is attempted suicide and the tested against trouble with the police, the abuse of heroine, marijuana, hallucinogens, cocaine, alcohol, those experiencing financial crisis, divorcees, males and those who would or would not have sought help for their abuse.
The table above shows the order of importance, which revealed those who did not seek help for abuse as highest ranking followed by those experiencing financial crisis; they had the largest regression coefficient and were both positively associated with attempted suicide.  
The best model was highlighted as marital status, specially, those who were divorced.
0 notes
erickasimmonshosten-blog · 6 years ago
Text
Building a Random Forest
PROC SORT; BY IDNUM; PROC HPFOREST; TARGET ALCOHOLDEP/LEVEL = NOMINAL; INPUT SOCPDLIFE MAJORDEP12 PANDX12 SEX FAMHIS MARITAL S1Q2D/LEVEL = NOMINAL; INPUT INCOME AGE / LEVEL=NOMINAL; RUN;
Tumblr media Tumblr media Tumblr media
Random forest analysis was performed using the explanatory variables of social phobia, depression, panic disorder, gender, family history for drinking (father), whether parents were divorced, marital status, age and income, which are possible contributors to a random forest evaluating alcohol dependence, which is my response variable.  
The explanatory variable with the highest relative importance scores were gender, marital status and depression.  The accuracy of the random forest was 90%, with the subsequent growing of multiple trees rather than a single tree.
0 notes
erickasimmonshosten-blog · 6 years ago
Text
Running a Classification Tree
LIBNAME mydata "/courses/d1406ae5ba27fe300 " access=readonly; DATA new1; set mydata.nesarc_pds; /*Set appropriate missing data*/ IF S2AQ5B=99 THEN S2AQ5B=.; IF S2AQ5D=99 THEN S2AQ5D=.; IF S2DQ1=9 THEN S2DQ1=.; RENAME S2AQ5D=NUMBEERSCON; RENAME S2DQ1=FAMHIS; RENAME S1Q10A=INCOME; /*SUBSETTING DATA*/ IF ALCABDEP12DX GE 1 THEN ALCOHOLDEP=1; ELSE ALCOHOLDEP=2; IF AGE LE 60; IF S2AQ5B LE 7 THEN BEERFREQ=0; /*DRINK BEERS AT LEAST ONCE PER MONTH*/ ELSE BEERFREQ=1; /*DRINK BEERS AT LEAST ONCE A YEAR*/ PROC SORT; BY IDNUM; ODS GRAPHICS ON; PROC HPSPLIT SEED=15831; CLASS ALCOHOLDEP SOCPDLIFE MAJORDEP12 PANDX12 SEX FAMHIS; MODEL ALCOHOLDEP= SOCPDLIFE MAJORDEP12 PANDX12 SEX INCOME AGE FAMHIS; GROW ENTROPY; PRUNE COSTCOMPLEXITY; RUN;
Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media
A decision tree was generated to determine the non-linear relationships and interactions among explanatory variables of social disorder, depression, panic disorder, gender, income, age and family drinking history in predicting my response variable of alcohol dependence.
The decision tree has 481 leaves before pruning and 37 leaves after.  The tree with the number of leaves that has the lowest cross validated ASE was the 55 leaf tree.
Looking at how well the final classification performed we see that the model correctly classified 2% (1-0.98%) of those who are alcohol dependent and 99% (1-0.0007) of those who are not.  We are now much better able to predict those who are not likely to be alcohol dependent and less likely to predict those who are.
0 notes
erickasimmonshosten-blog · 6 years ago
Text
Week 4: Logistic Regression
Is alcohol dependence significantly associated with the disorders of social phobia, depressions and panic disorder?  
The results show that drinkers under the age of 60 who have social phobia are 1.3 times more likely to have alcohol dependence; those with depression are 2.0 times more likely and those with panic disorders are 1.4 times more likely to have alcohol dependence.  
In fact, the confidence intervals on our odds ratios show that those with social phobia are 1.0 to 1.4 times more likely to have alcohol dependence than those without; those with depression are 1.8 to 2.2 more like and those with panic disorders are 1.1 to 1.7 times more likely.
The results show that of the variables listed there are two confounders, social phobia and panic disorders with p-values of 0.0152 and 0.0051 respectively.
Tumblr media
/*SUBSETTING DATA*/ IF ALCABDEP12DX GE 1 THEN ALCOHOLDEP=1; ELSE ALCOHOLDEP=0; IF AGE LE 60; PROC LOGISTIC DESCENDING; MODEL ALCOHOLDEP=SOCPDLIFE MAJORDEP12 PANDX12; RUN;
0 notes
erickasimmonshosten-blog · 6 years ago
Text
Test a Multiple Regression Model
LIBNAME mydata "/courses/d1406ae5ba27fe300 " access=readonly; DATA new1; set mydata.nesarc_pds; /*Set appropriate missing data*/ IF S2AQ5B=99 THEN S2AQ5B=.; IF S2AQ5D=99 THEN S2AQ5D=.; IF S2DQ1=9 THEN S2DQ1=.; RENAME S2AQ5D=NUMBEERSCON; RENAME S2DQ1=FAMHIS; /*SUBSETTING DATA*/ IF ALCABDEP12DX GE 1 THEN ALCOHOLDEP=1; ELSE ALCOHOLDEP=0; IF AGE LE 60; IF S2AQ5B LE 7 THEN BEERFREQ=0; /*DRINK BEERS AT LEAST ONCE PER MONTH*/ ELSE BEERFREQ=1; /*DRINK BEERS AT LEAST ONCE A YEAR*/ */PROC SORT; /*BY IDNUM;*/ RUN; data new2; set new1; NUMBEERSCON_C=NUMBEERSCON-2.7249431; /*BEERFREQ_C=BEERFREQ-6.1190672;*/ AGE_C=AGE-38.3809769; RUN; /*PROC MEANS; VAR NUMBEERSCON_C AGE_C; PROC GLM; MODEL ALCOHOLDEP=BEERFREQ NUMBEERSCON_C AGE_C/SOLUTION CLPARM; PROC GLM; MODEL ALCOHOLDEP=BEERFREQ/SOLUTION CLPARM;*/ PROC GLM PLOTS (MAXPOINTS=NONE) PLOTS (UNPACK)=ALL; MODEL ALCOHOLDEP=BEERFREQ FAMHIS AGE_C NUMBEERSCON_C/SOLUTION CLPARM; output residual=res student=stdres out=results; RUN; PROC GPLOT; LABEL stdres="standardized residual" IDNUM="ID"; PLOT STDRES*IDNUM/VREF=0; RUN; /*DATA PARTIAL; SET NEW1; BEERFREQ1=BEERFREQ*BEERFREQ; RUN; PROC REG PLOTS=PARTIAL PLOTS (MAXPOINTS=NONE); MODEL ALCOHOLDEP=BEERFREQ BEERFREQ1 NUMBEERSCON_C/PARTIAL; RUN;
Tumblr media Tumblr media Tumblr media Tumblr media
Is there an association between alcohol dependence and frequency with  beers are consumed?
The data was first managed managed to appropriate missing data and ensuring that the categorical explanatory variables (BEERFREQ, FAMHIS) has one category as 0.  the quantitative variable was centered (AGE).
As it stands the relationship with the variables are significant with p-values of <.0001 and parameter estimates are negative, indicating that less beer drinking frequency and age is associated with a lesser number of alcohol dependency.
Another potential co founder, number of beers consumed (NUMBEERCON_C) was added.  We can conclude that after controlling for the other variables, number of beers consumed is positively associated with alcohol  dependence.
The variables measured only account for 15% (R-Square) of the variability of alcohol dependence so clearly there are some errors in estimating the response value.
the Q-Q Plot do not follow perfect normal distribution or a straight line and therefore there are other explanatory variables that can be included to improve the estimation of the observed curvilinearity.   
Looking at the plot of the standardized residuals, while most of the residuals fall within standard deviations of the mean, it be be noted that more than 5% have a value greater than 2 and therefore the level of error is unacceptable as it poorly fits the observed data.
The leverage plot shows outliers with residuals greater then 2, as highlighted in red, which indicates that they may influence negatively the estimation of the regression.
0 notes
erickasimmonshosten-blog · 6 years ago
Text
Basic Linear Regression Model
Tumblr media Tumblr media
The explanatory variable is categorical with four categories therefore they had to be collapsed to two categories, ensuring that one of the variables was coded as “0″.  
The F statistic is 1622.48 and the p-value is <.0001 which tells us that we can reject the null hypothesis and conclude that beer consumption frequency is significantly associated with alcohol dependence.  
the results of the linear regression model indicated that beer consumption (Beta 6.48, p<.0001) was significantly and positively associated with alcohol dependence. 
The R-Square value is 0.093014 or 9.3% which is the portion of alcohol dependence that can be explained by beer consumption.  
CODE:
LIBNAME mydata "/courses/d1406ae5ba27fe300 " access=readonly; DATA new1; set mydata.nesarc_pds;
/*Set appropriate missing data*/ IF S2AQ5B=99 THEN S2AQ5B=.; IF S2AQ7B=99 THEN S2AQ7B=.; IF S2AQ5D=99 THEN S2AQ5D=.; RENAME S2AQ5D=NUMBEERSCON; RENAME S2AQ5B=BEERFREQ;
/*SUBSETTING DATA*/ IF ALCABDEP12DX GE 1 THEN ALCOHOLDEP=1; ELSE ALCOHOLDEP=0; IF AGE LE 60;
IF S2AQ5B LE 7 THEN BEERFREQ=0; /*DRINK BEERS AT LEAST ONCE PER MONTH*/ ELSE BEERFREQ=1; /*DRINK BEERS AT LEAST ONCE A YEAR*/
PROC SORT; BY IDNUM;
PROC GLM; MODEL BEERFREQ=ALCOHOLDEP/SOLUTION;
PROC GCHART; VBAR ALCOHOLDEP/DISCRETE TYPE=MEAN SUMVAR=BEERFREQ; RUN;
0 notes
erickasimmonshosten-blog · 6 years ago
Text
Measure
From the sample the number of persons indicating alcohol abuse and or dependence were identified.  Also assessed was the amount of liquor consumed and how often it was consumed within the last 12 months, which was categorized by frequency; those who drank every day and those less often.   From this amount the number of persons who unsuccessfully tried more than once to stop or cut down their drinking.  In addition, the number of persons who attempted drug/alcohol rehabilitation were examined to determine the response rate of persons seeking help for alcohol related issues.
0 notes
erickasimmonshosten-blog · 6 years ago
Text
Procedure
Data were collected between 2001 and 2002 in face-to-face, computer-assisted personal interviews conducted in respondents’ homes. All potential respondents were advised in writing about the nature of the survey, the statistical uses of the survey data and was advised that their participation was voluntary (National Institute on Alcohol Abuse and Alcoholism).
0 notes
erickasimmonshosten-blog · 6 years ago
Text
Sample
The sample of 43,093 persons were surveyed as part of the National Epidemiologic Survey on Drug Use and Health (NESARC). This sample included a mixture of males (n=18,518, 42%) and females (n=24,575, 57%).  Among the sample were ages 21 and under (n=2931, 7%), ages 22 to 35 (n=10,888, 25%), ages between 36 and 60 (n=19,204, 45%) and ages 60 and over (n=10,070, 23%).   The survey included households, persons living in military boarding or rooming houses,  nontransient hotels and motels, shelters, facilities for housing workers, college quarters, group homes and personnel living off base of different ethnicities (National Institute on Alcohol Abuse and Alcoholism) . 
0 notes
erickasimmonshosten-blog · 6 years ago
Text
Defining Moderation
Tumblr media
For the low income group ($5k and under) the correlation coefficient between age and glasses of wine consumes is negative 0.14016 and the p-value is significant.   
For the second income group ($10k and under) the correlation coefficient is negative 0.23036 and the p-value is significant. 
For the third income group ($50k and under) the correlation coefficient is negative 0.18897 and the p-value is significant
For the fourth income group ($50k and above) the correlation coefficient is negative 0.14328 and the p-value is also significant
This therefore means that the moderating variable, income, does have not any impact on the association of age and the number of glasses of wine consumed.
Tumblr media Tumblr media Tumblr media Tumblr media
0 notes
erickasimmonshosten-blog · 6 years ago
Text
Pearson Correlation
Code:
LIBNAME mydata "/courses/d1406ae5ba27fe300 " access=readonly; DATA new; set mydata.nesarc_pds; LABEL S2AQ6E="Glasses of Wine Consumed" /*Set appropriate missing data*/ IF S2AQ6E=99 THEN S2AQ6E=.; IF AGE LE 30 THEN AGEGROUP=1; ELSE IF AGE LE 50 THEN AGEGROUP=2; ELSE IF AGE LE 65 THEN AGEGROUP=3; ELSE IF AGE LE 80 THEN AGEGROUP=4; ELSE IF AGE LE 97 THEN AGEGROUP=5; ELSE IF AGE GT 97 THEN AGEGROUP=6; PROC SORT; BY IDNUM; PROC CORR; VAR AGE S2AQ6E; RUN;
Tumblr media
The correlation coefficients for the association between age and glasses of wine consumed was -0.17143  which suggests a negative correlation, which is not very strong.  This can be interpreted as when a person’s age increases less glasses of wine is expected to be consumed.   The p-value is 0.0001 which suggests the relationship is statistically significant. 
0 notes
erickasimmonshosten-blog · 6 years ago
Text
Chi Square Test of Independence
A chi square test of independence was used as the explanatory and response variables were categorical.  The explanatory variable had more than two variables so a post hoc test (bonferroni adjustment) had to be conducted.  The adjust p-value is 0.007(0.05/7)
Each paired comparison was examined.  Prevalence of alcohol abuse and or dependence was statistically similar among groups drinking 1, 4 and 8 beers per month. The results show that persons who drank beers everyday are more likely to be dependent or abuse alcohol, whereas for persons who drank beer once per month or less are less likely to abuse or become dependent on alcohol. 
CODE
LIBNAME mydata "/courses/d1406ae5ba27fe300 " access=readonly; DATA new; set mydata.nesarc_pds;
LABEL ALCABDEP12DX="Alcohol Abuse/Dependence Past 12 Months" S2AQ3="Drank ALcohol in Past 12 Months" S2AQ5B="Frequency of Beer Consumption" S2AQ5D="Quantity of Beer Consumption";
/*Set appropriate missing data*/ IF S2AQ3=9 THEN S2AQ3=.; IF S2AQ5B=99 THEN S2AQ5B=.; IF S2AQ5D=99 THEN S2AQ5D=.;
IF S2AQ5B=1 THEN USFREQMO=30; /*EVERYDAY*/ ELSE IF S2AQ5B=2 THEN USFREQMO=24; /*NEARLY EVERYDAY*/ ELSE IF S2AQ5B=3 THEN USFREQMO=14; /*3 TO 4 TIMES A WEEK*/ ELSE IF S2AQ5B=4 THEN USFREQMO=8; /*2 TIMES A WEEK*/ ELSE IF S2AQ5B=5 THEN USFREQMO=4; /*ONCE A WEEK*/ ELSE IF S2AQ5B=6 THEN USFREQMO=2.5; /*2 TO 3 TIMES A MONTH*/ ELSE USFREQMO=1; /*ONCE A MONTH OR LESS*/
NUMBEERMO_EST=USFREQMO*S2AQ5D;
/*SUBSETTING DATA TO INCLUDE ONLY PAST 12 MONTH DRINKERS, AGES 18-40*/ IF S2AQ3=1; IF AGE LE 40;
IF ALCABDEP12DX LE 0 THEN DEPENDENCE=0; ELSE DEPENDENCE=1;
PROC SORT; BY IDNUM;
PROC FREQ; TABLES DEPENDENCE*USFREQMO/CHISQ;
RUN;
DATA COMPARISON1; SET NEW; IF USFREQMO=1 OR USFREQMO=2.5; PROC SORT; BY IDNUM; PROC FREQ; TABLES DEPENDENCE*USFREQMO/CHISQ; RUN;
DATA COMPARISON2; SET NEW; IF USFREQMO=1 OR USFREQMO=4; PROC SORT; BY IDNUM; PROC FREQ; TABLES DEPENDENCE*USFREQMO/CHISQ; RUN;
DATA COMPARISON3; SET NEW; IF USFREQMO=1 OR USFREQMO=8; PROC SORT; BY IDNUM; PROC FREQ; TABLES DEPENDENCE*USFREQMO/CHISQ; RUN;
DATA COMPARISON4; SET NEW; IF USFREQMO=1 OR USFREQMO=14; PROC SORT; BY IDNUM; PROC FREQ; TABLES DEPENDENCE*USFREQMO/CHISQ; RUN;
DATA COMPARISON5; SET NEW; IF USFREQMO=1 OR USFREQMO=24; PROC SORT; BY IDNUM; PROC FREQ; TABLES DEPENDENCE*USFREQMO/CHISQ; RUN;
DATA COMPARISON6; SET NEW; IF USFREQMO=1 OR USFREQMO=30; PROC SORT; BY IDNUM; PROC FREQ; TABLES DEPENDENCE*USFREQMO/CHISQ; RUN;
DATA COMPARISON7; SET NEW; IF USFREQMO=2.5 OR USFREQMO=4; PROC SORT; BY IDNUM; PROC FREQ; TABLES DEPENDENCE*USFREQMO/CHISQ; RUN;
DATA COMPARISON8; SET NEW; IF USFREQMO=2.5 OR USFREQMO=8; PROC SORT; BY IDNUM; PROC FREQ; TABLES DEPENDENCE*USFREQMO/CHISQ; RUN;
DATA COMPARISON9; SET NEW; IF USFREQMO=2.5 OR USFREQMO=14; PROC SORT; BY IDNUM; PROC FREQ; TABLES DEPENDENCE*USFREQMO/CHISQ; RUN;
DATA COMPARISON10; SET NEW; IF USFREQMO=2.5 OR USFREQMO=24; PROC SORT; BY IDNUM; PROC FREQ; TABLES DEPENDENCE*USFREQMO/CHISQ; RUN;
DATA COMPARISON11; SET NEW; IF USFREQMO=2.5 OR USFREQMO=30; PROC SORT; BY IDNUM; PROC FREQ; TABLES DEPENDENCE*USFREQMO/CHISQ; RUN;
DATA COMPARISON12; SET NEW; IF USFREQMO=4 OR USFREQMO=8; PROC SORT; BY IDNUM; PROC FREQ; TABLES DEPENDENCE*USFREQMO/CHISQ; RUN;
DATA COMPARISON13; SET NEW; IF USFREQMO=4 OR USFREQMO=14; PROC SORT; BY IDNUM; PROC FREQ; TABLES DEPENDENCE*USFREQMO/CHISQ; RUN;
DATA COMPARISON14; SET NEW; IF USFREQMO=4 OR USFREQMO=24; PROC SORT; BY IDNUM; PROC FREQ; TABLES DEPENDENCE*USFREQMO/CHISQ; RUN;
DATA COMPARISON15; SET NEW; IF USFREQMO=4 OR USFREQMO=30; PROC SORT; BY IDNUM; PROC FREQ; TABLES DEPENDENCE*USFREQMO/CHISQ; RUN;
DATA COMPARISON16; SET NEW; IF USFREQMO=8 OR USFREQMO=14; PROC SORT; BY IDNUM; PROC FREQ; TABLES DEPENDENCE*USFREQMO/CHISQ; RUN;
DATA COMPARISON17; SET NEW; IF USFREQMO=8 OR USFREQMO=24; PROC SORT; BY IDNUM; PROC FREQ; TABLES DEPENDENCE*USFREQMO/CHISQ; RUN;
DATA COMPARISON18; SET NEW; IF USFREQMO=8 OR USFREQMO=30; PROC SORT; BY IDNUM; PROC FREQ; TABLES DEPENDENCE*USFREQMO/CHISQ; RUN;
DATA COMPARISON19; SET NEW; IF USFREQMO=14 OR USFREQMO=24; PROC SORT; BY IDNUM; PROC FREQ; TABLES DEPENDENCE*USFREQMO/CHISQ; RUN;
DATA COMPARISON20; SET NEW; IF USFREQMO=14 OR USFREQMO=30; PROC SORT; BY IDNUM; PROC FREQ; TABLES DEPENDENCE*USFREQMO/CHISQ; RUN;
DATA COMPARISON21; SET NEW; IF USFREQMO=24 OR USFREQMO=30; PROC SORT; BY IDNUM; PROC FREQ; TABLES DEPENDENCE*USFREQMO/CHISQ; RUN;
TABLES
The FREQ Procedure
The Freq Procedure
Table DEPENDENCE * USFREQMO
Cross-Tabular Freq Table
Frequency
Percent
Row Pct
Col Pct
Table of DEPENDENCE by USFREQMO
DEPENDENCE
USFREQMO
1
2.5
4
8
14
24
30
Total
0
7189
54.30
65.37
93.27
1220
9.21
11.09
79.38
1095
8.27
9.96
77.00
783
5.91
7.12
63.35
444
3.35
4.04
56.70
139
1.05
1.26
50.55
128
0.97
1.16
45.88
10998
83.07
    1
519
3.92
23.15
6.73
317
2.39
14.14
20.62
327
2.47
14.59
23.00
453
3.42
20.21
36.65
339
2.56
15.12
43.30
136
1.03
6.07
49.45
151
1.14
6.74
54.12
2242
16.93
    Total
7708
58.22
1537
11.61
1422
10.74
1236
9.34
783
5.91
275
2.08
279
2.11
13240
100.00
Statistics for Table of DEPENDENCE by USFREQMO
Chi-Square Tests
Statistic
DF
Value
Prob
Chi-Square
6
1831.7172
<.0001
Likelihood Ratio Chi-Square
6
1681.3017
<.0001
Mantel-Haenszel Chi-Square
1
1453.7745
<.0001
Phi Coefficient
  0.3720
  Contingency Coefficient
  0.3486
  Cramer's V
  0.3720
  Sample Size = 13240
The FREQ Procedure
The Freq Procedure
Table DEPENDENCE * USFREQMO
Cross-Tabular Freq Table
Frequency
Percent
Row Pct
Col Pct
Table of DEPENDENCE by USFREQMO
DEPENDENCE
USFREQMO
1
2.5
Total
0
7189
77.76
85.49
93.27
1220
13.20
14.51
79.38
8409
90.96
    1
519
5.61
62.08
6.73
317
3.43
37.92
20.62
836
9.04
    Total
7708
83.37
1537
16.63
9245
100.00
Statistics for Table of DEPENDENCE by USFREQMO
Chi-Square Tests
Statistic
DF
Value
Prob
Chi-Square
1
300.6488
<.0001
Likelihood Ratio Chi-Square
1
244.8186
<.0001
Continuity Adj. Chi-Square
1
298.9623
<.0001
Mantel-Haenszel Chi-Square
1
300.6163
<.0001
Phi Coefficient
  0.1803
  Contingency Coefficient
  0.1775
  Cramer's V
  0.1803
  Fisher's Exact Test
Fisher's Exact Test
Cell (1,1) Frequency (F)
7189
Left-sided Pr <= F
1.0000
Right-sided Pr >= F
<.0001
    Table Probability (P)
<.0001
Two-sided Pr <= P
<.0001
Sample Size = 9245
The FREQ Procedure
The Freq Procedure
Table DEPENDENCE * USFREQMO
Cross-Tabular Freq Table
Frequency
Percent
Row Pct
Col Pct
Table of DEPENDENCE by USFREQMO
DEPENDENCE
USFREQMO
1
4
Total
0
7189
78.74
86.78
93.27
1095
11.99
13.22
77.00
8284
90.73
    1
519
5.68
61.35
6.73
327
3.58
38.65
23.00
846
9.27
    Total
7708
84.42
1422
15.58
9130
100.00
Statistics for Table of DEPENDENCE by USFREQMO
Chi-Square Tests
Statistic
DF
Value
Prob
Chi-Square
1
377.6392
<.0001
Likelihood Ratio Chi-Square
1
299.5628
<.0001
Continuity Adj. Chi-Square
1
375.7074
<.0001
Mantel-Haenszel Chi-Square
1
377.5979
<.0001
Phi Coefficient
  0.2034
  Contingency Coefficient
  0.1993
  Cramer's V
  0.2034
  Fisher's Exact Test
Fisher's Exact Test
Cell (1,1) Frequency (F)
7189
Left-sided Pr <= F
1.0000
Right-sided Pr >= F
<.0001
    Table Probability (P)
<.0001
Two-sided Pr <= P
<.0001
Sample Size = 9130
The FREQ Procedure
The Freq Procedure
Table DEPENDENCE * USFREQMO
Cross-Tabular Freq Table
Frequency
Percent
Row Pct
Col Pct
Table of DEPENDENCE by USFREQMO
DEPENDENCE
USFREQMO
1
8
Total
0
7189
80.38
90.18
93.27
783
8.75
9.82
63.35
7972
89.13
    1
519
5.80
53.40
6.73
453
5.06
46.60
36.65
972
10.87
    Total
7708
86.18
1236
13.82
8944
100.00
Statistics for Table of DEPENDENCE by USFREQMO
Chi-Square Tests
Statistic
DF
Value
Prob
Chi-Square
1
984.2398
<.0001
Likelihood Ratio Chi-Square
1
721.6409
<.0001
Continuity Adj. Chi-Square
1
981.1537
<.0001
Mantel-Haenszel Chi-Square
1
984.1297
<.0001
Phi Coefficient
  0.3317
  Contingency Coefficient
  0.3149
  Cramer's V
  0.3317
  Fisher's Exact Test
Fisher's Exact Test
Cell (1,1) Frequency (F)
7189
Left-sided Pr <= F
1.0000
Right-sided Pr >= F
<.0001
    Table Probability (P)
<.0001
Two-sided Pr <= P
<.0001
Sample Size = 8944
The FREQ Procedure
The Freq Procedure
Table DEPENDENCE * USFREQMO
Cross-Tabular Freq Table
Frequency
Percent
Row Pct
Col Pct
Table of DEPENDENCE by USFREQMO
DEPENDENCE
USFREQMO
1
14
Total
0
7189
84.67
94.18
93.27
444
5.23
5.82
56.70
7633
89.90
    1
519
6.11
60.49
6.73
339
3.99
39.51
43.30
858
10.10
    Total
7708
90.78
783
9.22
8491
100.00
Statistics for Table of DEPENDENCE by USFREQMO
Chi-Square Tests
Statistic
DF
Value
Prob
Chi-Square
1
1046.0052
<.0001
Likelihood Ratio Chi-Square
1
685.3400
<.0001
Continuity Adj. Chi-Square
1
1041.9841
<.0001
Mantel-Haenszel Chi-Square
1
1045.8820
<.0001
Phi Coefficient
  0.3510
  Contingency Coefficient
  0.3312
  Cramer's V
  0.3510
  Fisher's Exact Test
Fisher's Exact Test
Cell (1,1) Frequency (F)
7189
Left-sided Pr <= F
1.0000
Right-sided Pr >= F
<.0001
    Table Probability (P)
<.0001
Two-sided Pr <= P
<.0001
Sample Size = 8491
The FREQ Procedure
The Freq Procedure
Table DEPENDENCE * USFREQMO
Cross-Tabular Freq Table
Frequency
Percent
Row Pct
Col Pct
Table of DEPENDENCE by USFREQMO
DEPENDENCE
USFREQMO
1
24
Total
0
7189
90.05
98.10
93.27
139
1.74
1.90
50.55
7328
91.80
    1
519
6.50
79.24
6.73
136
1.70
20.76
49.45
655
8.20
    Total
7708
96.56
275
3.44
7983
100.00
Statistics for Table of DEPENDENCE by USFREQMO
Chi-Square Tests
Statistic
DF
Value
Prob
Chi-Square
1
643.4315
<.0001
Likelihood Ratio Chi-Square
1
346.2143
<.0001
Continuity Adj. Chi-Square
1
637.7718
<.0001
Mantel-Haenszel Chi-Square
1
643.3509
<.0001
Phi Coefficient
  0.2839
  Contingency Coefficient
  0.2731
  Cramer's V
  0.2839
  Fisher's Exact Test
Fisher's Exact Test
Cell (1,1) Frequency (F)
7189
Left-sided Pr <= F
1.0000
Right-sided Pr >= F
<.0001
    Table Probability (P)
<.0001
Two-sided Pr <= P
<.0001
Sample Size = 7983
The FREQ Procedure
The Freq Procedure
Table DEPENDENCE * USFREQMO
Cross-Tabular Freq Table
Frequency
Percent
Row Pct
Col Pct
Table of DEPENDENCE by USFREQMO
DEPENDENCE
USFREQMO
1
30
Total
0
7189
90.01
98.25
93.27
128
1.60
1.75
45.88
7317
91.61
    1
519
6.50
77.46
6.73
151
1.89
22.54
54.12
670
8.39
    Total
7708
96.51
279
3.49
7987
100.00
Statistics for Table of DEPENDENCE by USFREQMO
Chi-Square Tests
Statistic
DF
Value
Prob
Chi-Square
1
786.8093
<.0001
Likelihood Ratio Chi-Square
1
415.3087
<.0001
Continuity Adj. Chi-Square
1
780.6550
<.0001
Mantel-Haenszel Chi-Square
1
786.7108
<.0001
Phi Coefficient
  0.3139
  Contingency Coefficient
  0.2995
  Cramer's V
  0.3139
  Fisher's Exact Test
Fisher's Exact Test
Cell (1,1) Frequency (F)
7189
Left-sided Pr <= F
1.0000
Right-sided Pr >= F
<.0001
    Table Probability (P)
<.0001
Two-sided Pr <= P
<.0001
Sample Size = 7987
The FREQ Procedure
The Freq Procedure
Table DEPENDENCE * USFREQMO
Cross-Tabular Freq Table
Frequency
Percent
Row Pct
Col Pct
Table of DEPENDENCE by USFREQMO
DEPENDENCE
USFREQMO
2.5
4
Total
0
1220
41.23
52.70
79.38
1095
37.01
47.30
77.00
2315
78.24
    1
317
10.71
49.22
20.62
327
11.05
50.78
23.00
644
21.76
    Total
1537
51.94
1422
48.06
2959
100.00
Statistics for Table of DEPENDENCE by USFREQMO
Chi-Square Tests
Statistic
DF
Value
Prob
Chi-Square
1
2.4390
0.1184
Likelihood Ratio Chi-Square
1
2.4375
0.1185
Continuity Adj. Chi-Square
1
2.3017
0.1292
Mantel-Haenszel Chi-Square
1
2.4382
0.1184
Phi Coefficient
  0.0287
  Contingency Coefficient
  0.0287
  Cramer's V
  0.0287
  Fisher's Exact Test
Fisher's Exact Test
Cell (1,1) Frequency (F)
1220
Left-sided Pr <= F
0.9459
Right-sided Pr >= F
0.0646
    Table Probability (P)
0.0105
Two-sided Pr <= P
0.1190
Sample Size = 2959
The FREQ Procedure
The Freq Procedure
Table DEPENDENCE * USFREQMO
Cross-Tabular Freq Table
Frequency
Percent
Row Pct
Col Pct
Table of DEPENDENCE by USFREQMO
DEPENDENCE
USFREQMO
2.5
8
Total
0
1220
44.00
60.91
79.38
783
28.24
39.09
63.35
2003
72.23
    1
317
11.43
41.17
20.62
453
16.34
58.83
36.65
770
27.77
    Total
1537
55.43
1236
44.57
2773
100.00
Statistics for Table of DEPENDENCE by USFREQMO
Chi-Square Tests
Statistic
DF
Value
Prob
Chi-Square
1
87.7233
<.0001
Likelihood Ratio Chi-Square
1
87.5229
<.0001
Continuity Adj. Chi-Square
1
86.9261
<.0001
Mantel-Haenszel Chi-Square
1
87.6917
<.0001
Phi Coefficient
  0.1779
  Contingency Coefficient
  0.1751
  Cramer's V
  0.1779
  Fisher's Exact Test
Fisher's Exact Test
Cell (1,1) Frequency (F)
1220
Left-sided Pr <= F
1.0000
Right-sided Pr >= F
<.0001
    Table Probability (P)
<.0001
Two-sided Pr <= P
<.0001
Sample Size = 2773
The FREQ Procedure
The Freq Procedure
Table DEPENDENCE * USFREQMO
Cross-Tabular Freq Table
Frequency
Percent
Row Pct
Col Pct
Table of DEPENDENCE by USFREQMO
DEPENDENCE
USFREQMO
2.5
14
Total
0
1220
52.59
73.32
79.38
444
19.14
26.68
56.70
1664
71.72
    1
317
13.66
48.32
20.62
339
14.61
51.68
43.30
656
28.28
    Total
1537
66.25
783
33.75
2320
100.00
Statistics for Table of DEPENDENCE by USFREQMO
Chi-Square Tests
Statistic
DF
Value
Prob
Chi-Square
1
131.4576
<.0001
Likelihood Ratio Chi-Square
1
127.4776
<.0001
Continuity Adj. Chi-Square
1
130.3422
<.0001
Mantel-Haenszel Chi-Square
1
131.4010
<.0001
Phi Coefficient
  0.2380
  Contingency Coefficient
  0.2316
  Cramer's V
  0.2380
  Fisher's Exact Test
Fisher's Exact Test
Cell (1,1) Frequency (F)
1220
Left-sided Pr <= F
1.0000
Right-sided Pr >= F
<.0001
    Table Probability (P)
<.0001
Two-sided Pr <= P
<.0001
Sample Size = 2320
The FREQ Procedure
The Freq Procedure
Table DEPENDENCE * USFREQMO
Cross-Tabular Freq Table
Frequency
Percent
Row Pct
Col Pct
Table of DEPENDENCE by USFREQMO
DEPENDENCE
USFREQMO
2.5
24
Total
0
1220
67.33
89.77
79.38
139
7.67
10.23
50.55
1359
75.00
    1
317
17.49
69.98
20.62
136
7.51
30.02
49.45
453
25.00
    Total
1537
84.82
275
15.18
1812
100.00
Statistics for Table of DEPENDENCE by USFREQMO
Chi-Square Tests
Statistic
DF
Value
Prob
Chi-Square
1
103.4034
<.0001
Likelihood Ratio Chi-Square
1
92.2223
<.0001
Continuity Adj. Chi-Square
1
101.8715
<.0001
Mantel-Haenszel Chi-Square
1
103.3464
<.0001
Phi Coefficient
  0.2389
  Contingency Coefficient
  0.2323
  Cramer's V
  0.2389
  Fisher's Exact Test
Fisher's Exact Test
Cell (1,1) Frequency (F)
1220
Left-sided Pr <= F
1.0000
Right-sided Pr >= F
<.0001
    Table Probability (P)
<.0001
Two-sided Pr <= P
<.0001
Sample Size = 1812
The FREQ Procedure
The Freq Procedure
Table DEPENDENCE * USFREQMO
Cross-Tabular Freq Table
Frequency
Percent
Row Pct
Col Pct
Table of DEPENDENCE by USFREQMO
DEPENDENCE
USFREQMO
2.5
30
Total
0
1220
67.18
90.50
79.38
128
7.05
9.50
45.88
1348
74.23
    1
317
17.46
67.74
20.62
151
8.31
32.26
54.12
468
25.77
    Total
1537
84.64
279
15.36
1816
100.00
Statistics for Table of DEPENDENCE by USFREQMO
Chi-Square Tests
Statistic
DF
Value
Prob
Chi-Square
1
138.5087
<.0001
Likelihood Ratio Chi-Square
1
123.2307
<.0001
Continuity Adj. Chi-Square
1
136.7631
<.0001
Mantel-Haenszel Chi-Square
1
138.4324
<.0001
Phi Coefficient
  0.2762
  Contingency Coefficient
  0.2662
  Cramer's V
  0.2762
  Fisher's Exact Test
Fisher's Exact Test
Cell (1,1) Frequency (F)
1220
Left-sided Pr <= F
1.0000
Right-sided Pr >= F
<.0001
    Table Probability (P)
<.0001
Two-sided Pr <= P
<.0001
Sample Size = 1816
The FREQ Procedure
The Freq Procedure
Table DEPENDENCE * USFREQMO
Cross-Tabular Freq Table
Frequency
Percent
Row Pct
Col Pct
Table of DEPENDENCE by USFREQMO
DEPENDENCE
USFREQMO
4
8
Total
0
1095
41.20
58.31
77.00
783
29.46
41.69
63.35
1878
70.65
    1
327
12.30
41.92
23.00
453
17.04
58.08
36.65
780
29.35
    Total
1422
53.50
1236
46.50
2658
100.00
Statistics for Table of DEPENDENCE by USFREQMO
Chi-Square Tests
Statistic
DF
Value
Prob
Chi-Square
1
59.4631
<.0001
Likelihood Ratio Chi-Square
1
59.4918
<.0001
Continuity Adj. Chi-Square
1
58.8063
<.0001
Mantel-Haenszel Chi-Square
1
59.4407
<.0001
Phi Coefficient
  0.1496
  Contingency Coefficient
  0.1479
  Cramer's V
  0.1496
  Fisher's Exact Test
Fisher's Exact Test
Cell (1,1) Frequency (F)
1095
Left-sided Pr <= F
1.0000
Right-sided Pr >= F
<.0001
    Table Probability (P)
<.0001
Two-sided Pr <= P
<.0001
Sample Size = 2658
The FREQ Procedure
The Freq Procedure
Table DEPENDENCE * USFREQMO
Cross-Tabular Freq Table
Frequency
Percent
Row Pct
Col Pct
Table of DEPENDENCE by USFREQMO
DEPENDENCE
USFREQMO
4
14
Total
0
1095
49.66
71.15
77.00
444
20.14
28.85
56.70
1539
69.80
    1
327
14.83
49.10
23.00
339
15.37
50.90
43.30
666
30.20
    Total
1422
64.49
783
35.51
2205
100.00
Statistics for Table of DEPENDENCE by USFREQMO
Chi-Square Tests
Statistic
DF
Value
Prob
Chi-Square
1
98.6999
<.0001
Likelihood Ratio Chi-Square
1
96.5912
<.0001
Continuity Adj. Chi-Square
1
97.7393
<.0001
Mantel-Haenszel Chi-Square
1
98.6551
<.0001
Phi Coefficient
  0.2116
  Contingency Coefficient
  0.2070
  Cramer's V
  0.2116
  Fisher's Exact Test
Fisher's Exact Test
Cell (1,1) Frequency (F)
1095
Left-sided Pr <= F
1.0000
Right-sided Pr >= F
<.0001
    Table Probability (P)
<.0001
Two-sided Pr <= P
<.0001
Sample Size = 2205
The FREQ Procedure
The Freq Procedure
Table DEPENDENCE * USFREQMO
Cross-Tabular Freq Table
Frequency
Percent
Row Pct
Col Pct
Table of DEPENDENCE by USFREQMO
DEPENDENCE
USFREQMO
4
24
Total
0
1095
64.53
88.74
77.00
139
8.19
11.26
50.55
1234
72.72
    1
327
19.27
70.63
23.00
136
8.01
29.37
49.45
463
27.28
    Total
1422
83.79
275
16.21
1697
100.00
Statistics for Table of DEPENDENCE by USFREQMO
Chi-Square Tests
Statistic
DF
Value
Prob
Chi-Square
1
81.3125
<.0001
Likelihood Ratio Chi-Square
1
74.3246
<.0001
Continuity Adj. Chi-Square
1
79.9843
<.0001
Mantel-Haenszel Chi-Square
1
81.2645
<.0001
Phi Coefficient
  0.2189
  Contingency Coefficient
  0.2138
  Cramer's V
  0.2189
  Fisher's Exact Test
Fisher's Exact Test
Cell (1,1) Frequency (F)
1095
Left-sided Pr <= F
1.0000
Right-sided Pr >= F
<.0001
    Table Probability (P)
<.0001
Two-sided Pr <= P
<.0001
Sample Size = 1697
The FREQ Procedure
The Freq Procedure
Table DEPENDENCE * USFREQMO
Cross-Tabular Freq Table
Frequency
Percent
Row Pct
Col Pct
Table of DEPENDENCE by USFREQMO
DEPENDENCE
USFREQMO
4
30
Total
0
1095
64.37
89.53
77.00
128
7.52
10.47
45.88
1223
71.90
    1
327
19.22
68.41
23.00
151
8.88
31.59
54.12
478
28.10
    Total
1422
83.60
279
16.40
1701
100.00
Statistics for Table of DEPENDENCE by USFREQMO
Chi-Square Tests
Statistic
DF
Value
Prob
Chi-Square
1
111.8414
<.0001
Likelihood Ratio Chi-Square
1
102.0327
<.0001
Continuity Adj. Chi-Square
1
110.3062
<.0001
Mantel-Haenszel Chi-Square
1
111.7757
<.0001
Phi Coefficient
  0.2564
  Contingency Coefficient
  0.2484
  Cramer's V
  0.2564
  Fisher's Exact Test
Fisher's Exact Test
Cell (1,1) Frequency (F)
1095
Left-sided Pr <= F
1.0000
Right-sided Pr >= F
<.0001
    Table Probability (P)
<.0001
Two-sided Pr <= P
<.0001
Sample Size = 1701
The FREQ Procedure
The Freq Procedure
Table DEPENDENCE * USFREQMO
Cross-Tabular Freq Table
Frequency
Percent
Row Pct
Col Pct
Table of DEPENDENCE by USFREQMO
DEPENDENCE
USFREQMO
8
14
Total
0
783
38.78
63.81
63.35
444
21.99
36.19
56.70
1227
60.77
    1
453
22.44
57.20
36.65
339
16.79
42.80
43.30
792
39.23
    Total
1236
61.22
783
38.78
2019
100.00
Statistics for Table of DEPENDENCE by USFREQMO
Chi-Square Tests
Statistic
DF
Value
Prob
Chi-Square
1
8.8772
0.0029
Likelihood Ratio Chi-Square
1
8.8465
0.0029
Continuity Adj. Chi-Square
1
8.6007
0.0034
Mantel-Haenszel Chi-Square
1
8.8728
0.0029
Phi Coefficient
  0.0663
  Contingency Coefficient
  0.0662
  Cramer's V
  0.0663
  Fisher's Exact Test
Fisher's Exact Test
Cell (1,1) Frequency (F)
783
Left-sided Pr <= F
0.9987
Right-sided Pr >= F
0.0017
    Table Probability (P)
0.0004
Two-sided Pr <= P
0.0032
Sample Size = 2019
The FREQ Procedure
The Freq Procedure
Table DEPENDENCE * USFREQMO
Cross-Tabular Freq Table
Frequency
Percent
Row Pct
Col Pct
Table of DEPENDENCE by USFREQMO
DEPENDENCE
USFREQMO
8
24
Total
0
783
51.82
84.92
63.35
139
9.20
15.08
50.55
922
61.02
    1
453
29.98
76.91
36.65
136
9.00
23.09
49.45
589
38.98
    Total
1236
81.80
275
18.20
1511
100.00
Statistics for Table of DEPENDENCE by USFREQMO
Chi-Square Tests
Statistic
DF
Value
Prob
Chi-Square
1
15.5048
<.0001
Likelihood Ratio Chi-Square
1
15.2236
<.0001
Continuity Adj. Chi-Square
1
14.9711
0.0001
Mantel-Haenszel Chi-Square
1
15.4945
<.0001
Phi Coefficient
  0.1013
  Contingency Coefficient
  0.1008
  Cramer's V
  0.1013
  Fisher's Exact Test
Fisher's Exact Test
Cell (1,1) Frequency (F)
783
Left-sided Pr <= F
1.0000
Right-sided Pr >= F
<.0001
    Table Probability (P)
<.0001
Two-sided Pr <= P
<.0001
Sample Size = 1511
The FREQ Procedure
The Freq Procedure
Table DEPENDENCE * USFREQMO
Cross-Tabular Freq Table
Frequency
Percent
Row Pct
Col Pct
Table of DEPENDENCE by USFREQMO
DEPENDENCE
USFREQMO
8
30
Total
0
783
51.68
85.95
63.35
128
8.45
14.05
45.88
911
60.13
    1
453
29.90
75.00
36.65
151
9.97
25.00
54.12
604
39.87
    Total
1236
81.58
279
18.42
1515
100.00
Statistics for Table of DEPENDENCE by USFREQMO
Chi-Square Tests
Statistic
DF
Value
Prob
Chi-Square
1
28.9824
<.0001
Likelihood Ratio Chi-Square
1
28.4393
<.0001
Continuity Adj. Chi-Square
1
28.2582
<.0001
Mantel-Haenszel Chi-Square
1
28.9633
<.0001
Phi Coefficient
  0.1383
  Contingency Coefficient
  0.1370
  Cramer's V
  0.1383
  Fisher's Exact Test
Fisher's Exact Test
Cell (1,1) Frequency (F)
783
Left-sided Pr <= F
1.0000
Right-sided Pr >= F
<.0001
    Table Probability (P)
<.0001
Two-sided Pr <= P
<.0001
Sample Size = 1515
The FREQ Procedure
The Freq Procedure
Table DEPENDENCE * USFREQMO
Cross-Tabular Freq Table
Frequency
Percent
Row Pct
Col Pct
Table of DEPENDENCE by USFREQMO
DEPENDENCE
USFREQMO
14
24
Total
0
444
41.97
76.16
56.70
139
13.14
23.84
50.55
583
55.10
    1
339
32.04
71.37
43.30
136
12.85
28.63
49.45
475
44.90
    Total
783
74.01
275
25.99
1058
100.00
Statistics for Table of DEPENDENCE by USFREQMO
Chi-Square Tests
Statistic
DF
Value
Prob
Chi-Square
1
3.1211
0.0773
Likelihood Ratio Chi-Square
1
3.1119
0.0777
Continuity Adj. Chi-Square
1
2.8771
0.0898
Mantel-Haenszel Chi-Square
1
3.1182
0.0774
Phi Coefficient
  0.0543
  Contingency Coefficient
  0.0542
  Cramer's V
  0.0543
  Fisher's Exact Test
Fisher's Exact Test
Cell (1,1) Frequency (F)
444
Left-sided Pr <= F
0.9668
Right-sided Pr >= F
0.0451
    Table Probability (P)
0.0118
Two-sided Pr <= P
0.0787
Sample Size = 1058
The FREQ Procedure
The Freq Procedure
Table DEPENDENCE * USFREQMO
Cross-Tabular Freq Table
Frequency
Percent
Row Pct
Col Pct
Table of DEPENDENCE by USFREQMO
DEPENDENCE
USFREQMO
14
30
Total
0
444
41.81
77.62
56.70
128
12.05
22.38
45.88
572
53.86
    1
339
31.92
69.18
43.30
151
14.22
30.82
54.12
490
46.14
    Total
783
73.73
279
26.27
1062
100.00
Statistics for Table of DEPENDENCE by USFREQMO
Chi-Square Tests
Statistic
DF
Value
Prob
Chi-Square
1
9.7029
0.0018
Likelihood Ratio Chi-Square
1
9.6834
0.0019
Continuity Adj. Chi-Square
1
9.2721
0.0023
Mantel-Haenszel Chi-Square
1
9.6938
0.0018
Phi Coefficient
  0.0956
  Contingency Coefficient
  0.0952
  Cramer's V
  0.0956
  Fisher's Exact Test
Fisher's Exact Test
Cell (1,1) Frequency (F)
444
Left-sided Pr <= F
0.9993
Right-sided Pr >= F
0.0012
    Table Probability (P)
0.0004
Two-sided Pr <= P
0.0021
Sample Size = 1062
The FREQ Procedure
The Freq Procedure
Table DEPENDENCE * USFREQMO
Cross-Tabular Freq Table
Frequency
Percent
Row Pct
Col Pct
Table of DEPENDENCE by USFREQMO
DEPENDENCE
USFREQMO
24
30
Total
0
139
25.09
52.06
50.55
128
23.10
47.94
45.88
267
48.19
    1
136
24.55
47.39
49.45
151
27.26
52.61
54.12
287
51.81
    Total
275
49.64
279
50.36
554
100.00
Statistics for Table of DEPENDENCE by USFREQMO
Chi-Square Tests
Statistic
DF
Value
Prob
Chi-Square
1
1.2083
0.2717
Likelihood Ratio Chi-Square
1
1.2088
0.2716
Continuity Adj. Chi-Square
1
1.0286
0.3105
Mantel-Haenszel Chi-Square
1
1.2062
0.2721
Phi Coefficient
  0.0467
  Contingency Coefficient
  0.0467
  Cramer's V
  0.0467
  Fisher's Exact Test
Fisher's Exact Test
Cell (1,1) Frequency (F)
139
Left-sided Pr <= F
0.8819
Right-sided Pr >= F
0.1552
    Table Probability (P)
0.0371
Two-sided Pr <= P
0.3076
Sample Size = 554
0 notes
erickasimmonshosten-blog · 6 years ago
Text
Running An Analysis of Variance
The association of beer consumption and ethnicity was examined.
Tumblr media Tumblr media Tumblr media Tumblr media
My explanatory variable had more than two groups so I had to conduct a post hoc test; I did the Duncan multiple range test.  
I rejected the null hypothesis as the p-value <.0001.   The means for 1 (white), 2 (black), 5 (Hispanic/latino) are not significantly different (these are colored red, as shown in the graph above).    The ethnicity recording the greatest mean for beer consumption was 3 or American Indian/Alaskan native, whereas, the ethnicity recording the lowest mean was Asian/Native Hawaiian/Pacific Islander. 
0 notes
erickasimmonshosten-blog · 6 years ago
Text
Assignment #4 - Creating Graphs
Tumblr media
The univariate graph of alcohol dependence and or abuse
Tumblr media
This graph is skewed to the right and shows its mode (85%) as the persons who has no alcohol diagnosis.  The lowest percentage was recorded as persons with alcohol dependence only (category 2).
 The univariate procedure to determine standard deviation and other statistical measures:
Tumblr media Tumblr media
The table above shows the mean as 92, the median or middle point as 18 and the mode as 1.5 (value recorded the most).  The standard deviation was stated as 285 indicating that there was a wide range of variables.
 Bivariate graph:
Tumblr media Tumblr media
The quantitative variable was converted to a categorical variable as shown in the table above.  The graph is skewed to the left and shows that more liquor a person consumes the more likely they are to become dependent or suffer from alcohol abuse. 
0 notes
erickasimmonshosten-blog · 6 years ago
Text
Data Management - Assignment #3
Data Management – Assignment #3
Code:
Tumblr media
1.       All ‘unknown’ data, coded as 99 was set as missing.
Tumblr media
2.       Valid data was recoded as 31.  The table above showed the frequency of drink within the last year.   There were persons interviewed that had 0 drinks within the last year and was therefore recorded as ‘blank’.  These entries were recoded and entered as 31, indicating that these persons did not have any liquor within the last 12 months.  These entries accounted for 61%.
Tumblr media
3.       The age distribution was managed categorically to reflect three groups; ages 18 to 21, 22 to 26 and 27 and over.
Tumblr media Tumblr media
0 notes
erickasimmonshosten-blog · 6 years ago
Text
Assignment: Running Your First Program
Tumblr media Tumblr media
The NESARC data shows that of the 115 persons interviewed on the area of alcohol abuse and or dependence, 12.17% were 25 years of age with the same percentage reporting the age of 20.   In fact, 76.52% of the persons interviewed are 25 years and under, comprising the majority of the sample under review.
Noteworthy is that the majority of the persons interviewed (64.35% or 74 persons) indicated that they have no alcohol diagnosis.  16.32% reported that they both abuse alcohol and are dependent on it, while 13.91% indicated that they abuse alcohol but are not dependent of it.
The data further shows that of 100% of the sample have never sought drug or alcohol rehabilitation programs.  This suggests that for the persons who abuse and or are dependent on the substance have made no attempts to seek treatment.
1 note · View note