robjhyndman / demography

demography package for R
https://pkg.robjhyndman.com/demography
73 stars 25 forks source link

Can I apply lca to abridged mortality rate? #13

Closed kcsamir closed 9 years ago

kcsamir commented 9 years ago

Can I apply lca to abridged mortality rate? Age: 0, 1, 5, ...100 Years: 5 year steps. I tried it with 10 period data and following is what I get when I run the following codes

data <- read.demogdata(file="rate.txt", popfile="popfile.txt", type="mortality", label="NepalMale" , max.mx = 10, skip = 0, popskip = 0, lambda=0, scale=1000)

nepalmale <- lca(data=data, series=names(data$rate)[1], years=data$year, ages=data$age, max.age=100, adjust = c("dt", "dxt", "e0", "none")[1], chooseperiod=FALSE, minperiod=9, breakmethod=c("bai","bms"), scale = FALSE, restype = c("logrates", "rates", "deaths")[2], interpolate = FALSE)

Error in matrix(mx, nrow = n, ncol = m) : invalid 'ncol' value (too large or NA)

kcsamir commented 9 years ago

sorry for the repetition