Displaying 3 results from an estimated 3 matches for "svyhist".
Did you mean:
svchost
2009 Feb 07
0
Problems with svyhist
I have two problems with svyhist. I hope 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
dat...
2012 Oct 05
1
svyhist
...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, bandwidth=5,subset(nhis, xspd2==2)), lwd=2)
dev.o...
2012 Oct 14
2
svyhist and svyboxplot
...rdered=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", xlab="Current Smoker's Age ")
lines (svysmooth(~age_p, bandwidth=5,subset(nhis, xsmoke=='Current SMK')), lwd...