search for: hsb2

Displaying 4 results from an estimated 4 matches for "hsb2".

Did you mean: hdb2
2013 Jan 11
0
Error with looping through a list of strings as variables
...ce these start-up errors are resolved there should be a "(data, ...) : fraction of 0.000000 is too small" error will be seen which is simply due to the small substitute data set and of no concern. rm(list=ls()) library(party) library(reshape) puthere <- c("TEST_RESULTS.csv") hsb2 <- read.csv("http://www.ats.ucla.edu/stat/data/hsb2.csv") names(hsb2) set.seed(8296) ctrl <- cforest_unbiased(ntree=500, mtry=2) varlist <- names(hsb2)[3:4] for (h in varlist){ for (k in c(1,0)){ for (i in c(1,2)){ ## Data subset filtered <- subset(hsb2, schtyp == i & f...
2009 Oct 03
3
How to deal with this :" object ' obs' not found.
...ata below. The problem is, I have a variable name "obs"; this is.. a counter variable. something like _n_ in SAS. I do not know why it is not working. I even tried a similar example in UCLA webpage: http://www.ats.ucla.edu/stat/R/faq/sort.htm :it also does not seem to work. "*sort1.hsb2 <- hsb2[order(read) , ]"* Do you have any idea how to deal with this problem?? Thank you so much. -Hyo > colnames(ttx1) [1] "longitude 1" "longitude 2" "longitude 3" "longitude 4" "longitude 5" [6] "longitude 6" "l...
2008 Jan 15
4
Overlay plots from different data sets using the Lattice package
....frame.B) <- names(data.frame.A) # stand alone plots histogram(~ vals|factor.1*factor.2, data.frame.A, type = "density") densityplot(~ vals | factor.1*factor.2, data.frame.B, plot.points = F) # I found http://www.ats.ucla.edu/STAT/R/faq/overlay_trellis.htm xyplot(write~read | ses.f, hsb2, panel=function(x, y, subscripts){ panel.xyplot(x, y, pch=16) panel.lmline(x, y, lty=4) panel.xyplot(hsb2$science[subscripts], hsb2$math[subscripts], pch=3) panel.lmline(hsb2$science[subscripts], hsb2$math[subscripts]) }, as.table=T, subscripts=T) # but it seems that the overlay only works i...
2013 May 01
2
Factors and Multinomial Logistic Regression
...icients of my model and for the relative risk ratios? Best Regards Lorenzo ########################################################################### library(ares) library(foreign) ## See the Stata example at http://bit.ly/11VG4ha mydata <- read.dta("http://www.ats.ucla.edu/stat/data/hsb2.dta") ## IMPORTANT: redefine the base line!!! mydata$ses2 <- relevel(mydata$ses, ref = "middle") mymodel <- multinom(ses2 ~ science+ socst+ female, data=mydata) print(summary(mymodel)) print("The relative risk ratio (RRR) is, ") print(exp(coef(mymodel)))