[R] about linear model in R

Bert Gunter gunter.berton at gene.com
Tue Jan 14 18:44:24 CET 2014


Solip:

You should usually cc R-help on your responses to increase the chance
that others can help or to correct bad advice.

To respond to your explanation: Read ?glm and ?family to read about
how to construct glm models and family functions for them. glm models
are by default fit by iterated least squares based on a likelihood
function (minimization of deviances), so I do not know how it would
work with your "own" distribution. AFAIK, only exponential family
distributions  will work, so:

a) Are you sure you have a glm?
b) Do you know what you're doing, statistically?

If the answer to either of these questions is no or uncertain, I
suggest you consult a local statistical expert or learn more about
glm's and statistics. If I have misunderstood you, my apologies, and
maybe someone else will be more helpful. If I have made errors,
hopefully someone will correct them

Cheers,
Bert

Bert Gunter
Genentech Nonclinical Biostatistics
(650) 467-7374

"Data is not information. Information is not knowledge. And knowledge
is certainly not wisdom."
H. Gilbert Welch




On Tue, Jan 14, 2014 at 9:00 AM, Solip Park <imagineyd at gmail.com> wrote:
> Hello Bert :)
>
> Thanks so much.
>
> I mean that they use poisson distribution (or other distribution) for the
> linear model. But I want to apply my own distribution for this model.
> I'm so sorry I can't explain very well!
>
> S
>
>
> On Tue, Jan 14, 2014 at 4:50 PM, Bert Gunter <gunter.berton at gene.com> wrote:
>>
>> I am not sure what you mean by "expected table", but perhaps
>> ?predict.glm
>> is what you are looking for. If not, hopefully someone else will help.
>>
>> Cheers,
>> Bert
>>
>>
>>
>> Bert Gunter
>> Genentech Nonclinical Biostatistics
>> (650) 467-7374
>>
>> "Data is not information. Information is not knowledge. And knowledge
>> is certainly not wisdom."
>> H. Gilbert Welch
>>
>>
>>
>>
>> On Tue, Jan 14, 2014 at 3:29 AM, Solip Park <imagineyd at gmail.com> wrote:
>> > Hello :)
>> >
>> > I'm Solip Park in Barcelona :)
>> >
>> > I have one question about linear model in R.
>> >
>> > I used generalized linear model (glm) in R with three variables (A,B,
>> > and
>> > C).
>> > So I made a model like this;
>> >
>> > glm.model = glm (Freq ~ A * B * C, family = poisson)
>> >
>> > and then,
>> >
>> > anova (glm.model, test = "Chisq").
>> >
>> > It worked very well, but I have one question about this.
>> > I have my own expected table (or random table), so I want to apply my
>> > own
>> > expected table to this model.
>> > Is it possible or not?
>> >
>> > Thanks so much :)
>> >
>> >         [[alternative HTML version deleted]]
>> >
>> > ______________________________________________
>> > R-help at r-project.org 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.
>
>




More information about the R-help mailing list