search for: mybreaks

Displaying 3 results from an estimated 3 matches for "mybreaks".

Did you mean: mbreaks
2009 Feb 07
0
Problems with svyhist
...e this is easy, and it may be that "simple R syntax" will do what I need. 1) I'm able to get a single plot out, but I need to put two distributions in the same graphic to visually compare them. 2) I get uniform breaks at intervals of 10. I can plot the unweighted data using MyBreaks with hist as shown in the second code snippet ###################################### SurveyData <- read.table("C:/Data/R/RADAMdata2.csv", header=TRUE, sep=",", na.strings="NA", dec=".", strip.white=TRUE) DsnRADAM <- svydesign(id = ~RADAM.TAZ, w...
2012 Oct 14
2
svyhist and svyboxplot
...factor(tor$xsmoke,levels=c (1,2,3), labels=c('Current SMK','Former SMK', 'Never Smk'), ordered=TRUE) is.factor(tor$xsmoke) # object with survey design variables and data nhis <- svydesign (id=~psu,strat=~stratum, weights=~wt8, data=tor, nest=TRUE) MyBreaks <- c(18, 25, 35, 45, 55, 65, 75, 85) par(mfrow=c(2,2)) #Chart 1 options( survey.lonely.psu = "adjust" ) svyhist (~age_p, subset (nhis, xsmoke=='Current SMK'), breaks=MyBreaks, ylim = c(0,0.040), main= " ", col="red", xla...
2012 Oct 05
1
svyhist
...{ xspd2 <- factor(xspd2,levels=c (1,2), labels=c('SPD', 'No SPD'), ordered=TRUE) } ) # object with survey design variables and data nhis <- svydesign (id=~psu,strat=~stratum, weights=~wt8, data=tor, nest=TRUE) MyBreaks <- c(18,35,45,55,65,75,85,95) png("svyhist_age_at_death.png") svyhist (~dthage, subset (nhis, xspd2==2), breaks=MyBreaks, main= " ", col="grey80", xlab="Age at Death Distribution" ) lines (svysmooth(~dthage...