Yichih Hsieh
2009-Jul-30 12:53 UTC
[R] package "reldist" version 1.5-5.1 : how to not just compare two years's wage distribution
Dear all users, I read all R programs and texts in "Relative Distribution Methods" website, but I encounter two problems when I used it. then I used "Google" to try to find any solutions about the two problems,but I got no useful hints. 1、 In package "reldist" y mean sample from comparison distribution yo mean sample from reference distribution but I would like to compare more than two years ( A total of fifteen years, from 1979, 1981, 1983, 1985..........to 2007) how should I correct my programs in the below, then I can compare fifteen years's wage distribution? fig2b <- reldist(y=mu1981$b1,yo=mu1979$b1,ci=F,smooth=0.4, yowgt=mu1979$weight2,ywgt=mu1981$weight2, bar=TRUE, yolabs=seq(-1,3,by=0.5), ylim=c(0,2.5),cex=0.8, ylab="Relative Density", xlab="Proportion of the mu1979 Cohort") title(main="Fig2(b)",cex=0.6) 2、 I downloaded package "reldist" version 1.5-5.1 and R version 2.9.0 (Windows) I use the code provided in "Applying Relative Distribution Methods in R", to check the installation of the reldist package In figure 8, the first three lines of programs is :> par(mfrow=c(1,2)) > rdhsrscr <- rdeciles(y=pwhsr, yo=pwscr,+ ywgt=wgthsr,yowgt=wgtscr,binn=binn) R gave me the error message: error in seq.default(0,1,length=binn+1): object 'binn' not found What is my example missing Please help me figure out what additional diagnostics I can run to achieve enlightenment ? Thanks for your consideration !! Best, Yichih -- Yichih Hsieh internet: yichih.hsieh@gmail.com [[alternative HTML version deleted]]