R-hts

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

R-hts

Deva
dear all,

i need some help in structuring my data file for a hierarchical time series
analysis.

can someone help please ?

i have a 600 row database in the nature of a panel data, with 3 time series
values of interest. the data also has 4 classificatory variables comprising
a code for each entity in the panel, a value for time (year), and
classification of type of entity and a further sub-group of the type.

i am unable to structure the data file for performing the hts analysis.

thanks in advance.

*....*

*Deva*


...............



*in search of knowledge, everyday something is added ....*

*in search of wisdom, everyday something is dropped  ... an old Chinese
Proverb*
:::::::::::::::::::::::::

        [[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: R-hts

R help mailing list-2
Have a look at http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example
and
http://adv-r.had.co.nz/Reproducibility.html


 

    On Wednesday, January 10, 2018, 11:51:22 AM EST, deva d <[hidden email]> wrote:  
 
 dear all,

i need some help in structuring my data file for a hierarchical time series
analysis.

can someone help please ?

i have a 600 row database in the nature of a panel data, with 3 time series
values of interest. the data also has 4 classificatory variables comprising
a code for each entity in the panel, a value for time (year), and
classification of type of entity and a further sub-group of the type.

i am unable to structure the data file for performing the hts analysis.

thanks in advance.

*....*

*Deva*


...............



*in search of knowledge, everyday something is added ....*

*in search of wisdom, everyday something is dropped  ... an old Chinese
Proverb*
:::::::::::::::::::::::::

    [[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.
 
        [[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: R-hts

Jérémie Juste
In reply to this post by Deva
Hello,

Have a look at the plm package
https://cran.r-project.org/web/packages/plm/index.html
It has a convenient way to structure your data into panel according to some
id.

Best regards,
Jeremie



On Wed, Jan 10, 2018 at 5:41 PM, deva d <[hidden email]> wrote:

> dear all,
>
> i need some help in structuring my data file for a hierarchical time series
> analysis.
>
> can someone help please ?
>
> i have a 600 row database in the nature of a panel data, with 3 time series
> values of interest. the data also has 4 classificatory variables comprising
> a code for each entity in the panel, a value for time (year), and
> classification of type of entity and a further sub-group of the type.
>
> i am unable to structure the data file for performing the hts analysis.
>
> thanks in advance.
>
> *....*
>
> *Deva*
>
>
> ...............
>
>
>
> *in search of knowledge, everyday something is added ....*
>
> *in search of wisdom, everyday something is dropped  ... an old Chinese
> Proverb*
> :::::::::::::::::::::::::
>
>         [[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.
>



--
Jérémie Juste

        [[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: R-hts

Deva
Thanks Jeremie

My data has 40 entities clustered into 2 types (rural/urban) & two sub
groups in each (bug/small).

Panel will give me for all 40 v/s time id.

Suppose I need to see rural v/s time or big urban v/s time, then how should
I obtain findings...?

Kindly advise is possible.



Thanks and regards,

Deva

-- sent from my handphone

On Jan 10, 2018 10:50 PM, "Jérémie Juste" <[hidden email]> wrote:

> Hello,
>
> Have a look at the plm package https://cran.r-project.org/
> web/packages/plm/index.html
> It has a convenient way to structure your data into panel according to
> some id.
>
> Best regards,
> Jeremie
>
>
>
> On Wed, Jan 10, 2018 at 5:41 PM, deva d <[hidden email]> wrote:
>
>> dear all,
>>
>> i need some help in structuring my data file for a hierarchical time
>> series
>> analysis.
>>
>> can someone help please ?
>>
>> i have a 600 row database in the nature of a panel data, with 3 time
>> series
>> values of interest. the data also has 4 classificatory variables
>> comprising
>> a code for each entity in the panel, a value for time (year), and
>> classification of type of entity and a further sub-group of the type.
>>
>> i am unable to structure the data file for performing the hts analysis.
>>
>> thanks in advance.
>>
>> *....*
>>
>> *Deva*
>>
>>
>> ...............
>>
>>
>>
>> *in search of knowledge, everyday something is added ....*
>>
>> *in search of wisdom, everyday something is dropped  ... an old Chinese
>> Proverb*
>> :::::::::::::::::::::::::
>>
>>         [[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/posti
>> ng-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>>
>
>
>
> --
> Jérémie Juste
>

        [[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: R-hts

Jérémie Juste
In reply to this post by R help mailing list-2
Hello,

It's difficult to help without a sample of the format. Can you provide a
short sample like 10 lines and a few columns.?

Best regards,
Jeremie


On Wed, Jan 10, 2018 at 6:12 PM, John Kane via R-help <[hidden email]>
wrote:

> Have a look at http://stackoverflow.com/questions/5963269/how-to-make-
> a-great-r-reproducible-example
> and
> http://adv-r.had.co.nz/Reproducibility.html
>
>
>
>
>     On Wednesday, January 10, 2018, 11:51:22 AM EST, deva d <
> [hidden email]> wrote:
>
>  dear all,
>
> i need some help in structuring my data file for a hierarchical time series
> analysis.
>
> can someone help please ?
>
> i have a 600 row database in the nature of a panel data, with 3 time series
> values of interest. the data also has 4 classificatory variables comprising
> a code for each entity in the panel, a value for time (year), and
> classification of type of entity and a further sub-group of the type.
>
> i am unable to structure the data file for performing the hts analysis.
>
> thanks in advance.
>
> *....*
>
> *Deva*
>
>
> ...............
>
>
>
> *in search of knowledge, everyday something is added ....*
>
> *in search of wisdom, everyday something is dropped  ... an old Chinese
> Proverb*
> :::::::::::::::::::::::::
>
>     [[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.
>
>         [[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.
>



--
Jérémie Juste

        [[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: R-hts

Jeff Newmiller
You are the one with data. Supply what you have (or a simulated version of same, hence the reading recommendation) using dput, and someone may suggest how to transform it. In most cases a simple tabular format (data frame) is sufficient.
--
Sent from my phone. Please excuse my brevity.

On January 10, 2018 12:20:47 PM PST, "Jérémie Juste" <[hidden email]> wrote:

>Hello,
>
>It's difficult to help without a sample of the format. Can you provide
>a
>short sample like 10 lines and a few columns.?
>
>Best regards,
>Jeremie
>
>
>On Wed, Jan 10, 2018 at 6:12 PM, John Kane via R-help
><[hidden email]>
>wrote:
>
>> Have a look at
>http://stackoverflow.com/questions/5963269/how-to-make-
>> a-great-r-reproducible-example
>> and
>> http://adv-r.had.co.nz/Reproducibility.html
>>
>>
>>
>>
>>     On Wednesday, January 10, 2018, 11:51:22 AM EST, deva d <
>> [hidden email]> wrote:
>>
>>  dear all,
>>
>> i need some help in structuring my data file for a hierarchical time
>series
>> analysis.
>>
>> can someone help please ?
>>
>> i have a 600 row database in the nature of a panel data, with 3 time
>series
>> values of interest. the data also has 4 classificatory variables
>comprising
>> a code for each entity in the panel, a value for time (year), and
>> classification of type of entity and a further sub-group of the type.
>>
>> i am unable to structure the data file for performing the hts
>analysis.
>>
>> thanks in advance.
>>
>> *....*
>>
>> *Deva*
>>
>>
>> ...............
>>
>>
>>
>> *in search of knowledge, everyday something is added ....*
>>
>> *in search of wisdom, everyday something is dropped  ... an old
>Chinese
>> Proverb*
>> :::::::::::::::::::::::::
>>
>>     [[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.
>>
>>         [[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.
>>
>
>
>
>--
>Jérémie Juste
>
> [[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.

______________________________________________
[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: R-hts

Jeff Newmiller
Sorry Jérémie, I mis-read who the OP was. Deva needs to get the ball rolling.

I would say that for a hierarchical analysis the sample data generally needs to be larger than for other types of analysis to illustrate correlation between classification variables or the example calculation will break. That is, 10 rows will likely be insufficient for a dry run.

--
Sent from my phone. Please excuse my brevity.

On January 10, 2018 2:02:29 PM PST, Jeff Newmiller <[hidden email]> wrote:

>You are the one with data. Supply what you have (or a simulated version
>of same, hence the reading recommendation) using dput, and someone may
>suggest how to transform it. In most cases a simple tabular format
>(data frame) is sufficient.
>--
>Sent from my phone. Please excuse my brevity.
>
>On January 10, 2018 12:20:47 PM PST, "Jérémie Juste"
><[hidden email]> wrote:
>>Hello,
>>
>>It's difficult to help without a sample of the format. Can you provide
>>a
>>short sample like 10 lines and a few columns.?
>>
>>Best regards,
>>Jeremie
>>
>>
>>On Wed, Jan 10, 2018 at 6:12 PM, John Kane via R-help
>><[hidden email]>
>>wrote:
>>
>>> Have a look at
>>http://stackoverflow.com/questions/5963269/how-to-make-
>>> a-great-r-reproducible-example
>>> and
>>> http://adv-r.had.co.nz/Reproducibility.html
>>>
>>>
>>>
>>>
>>>     On Wednesday, January 10, 2018, 11:51:22 AM EST, deva d <
>>> [hidden email]> wrote:
>>>
>>>  dear all,
>>>
>>> i need some help in structuring my data file for a hierarchical time
>>series
>>> analysis.
>>>
>>> can someone help please ?
>>>
>>> i have a 600 row database in the nature of a panel data, with 3 time
>>series
>>> values of interest. the data also has 4 classificatory variables
>>comprising
>>> a code for each entity in the panel, a value for time (year), and
>>> classification of type of entity and a further sub-group of the
>type.
>>>
>>> i am unable to structure the data file for performing the hts
>>analysis.
>>>
>>> thanks in advance.
>>>
>>> *....*
>>>
>>> *Deva*
>>>
>>>
>>> ...............
>>>
>>>
>>>
>>> *in search of knowledge, everyday something is added ....*
>>>
>>> *in search of wisdom, everyday something is dropped  ... an old
>>Chinese
>>> Proverb*
>>> :::::::::::::::::::::::::
>>>
>>>     [[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.
>>>
>>>         [[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.
>>>
>>
>>
>>
>>--
>>Jérémie Juste
>>
>> [[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.
>
>______________________________________________
>[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.

______________________________________________
[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: R-hts

Deva
In reply to this post by Deva
thanks jeff and jeremie,

i am attaching 40 rows of the data, randomly picked from the large table.

the vars are - entity (1-46, with some missing IDs not included due to
missing data), group (1/2), sub group (1/2/3/4), year (2002-2016), y, x1
and x2 - large values included due to size of players - (may not be
considered as outliers as they constitute the sample and are important
countrywide entities)

hope this helps.

i thought an hts may be a better analytical tool compared to panel (a pivot
table in excel helps me obtain some aggregation), hence the query ...

thanks for your guidance,

*....*

*Deva*


...............



*in search of knowledge, everyday something is added ....*

*in search of wisdom, everyday something is dropped  ... an old Chinese
Proverb*
:::::::::::::::::::::::::

On Thu, Jan 11, 2018 at 12:22 AM, Jeff Newmiller <[hidden email]>
wrote:

> Sorry Jérémie, I mis-read who the OP was. Deva needs to get the ball
> rolling.
>
> I would say that for a hierarchical analysis the sample data generally
> needs to be larger than for other types of analysis to illustrate
> correlation between classification variables or the example calculation
> will break. That is, 10 rows will likely be insufficient for a dry run.
>
> --
> Sent from my phone. Please excuse my brevity.
>
> On January 10, 2018 2:02:29 PM PST, Jeff Newmiller <
> [hidden email]> wrote:
> >You are the one with data. Supply what you have (or a simulated version
> >of same, hence the reading recommendation) using dput, and someone may
> >suggest how to transform it. In most cases a simple tabular format
> >(data frame) is sufficient.
> >--
> >Sent from my phone. Please excuse my brevity.
> >
> >On January 10, 2018 12:20:47 PM PST, "Jérémie Juste"
> ><[hidden email]> wrote:
> >>Hello,
> >>
> >>It's difficult to help without a sample of the format. Can you provide
> >>a
> >>short sample like 10 lines and a few columns.?
> >>
> >>Best regards,
> >>Jeremie
> >>
> >>
> >>On Wed, Jan 10, 2018 at 6:12 PM, John Kane via R-help
> >><[hidden email]>
> >>wrote:
> >>
> >>> Have a look at
> >>http://stackoverflow.com/questions/5963269/how-to-make-
> >>> a-great-r-reproducible-example
> >>> and
> >>> http://adv-r.had.co.nz/Reproducibility.html
> >>>
> >>>
> >>>
> >>>
> >>>     On Wednesday, January 10, 2018, 11:51:22 AM EST, deva d <
> >>> [hidden email]> wrote:
> >>>
> >>>  dear all,
> >>>
> >>> i need some help in structuring my data file for a hierarchical time
> >>series
> >>> analysis.
> >>>
> >>> can someone help please ?
> >>>
> >>> i have a 600 row database in the nature of a panel data, with 3 time
> >>series
> >>> values of interest. the data also has 4 classificatory variables
> >>comprising
> >>> a code for each entity in the panel, a value for time (year), and
> >>> classification of type of entity and a further sub-group of the
> >type.
> >>>
> >>> i am unable to structure the data file for performing the hts
> >>analysis.
> >>>
> >>> thanks in advance.
> >>>
> >>> *....*
> >>>
> >>> *Deva*
> >>>
> >>>
> >>> ...............
> >>>
> >>>
> >>>
> >>> *in search of knowledge, everyday something is added ....*
> >>>
> >>> *in search of wisdom, everyday something is dropped  ... an old
> >>Chinese
> >>> Proverb*
> >>> :::::::::::::::::::::::::
> >>>
> >>>     [[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.
> >>>
> >>>         [[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.
> >>>
> >>
> >>
> >>
> >>--
> >>Jérémie Juste
> >>
> >>      [[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.
> >
> >______________________________________________
> >[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.
>
> ______________________________________________
> [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.
______________________________________________
[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.