Hi,

I have a data set composed of five categorical variables which indicates by the "state" variable. the presence or absence of individuals in different rooms. This data is collected over one week or more.

variables:

day, hour_of_day,state,room,individuals

ex:

'Sunday', 12, 'Present',  'Bedroom', 'John Doe '

....

Since the 24 different levels of the hour_of_day may not properly reflect different categories of the day, It would be better to merge some levels and find intervals of day which better categorize the user activity.

My first idea is to use contingency tables or Poisson regression with different categories and compare their goodness of fit using the Likelihood Ratio Test (G2) or the Pearson chi-squared X2 statistics. But I don't know if this is correct?

I would also appreciate any answer about existing functions in R!

Mohammad

Similar questions and discussions