[R] lrm error message
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~age reglrm<-lrm(regform,nst) summary(reglrm) Error in summary.Design(reglrm) : adjustment values not defined here or with datadist for age ive looked at the help file for lrm and thought it was simple enough but apparently not. any help would be greatly appreciated. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] efficient is.na tabulation?
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 and tabulate it, but surely there is a simpler way? any help is greatly appreciated, angelo [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] overall comparison of an ordered categorical in a multiple regression
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 command or option change in the summary to find out the overall p-value? thank you in advance [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.