offset with a factor

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

offset with a factor

stephenb
Knowledgeable useRs,

Please, advise how to use offset with a factor. I estimate monthly effects from a much bigger data set as monthly effects seem to be stable, and other variables are estimated from a small, but recent data set as there is variation in those non-seasonal coefficients.
How can I use the seasonality estimates from the big data set as an offset provided to the small data set. I know an offset is supposed to be quantitative, but this is such a practical and sensible scenario, I feel compelled. Assume I have 11 coefs estimated with contr.sum.

Thanks everybody

Stephen


        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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 | Threaded
Open this post in threaded view
|

Re: offset with a factor

Michael Dewey-3
The documentation for ?offset states that you can have more than one offset.

Michael

On 20/12/2017 14:51, Bond, Stephen wrote:

> Knowledgeable useRs,
>
> Please, advise how to use offset with a factor. I estimate monthly effects from a much bigger data set as monthly effects seem to be stable, and other variables are estimated from a small, but recent data set as there is variation in those non-seasonal coefficients.
> How can I use the seasonality estimates from the big data set as an offset provided to the small data set. I know an offset is supposed to be quantitative, but this is such a practical and sensible scenario, I feel compelled. Assume I have 11 coefs estimated with contr.sum.
>
> Thanks everybody
>
> Stephen
>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> 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.
>

--
Michael
http://www.dewey.myzen.co.uk/home.html

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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 | Threaded
Open this post in threaded view
|

Re: offset with a factor

David Winsemius
In reply to this post by stephenb

> On Dec 20, 2017, at 6:51 AM, Bond, Stephen <[hidden email]> wrote:
>
> Knowledgeable useRs,
>
> Please, advise how to use offset with a factor. I estimate monthly effects from a much bigger data set as monthly effects seem to be stable, and other variables are estimated from a small, but recent data set as there is variation in those non-seasonal coefficients.
> How can I use the seasonality estimates from the big data set as an offset provided to the small data set. I know an offset is supposed to be quantitative, but this is such a practical and sensible scenario, I feel compelled. Assume I have 11 coefs estimated with contr.sum.

Why not create a variable that specifies the relevant coefficient for each of the various levels of the factor (and 0 for the reference level? Then pass that variable to the offset argument.

--
David.
>
> Thanks everybody
>
> Stephen
>
>
> [[alternative HTML version deleted]]

Do note: Rhelp is a plain-text mailing list.
>
> ______________________________________________
> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> 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.

David Winsemius
Alameda, CA, USA

'Any technology distinguishable from magic is insufficiently advanced.'   -Gehm's Corollary to Clarke's Third Law

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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.