0 rows> (or 0-length row.names)
I see the printout (not an "error") that you describe on the 2nd example you gave:
t2 <- WOETable(X=SFDC1$case_age, Y=SFDC1$survey) print(t2)
[1] GOODS BADS TOTAL PCT_G PCT_B WOE IV <0 rows> (or 0-length row.names) The result of WOETable is perfectly legal - it is a data.frame with no rows. help(WOETable) says that the 'X' argument should be a "categorical variable stored as factor" but the function does not check that that is true. You gave it a numeric (continuous) variable, case_age, and it misbehaved. You can turn case_age into a factor with the cut() function. Bill Dunlap TIBCO Software wdunlap tibco.com
On Wed, Aug 31, 2016 at 3:37 AM, Shivi Bhatia <shivipmp82 at gmail.com> wrote:
These are the packages i am using: library(woe) #WEIGHT OF EVIDENCE library(InformationValue) #INFORMATION VALUE The syntax used is : WOE(X=SFDC1$log_caseage, Y=SFDC1$survey) WOETable(X=SFDC1$case_age, Y=SFDC1$survey) IV(X=SFDC1$case_age, Y=SFDC1$survey) On Wed, Aug 31, 2016 at 12:54 AM, Mark Sharp <msharp at txbiomed.org> wrote:
Shivi, What package(s) are you using. What functions are you using. How are you calling the functions. A reproducible sample has all of the actual code needed to create a representative error. There are multiple packages you could be using to look at weight of evidence and information value. For example, there is a WOE function in the Information package and a woe function in the woe package. Mark On Aug 30, 2016, at 2:15 PM, Shivi Bhatia <shivipmp82 at gmail.com> wrote: Hi Mark, What i understand, probably when i run the WOE & IV to check significant variables that is where i get this error. Thanks for your assistance Mark really appreciate i will look into some other measure on this. On Wed, Aug 31, 2016 at 12:35 AM, Mark Sharp <msharp at txbiomed.org> wrote:
Shivi, It is likely that William knows what you are trying to do because of his considerable experience, but I am not able to figure it out from what you have written. You have apparently sent the output from something like dput(SFDC[1:50, ]), but I still do not know what you did to get the error. I successfully assigned the structure you sent to the name SFDC and nothing seems amiss. Mark R. Mark Sharp, Ph.D. Director of Primate Records Database Southwest National Primate Research Center Texas Biomedical Research Institute P.O. Box 760549 San Antonio, TX 78245-0549 Telephone: (210)258-9476 e-mail: msharp at TxBiomed.org <msharp at txbiomed.org>
On Aug 30, 2016, at 12:32 PM, Shivi Bhatia <shivipmp82 at gmail.com>
wrote:
Hi William/ Mark, I am using WOE & IV (weight of evidence) reduce the number of
independent
vars. I have read this data as a csv file. reproducible example for your reference please: structure(list(date = structure(c(6L, 6L, 6L, 6L, 6L, 6L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L,
... truncated
______________________________________________ R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org
/posting-guide.html <http://www.r-project.org/posting-guide.html>
and provide commented, minimal, self-contained, reproducible code.
CONFIDENTIALITY NOTICE: This e-mail and any files and/or attachments transmitted, may contain privileged and confidential information and is intended solely for the exclusive use of the individual or entity to whom it is addressed. If you are not the intended recipient, you are hereby notified that any review, dissemination, distribution or copying of this e-mail and/or attachments is strictly prohibited. If you have received this e-mail in error, please immediately notify the sender stating that this transmission was misdirected; return the e-mail to sender; destroy all paper copies and delete all electronic copies from your system without disclosing its contents.
CONFIDENTIALITY NOTICE: This e-mail and any files and/or attachments transmitted, may contain privileged and confidential information and is intended solely for the exclusive use of the individual or entity to whom it is addressed. If you are not the intended recipient, you are hereby notified that any review, dissemination, distribution or copying of this e-mail and/or attachments is strictly prohibited. If you have received this e-mail in error, please immediately notify the sender stating that this transmission was misdirected; return the e-mail to sender; destroy all paper copies and delete all electronic copies from your system without disclosing its contents.