[R] lrm error message

2008-02-26 Thread Angelo Passalacqua
I'm trying to learn how to use the lrm() function by simulating data using an old dataset but it's giving me an error I don't understand: (nst$regular already exists) nst$regular<-as.ordered(nst$regular) nst$age<-rnorm(n=942,mean=43.20488,sd=17.03) nst$age<-round(age,digits=0) regform<-regular~

[R] efficient is.na tabulation?

2008-02-25 Thread Angelo Passalacqua
I am aware of table(is.na(df$var)) but is there an efficient way of create a table that shows the number of missing values in each variable of a data frame? Right now I am forced to create a new variable, varna<-is.na(df$var), for each variable of the data frame, bind them to a new data frame an

[R] overall comparison of an ordered categorical in a multiple regression

2008-02-21 Thread Angelo Passalacqua
I entered the following: formula<-nst~age+soc+inc+reg+imp pnstlm<-lm(formula,nst) summary(pnstlm) imp and soc are ordered categorical variables but the summary does not give an output of the overall p-values, just individual comparisons. I can't find help for this in the manual. Is there a co