BookmarkSubscribeRSS Feed
martin22
Calcite | Level 5

Hello all,

I am busy on a study to compare different types of sowing type for field margins to attract bumble bees.

I have three blocks, and within those blocks there are the four different treatements (fixed effects). There are 4 different moments in which i counted the bees,

I would like to know if the sowing types have a significant effect on the counts of the bees and wether they differ pairwise from each other

This presents me with a lot of problem solving to do in stating my model, i cannot find any examples which are similar.

This is my data

data hommel;

input loc $ meng count;

cards;

a    g    29

b    g    43

c    g    10

a     i    24

b    i    66

c    i    23

a     k    83

b    k    73

c    k    60

a     t    45

b    t    75

c    t    48

run;

I came up with the following code:

proc glimmix data=hommels;

class mengsel loc;

model count=mengsel/dist=poisson link=log solution;

random loc;

random _residual_;

lsmeans mengsel/cl ilink;,

run;

i did a dist=poisson because it are counts, log link for the same reason

random component is the block of the location and then i try to correct for overdispersion because it looked the right way to do...

the cl ilink for giving me the real estimates, but this does not seem to work either..

I am not sure if this is the right way to go with this, so i do not want to jump in conclusions and not i am not even sure what the conclusions would be fro this, i do not get a t value for fixed factor t?

I would really like to know how i could solve this...also an output of this does not render me pairwise comparison as the output of a proc mixed can give

thanks,

martijn

4 REPLIES 4
martin22
Calcite | Level 5

These actually are the counts added up for the whole season...i figured that i cannot do any statistical analyses on a dataset like this, nor on the one where i split the dates as i should to take into account the random variation on the dates because my fixed factors are not fixed either... the different sowing types in the different block have different abundances in flowers, some flowers present and shared with one block, some not but very abundant in the one block  and this al in different combinations, also there is a random component of the different popolutions of bees at the different blocks.Different species composition with all different numbers of total bees... 

So i cannot perform any statistics on it, is it... i think the design should have been that i have more blocks, the field margins should not be adjecent and that the fixed factors should have been randomised...?

can somebody please confirm this?

grts,

Maartijn



SteveDenham
Jade | Level 19

Well, I got an analysis, but given your second post, it may not be quite what you need.

First, there are some typos to clear up.  The dataset has a different name than what is called in the PROC GLIMMIX statement.  Also, the data step has the variable meng, while in GLIMMIX it is mengsel, and it probably needs to be identified as character.  To get the pairwise comparisons, I added the diff option to the LSMEANS statement.  My code follows:

data hommel;
input loc $ meng $ count;
cards;
a g 29
b g 43
c g 10
a i 24
b i 66
c i 23
a k 83
b k 73
c k 60
a t 45
b t 75
c t 48
run;

proc glimmix data=hommel;
class meng loc;
model count=meng/dist=poisson link=log solution;
random loc;
random _residual_;
lsmeans meng/cl ilink diff;
run;

As far as your concerns about things over time, you could look at a repeated measures analysis, and if you could come up with a suitable set of covariates for species of flowers and their abundance, that could also be introduced (although you would probably have a time varying covariate for this, as I suspect the abundance changes over time).  So, given that, it makes sense to me that the block effect, as you have presented it, is probably the best approach to addressing these issues.

The part that I worry about is that you say that the fixed effects were not randomized.  Within each block, all four sowing types are represented.  I assumed that the types were not systematically applied to come up with this analysis.  More information would be nice to see if all is OK.

Steve Denham

martin22
Calcite | Level 5

hello,

thanks! i couldn't come up with what to do with it, it got rather frustrating out here

Now i could run this analysis on every sample date apart in the blocks then...? So i have an idea on each sampling date how things are...

the blocks are indeed not randomized, like you say, all four sowing types present in one block.

also within these blocks the sowing types are adjecent in a fixed order with for example a and d on the outsides...

the setup of the experiment was thought up by a predecessor, i do not like it, but do have to come up with an answer to the question which one is better

grts,

martijn

martin22
Calcite | Level 5

the next question pops up...how do i interpret this?

i have a type III test for my fixed effects...i guess that is pretty straightforward...that there is an  effect of the fixed factors...can i then state that all the fixed effects have an effect?

and the solution for fixed effects...is  the intercept the estimate (e^estimate) of the t type(dummy) and then the other estimates are e^(estimateT+the estimate of intrest)?  my p-values representing wether the fixed factors differ from t? i shouldn't really report on this? i have the pairwise comparisons in the lsmeansdiff output...

but then the lsmeans diff gives me the lsmeans compared to each other, they differ if the p-value is less then 0,05? can i derive from such an estimate how much they differ or can i just say they differ? it cannot be as simple as G-I ==> G differs e^(estimate)*I ,is it?

tnx,

Martijn

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
  • 4 replies
  • 1328 views
  • 3 likes
  • 2 in conversation