Then I don't really have an answer, as none of your cells have a zero weight.
Could you please provide the exact unedited word-for-word verbatim error message?
Hi Paige,
Please find below the exact error message shown on the SAS log.
NOTE: Chi-square tests cannot be computed for the table of SEX by LANG because at least one table
cell has 0 frequency.
Also, there are several missing weighted frequency cells (0 frequency cells) for the female group. I think perhaps the text document is not clearly showing all the missing values in a table format as opposed to viewing the dataset through a word doc.
@yli33 wrote:
Hi Paige,
Also, there are several missing weighted frequency cells (0 frequency cells) for the female group. I think perhaps the text document is not clearly showing all the missing values in a table format as opposed to viewing the dataset through a word doc.
At no time in this thread have you shown me a frequency table with a zero frequency.
Hi Paige,
I am actually referring to the attachments that I have sent to you previously (e.g. in particular the word document since the text file may not show all the values for the female group by different types of languages). I guess I would just like to know whether there is a another statistical test(s) that I can conduct with 0 frequencies or is this dataset (sex*lang) not capable of being analyzed by any type of statistical tests (p-values included)? Thanks again!
Best,
Lisa
If you have one or two you can consider exact tests, but that table has too many zeros, so no, you can't do the statistical tests you want.
You're going to need to collapse them into an Other group and you can do the analysis that way, but you need to make sure you do that properly for survey data with weights, which is beyond my knowledge.
Hi Reeza,
Thank you for your response. Nevertheless, fisher's exact test cannot be employed with the statement Proc Surveyfreq unfortunately. While I can definitely collapse those individual language groups into a single group "Other", that would only allow me to conduct wald chi-square test for sex by language only. Unfortunately, I realized that many other variables have distinct groups such as "yes" and "no", "always", "frequently", "sometimes"...etc in which there would be no good method to collapse any of the groups together when cells have 0 frequency since each group is distinct, unlike the language groups which could easily be collapsed into an "Other" group.
I am rather sure that the commands that I have used for conducting statistical tests on survey data is correct such as the following:
proc surveyfreq data=wdp.newzhang;
tables heat_1*water/ wchisq;
weights weight_3;
run;
Perhaps I just have selected infeasible variables to cross-tabulate and conduct statistical tests. Nevertheless, thank you very much for your time and assistance on this dilemma.
Best,
Lisa
There is a significant difference between correct syntax and correct statistics and results. You can run any tests you want, but SAS doesn't check the assumptions of those tests (most of the time) and whether the results make sense.
@yli33 wrote:
I am rather sure that the commands that I have used for conducting statistical tests on survey data is correct such as the following:
....[deleted for brevity]
Perhaps I just have selected infeasible variables to cross-tabulate and conduct statistical tests. Nevertheless, thank you very much for your time and assistance on this dilemma.
If you're running tests and looking for significance this is typically called p-value hacking these days.
Otherwise, if you have a hypothesis to test, then you don't have a lot of control over the variables you need.
Hi Reeza,
My research group was considering conducting statistical tests such as chi-square tests to determine the association of the selected independent variables and dependent variables. If the p-value is significant (p<0.20 in our case), then we could safely proceed on to conducting logistic regression analyses by using those variables that are associated with each other. Moreover, we have some hypothetical assumptions on the independent variables that are expected to be associated with the dependent variable. Nevertheless, we are actually analyzing secondary survey dataset created by another colleague but did not expect so many cells with 0 frequencies that would not allow for collapsing.
Best,
Lisa
@yli33 wrote:
Hi Paige,
I am actually referring to the attachments that I have sent to you previously (e.g. in particular the word document since the text file may not show all the values for the female group by different types of languages). I guess I would just like to know whether there is a another statistical test(s) that I can conduct with 0 frequencies or is this dataset (sex*lang) not capable of being analyzed by any type of statistical tests (p-values included)? Thanks again!
Best,
Lisa
I'm not going to open your Word document.
Can you just show me an output from SAS that shows the zero cells? I don't want RAW data, I want an output from PROC FREQ or SURVEYFREQ that shows a cell with zero frequencies?
Hi Paige,
Both attachments that I have sent to you are actual data/cross-tabulation output tables that SAS has created based on the statement proc surveyfreq. Unfortunately, the formatting of the text file is rather distorted, which is why you may not be able to clearly see all the 0 frequencies. Since you do not trust the word attachment that I have sent you, I really do not know of another document format that is acceptable and maintains the original formatting of the output tables (perhaps an excel document though).
Actually, I have already received a rather helpful response from another SAS expert, Reeza, that appears to provide the needed solution for that particular cross-tabulation (sex*lang) only. I believe that my research group may have selected infeasible variables to cross-tabulate, which may mean that the research study itself may be infeasible using the current survey dataset.
Nevertheless, I really appreciated your time and assistance on this dilemma.
Best,
Lisa
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.