search for: wkdy

Displaying 5 results from an estimated 5 matches for "wkdy".

Did you mean: kdy
2006 Oct 05
1
convert day of week from number to character and include in lm
All, I am trying to include a day of week variable (1-7) in in a regression model. I would like to have the day of week treated as a categorical variable rather than a number the code looks like lm( dep ~ WKDY) I know this is a basic question, but help would be appreciated thanks spencer [[alternative HTML version deleted]]
2006 Nov 09
0
interaction term between two categorical variables in ARIMA
...Dec), and holiday status (1/0) as my independent variables. There is evidence of multiplicative interaction between holiday status and weekday and I would like to add an interaction term to my arima model, but I am not sure about best way to go about doing it. example code: arr <- rpois(98,70) WKDY <- rep(c("s","m","t","w","th","f","sa"),14) HD <- c(rep(0,30),1,rep(0,25),1,rep(0,43)) arima(x= arr,order=c(1,0,0), xreg=cbind(WKDY,HD, HD*WKDY)) error message: Error in HD * WKDY : non-numeric argument to binary operator...
2006 Sep 01
1
difference between ns and bs in predict.glm
....frame(formula, rownames, variables, varnames, extras, extranames, : variable lengths differ (found for 'ns(DY, df = 6)') In addition: Warning message: 'newdata' had 1 rows but variable(s) found have 6 rows so for whatever reason this code works model. <- glm.nb(CNT ~ WKDY + bs(DY,df=6) + H_FLAG + NH_FLAG + Trend) predict(model,newdata=data[i,1:10],type="response",se=TRUE) but this code does not work model. <- glm.nb(CNT ~ WKDY + ns(DY,df=6) + H_FLAG + NH_FLAG + Trend) predict(model,newdata=data[i,1:10],type="response",se=TRUE) the two are i...
2007 Jan 18
0
multiple seasonal time series models
Is there an R package that can model time series with multiple seasonal cycles, e.g., 7 wkdy x 24 hr , I have tried searching the Help, but have been unable to find anything. Any help would be appreciated. thank you, Spencer [[alternative HTML version deleted]]
2006 Aug 31
0
periodic spline in glm
I have been trying to find a command similiar to bs or ns to add a periodic/or cyclical splie term to a regression model in glm.nb I have been using ns to fit a spline to day of the year (1:365): glm.nb(CNT ~ WKDY + ns(DY,df=6) + HOLIDAY_FLAG + Trend) but I think a periodic spline might be more appropriate. Any suggestions would be appreciated. best, Spencer Jones, M.Stat. NLM Fellow Dept. Biomedical Informatics University of Utah On 8/31/06, Berton Gunter <gunter.berton@gene.com> wrote: &g...