Hi Antonio, I'm not sure of the issues with your analysis, but we're
working on a revision of yourcast that should make these easier.
Gary
--
*Gary King* - Albert J. Weatherhead III University Professor - Director,
IQSS <http://iq.harvard.edu/> - Harvard University
GaryKing.org - King(a)Harvard.edu - @KingGary <https://twitter.com/kinggary> -
617-500-7570 - Assistant <king-assist(a)iq.harvard.edu>: 617-495-9271
On Fri, Apr 28, 2017 at 9:41 PM, 林晓 <linxiao6(a)mail2.sysu.edu.cn> wrote:
> Dear Professor King,
> I was doing some literature reading and I came across your software. I try
> the package with my own data but I got some error.
> I modified my data and make it look like the example data in the file path
> of the package. yourprep runs smoothly with some data like below:
>
> dta$data$`204500`
> rspi2 popu2 time
> 2004 NA 4858042 1994
> 2005 NA 4785805 1995
> 2006 NA 4704201 1996
> 2007 0.006431800 4592693 1997
> 2008 0.005454000 4522168 1998
> 2009 0.005908178 4432729 1999
> 2010 0.005238223 4317368 2000
> 2011 0.005180368 4237330 2001
> 2012 0.004544100 4176305 2002
> 2013 0.004363600 4098927 2003
> 2014 0.003821751 4056178 2004
> 2015 0.003390900 3958900 2005
> 2016 NA NA 2006
> 2017 NA NA 2007
> 2018 NA NA 2008
> 2019 NA NA 2009
> 2020 NA NA 2010
> 2021 NA NA 2011
> 2022 NA NA 2012
> 2023 NA NA 2013
> 2024 NA NA 2014
> 2025 NA NA 2015
>
> But then I got error with yourcast() command.
>
> The scripts run below:
> > dta <- yourprep(dpath='./GARY_KING_CHINA_mortality',index.code="ggggaa",
> tag="csid",
> + year.var=TRUE, sample.frame=c(2004,2015,2016,2025),
> + G.names="cntry.codes.txt", adjacency="adjacency.txt",
> + verbose=TRUE,summary=FALSE)
> Loading cross section files and checking for errors...
> csid204500.txt
> csid204501.txt
> csid204505.txt
> csid204510.txt
> csid204515.txt
> csid204520.txt
> csid204525.txt
> csid204530.txt
> csid204535.txt
> csid204540.txt
> csid204545.txt
> csid204550.txt
> csid204555.txt
> csid204560.txt
> csid204565.txt
> csid204570.txt
> csid204575.txt
> csid204580.txt
> csid204585.txt
> Loading auxiliary files...
> cntry.codes.txt
> adjacency.txt
> ...Finished
> Total number of cross sections: 19
>
> ylc <- yourcast(formula=log(rspi2/popu2) ~ time, dataobj=dta,
> model="LC",debug =TRUE)
> Error in seq.default(smpvec[ind], smpvec[ln], by = 1) :
> wrong sign in 'by' argument
>
> Thank you for your help!
>
> Antonio Lam
>