[R] Logistic regression help!

2014-05-03 Thread Si Qi L.
Hi guys, I have a trouble to solve the specificity and senstitivity for a logistic regression model. I really need your help, would you please help me out? :) Thank you!! This is the model I constructed: model=glm(Status ~ Gender.compl+ X2.4.times.per.month+

[R] About Tree Package

2014-04-28 Thread Si Qi L.
Hi, I will be very grateful if you can give a help on my problem. I am really stuck on it now. The problem is that I need to construct a classification tree model and prune tree in order to test the learning dataset for getting its sensitivity and specificity. But my codes seems wrong somewhere,

[R] sensitivity and specificity

2014-04-25 Thread Si Qi L.
Hi guys, I will be very grateful if you guys can do me a little favor on R. I am calculating the sensitivity and specificity for a 2*2 matrix, such as t 01 0 1427 110 1 271 166 My codes are: sens - function(ct) { ct[2,2] / sum(ct[,2]) } spec -

[R] logistical indexing in R

2014-04-09 Thread Si Qi L.
Dear mates, I am bit of stuck with a coding, all I have to do is to clean and tranform the missing data -97 of the attribute ej into a normal number value in a range from 0 to 22. My steps are : 1) first return the subsets, as check, they do sum to original 2) manipulate the attribute ej

Re: [R] about lm()

2014-03-31 Thread Si Qi L.
Hi, I am very new on R so I will remember to post in plain text next time. Thank you all for your help. I think I can figure it out now~ Many thanks!:) Best regards, Siqi 2014-03-31 11:43 GMT+01:00 Helios de Rosario helios.derosa...@ibv.upv.es: El día 30/03/2014 a las 15:23, Si Qi L

[R] about lm()

2014-03-30 Thread Si Qi L.
Hi I have a problem with linear regression. This is my codes: acc1- lm(data$acc ~ dummy + data$Reqloanamount + data$Code + data$Code.1 + data$EmpNetMonthlyPay + data$Customer_Age + data$RTI) summary(acc1) These attributes are all numerical except the acc(factors), so how can I fix the problem R

[R] dummy coding problem

2014-03-26 Thread Si Qi L.
Hi, I have got a problem with dummy coding and I really couldn't figure it out. Would you please help me out? this is my codes: idx-sort(unique(Employment.time$V1)); dummy - matrix(NA, nrow=nrow(Employment.time), ncol= length(idx)) for (i in 1:nrow(Employment.time)) { for (j in 1:length(idx)) {

[R] How to creat a dummy coding in R? (URGENT!)

2014-03-25 Thread Si Qi L.
Hi, it's so urgent that I really need your help on R. This following is part of my data, do u know how to create a dummy coding about it in R? My control group is Owner occupier. Many thanks for your big help!!!:) *AppHomeStatus* Owner occupier Living with parents Living with parents Private