Hi,

I need to regress the population on time slot and also days in advance.

A sample dataset is like this. I do not know whether I can attach a file in
this mailing list or not. If you know how to do it, I will be happy to send
you my data file.

time slot      days in advance   US   EUR    CHINA  JAPAN
                       2                    34     56       78        34
6:am-7am        5                    12      34       35        54
                       7                    39      43       57       38
                       2
7:am-8:am        5
                       7
....


The fist column is time slot and in .csv file, it is a merged unit.  The
second column is days in advance, the value will only be 2,5 or 7. The other
four columns are population for different countries. I need to regress
the population  on time slot and days in advance. Both are dummy variables.

Firstly, I guess I need to get the data organized. How can I extract the
population data and put it in one column and give the
corresponding information of time slot and days in advance in other two
columns.

Secondly, I know how to do linear regression on variables. But I do not know
the codes for dummy variable. Any tips?

Help for each step is welcomed.

Thank you folks!

        [[alternative HTML version deleted]]

______________________________________________
R-help@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.

Reply via email to