|
Dear S-plus experts
I have three questions
1) It is possible to manipulate or use the crosstabs (ct) result values as separate entities (eg., a<- first row, last column)? I will like to automate the process of adding a ct value to the parameter of another function.
2) Does a weight function to be use with ct exist? I need to use a vector that represents a weight for my data.
3) Currently I want to conduct a binary logistic model.
My dependent variable is a factor with 3 categories 1, 2 & 7.
To have only two (2) categories I conducted
Adult.HistoryB<-(Adult.History[!is.element(asthma2, c("7")),])
My problem is that when I run:
attach(Adult.HistoryB)
ddist<-datadist(asthma2, age, sex, income2)
options(datadist='ddist')
lrm(asthma2~sex, data="">
I obtain:
Warning messages:
Length of longer object is not a multiple of the length of the shorter object in: e1 != e2
Problem in fitter(X, Y, penalty.matrix = penalty..: program logic error 1
If I run the function table in my dependent var the category 7 is still registered in the table.
table(asthma2)
1 2 7
776 3341 0
Could be that the problem?
How can I solve the warning message?
I ran lrm with the three categories and it run adequately.
Thanks very much,
Jose
Helping your favorite cause is as easy as instant messaging. You IM, we give. Learn more.
|