[R] Lee carter model
Jeff Newmiller
jdnewmil at dcn.davis.CA.us
Mon Jul 1 23:49:04 CEST 2013
The Posting Guide warns you to not post in HTML format (it messes up R code examples). It also warns you to supply reproducible examples (we should be able to paste your code into a fresh R session and see essentially what you see).
The warning message means you have given the function a factor where it expected a numeric value (max does not work on factors). I suggest that you learn how to use the str() function on your data so you know that you have imported it successfully before you give it to analysis functions. You may need to review the "Introduction to R" and "R Data Import/Export" PDF files that come with R if you don't know what a factor is or how to import numeric data.
---------------------------------------------------------------------------
Jeff Newmiller The ..... ..... Go Live...
DCN:<jdnewmil at dcn.davis.ca.us> Basics: ##.#. ##.#. Live Go...
Live: OO#.. Dead: OO#.. Playing
Research Engineer (Solar/Batteries O.O#. #.O#. with
/Software/Embedded Controllers) .OO#. .OO#. rocks...1k
---------------------------------------------------------------------------
Sent from my phone. Please excuse my brevity.
ntamjo achille <ntamjo2003 at yahoo.fr> wrote:
>Hi everybody,
>
>I'm running codes for for a Lee carter modeling. I compute the
>demogdata function in the package demography.�
>Age is a class of factor
>
>Base<-demogdata(data=x,pop=y,ages=AGE,years=YEAR,type="mortality",label="City",name="Hommes",lambda=1)
>�
>Now, I try to run codes for lee carter model, and i always get the
>following message:
>Error in Summary.factor(c(1L, 2L, 24L, 35L, 46L, 57L, 68L, 79L, 90L,
>101L, �:�
>� max not meaningful for factors
>
>Please can you help to understand what means this message.�
>
>Many Thanks
>
>Achille
>
> [[alternative HTML version deleted]]
>
>
>
>------------------------------------------------------------------------
>
>______________________________________________
>R-help at 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.
More information about the R-help
mailing list