[prev in list] [next in list] [prev in thread] [next in thread] 

List:       r-help
Subject:    [R]  periodic spline in glm
From:       "Spencer Jones" <ssj1364 () gmail ! com>
Date:       2006-08-31 17:19:39
Message-ID: 1c6126db0608311019j285a8316sfbfd27b3f6600e2d () mail ! gmail ! com
[Download RAW message or body]

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:
>
> I perhaps should have added:
>
> ?plot.data.frame, ?plot.factor and ?UseMethod for S3 generic dispatch
> (plot.factor is the plotting method actually being called and you are
> actually getting a boxplot for a single value.)
>
> -- Bert Gunter
> Genentech Non-Clinical Statistics
> South San Francisco, CA
>
> "The business of the statistician is to catalyze the scientific learning
> process."  - George E. P. Box
>
>
>
> > -----Original Message-----
> > From: r-help-bounces@stat.math.ethz.ch
> > [mailto:r-help-bounces@stat.math.ethz.ch] On Behalf Of Monica Pisica
> > Sent: Thursday, August 31, 2006 9:30 AM
> > To: r-help@stat.math.ethz.ch
> > Subject: [R] problems with plot.data.frame
> > Importance: High
> >
> > Hi list,
> >
> > I have a question about 'plot'. I am trying to plot values
> > registered every
> > month - or every other month. If i build a data.frame called
> > mydata like
> > this (as an example)
> >
> > jan   3   1   7
> > mar  2   4   2
> > may 1   3   2
> > jul    3   7   4
> > sep  5   2   3
> > nov  3   1   5
> >
> > and use the command line:
> >
> > plot(mydata[c(1,3)])
> >
> > I get a graph that has on the x axis my months in
> > alphabetical order - which
> > i don't want, and instead of points i have thick horizontal
> > lines. I've
> > tried everything i could and understood from the R help files
> > to give me
> > points and on x axis the month in my order instead of alpha order. No
> > success. What is the trick?
> >
> > I fixed the month order by using numerals in front of them
> > like 01, 03, ...
> > etc, but this is not an elegant solution.
> >
> > Any help will be much appreciated.
> >
> > Monica
> >
> > ______________________________________________
> > R-help@stat.math.ethz.ch 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.
> >
>
> ______________________________________________
> R-help@stat.math.ethz.ch 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.
>

	[[alternative HTML version deleted]]

______________________________________________
R-help@stat.math.ethz.ch 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.
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic