Hello - I am fairly new to R, (i.e., ability to create functions/write
programs insignificant) and was wondering if there might be a convenient way
to model the following: I want to fit a gaussian glm to grouped data, while
allowing for unequal variances in each of the groups.
More specifically, my data set looks something like this:
----------------
   data group
1    76     1
2    82     1
3    83     1
4    54     1
5    35     1
6    46     1
7    87     1
8    68     1
9    87     2
10   95     2
11   98     2
12  100     2
13  109     2
14  109     2
15  100     2
16   81     2
17   75     2
18   68     2
19   67     2
20  105     3
.... et cetera.
---------------
There are seven groups in all, each with a different number of observations.
The idea is to compare a model in which all the data points can be modeled
with a single mean (i.e., if all the group means are equal), or if the  data
suggests that each of the groups has a different mean. In other words, I
want to do a Likelihood ratio test on whether or not the group means are
significantly different from each other: the full model would be glm(data ~
as.factor(group)-1, family = gaussian), to be compared against a restricted
model that only includes an intercept. However, I also need to allow for the
fact that each group has a different variance. And this I have no idea how
to do. I would really appreciate some help in this matter.
Thank you in advance,
Dawn.

        [[alternative HTML version deleted]]

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to