BookmarkSubscribeRSS Feed
TMAlves
Calcite | Level 5

I appreciate if someone can help me with this question.

Context:

In-field insect density was determined for different crop fields ("groups"). I have the frequency of the number of insects per sampling unit.

For instance,

field=1: the frequency of "zeros" insects per sampling unit was 353. The frequency of "ones" was 19.

field=2: the frequency of "zeros" was 580. The frequency of "ones" was 30. The frequency of "twos" was 3.

fieldclass.insectobserv_freq
10353
1119
20580
2130
223

I would like to compare the observed frequency of each one of my fifteen fields with discrete distributions using chi-square test.

I am trying to use PROC GENMOD because I think PROC DISCRETE is not available anymore.

proc genmod;

by field;

freq observ_freq;

model class.insect = / dist=binomial; run;

I am planning to test for the following discrete distributions:

Binomial

Inverse Gaussian

Multinomial

Negative binomial

Normal

Poisson

Zero-inflated Poisson

Zero-inflated negative binomial

Double Poisson

Neyman type A

Final table should look like this image from Env. Ento. 30(2) :

final_table.PNG

Thank you.

1 REPLY 1
SteveDenham
Jade | Level 19

The chi-square value is presented in the goodness-of-fit table, so getting this into a dataset with ODS OUTPUT should not be difficult. I do worry that the goodness of fit applies to a model with some terms in it, so you may have to change to:

proc genmod;

class field;

freq observ_freq;

model class.insect =field / dist=binomial; run;

And of course that makes it impossible to find out if different distributions are better applied in different fields.  So, try your method first, and if it gives no results in the goodness of fit table, you could try regressing on a dummy variable, such as regressing on a constant.

Steve Denham

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 1326 views
  • 1 like
  • 2 in conversation