3-cs-fraudulent-transactions

A11b 0a01221d534ca10201 a11b neb5ba5a11b135

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: sQs,decreasing=T)[1:10]] v2925 v5537 v5836 v6058 v6065 v4368 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 0.8888889 v2923 v2970 v4910 v4542 0.8750000 0.8571429 0.8333333 0.8095238 O%5"*%"/%2(5+20+.%(#+%)""#%(*%#+)"#*1.$%*'+% JA(.*1*4R `A*%!"#$"%(#$A+2%*'(*%*'+2+%2'"A5>%."*%3+% #+0";+>8%*'(*%;(5A+2%B(.%3+%10)A*+>%/#"0% 21015(#%)#">AB*28%#+)"#*+>%34%"*'+#%2(5+20+. Statistics 503, Spring 2013, ISU 21 C"-'$%?1##1.9# [(0+%B(5BA5(*1".2%(#+%0(>+%/"#%*'+%D(5% B"5A0. a1$'+2*%)#")"#*1".%34%)#">AB*%12%6UL:8%(.>% /"#%2(5+20(.%12%6Ubc: O#$A+>%*'(*%B(.."*%#+0";+%*'+2+%B(2+28% G+%.++>%*"%10)A*+%*'+%01221.$2 Statistics 503, Spring 2013, ISU 22 ;?8'&$%4)%?$(1". > tPrice <- tapply(sales[sales$Insp != 'fraud', 'Uprice'], + list(sales[sales$Insp != 'fraud', 'Prod']), median, na.rm=T) > dim(tPrice) [1] 4546 > noQuant <- which(is.na(sales$Quant)) > length(noQuant) [1] 12900 > sales.imp <- sales > sales.imp[noQuant, 'Quant'] <- ceiling( + sales.imp[noQuant, 'Val'] / + tPrice[sales.imp[noQuant, 'Prod']]) > noVal <- which(is.na(sales$Val)) > length(noVal) [1] 294 > sales.imp[noVal, 'Val'] <- sales.imp[noVal, 'Quant'] * + tPrice[sales.imp[noVal, 'Prod']] Statistics 503, Spring 2013, ISU 23 ;?8'&$%4)%?$(1". &(5BA5(*+%0+>1(.%A.1*%)#1B+%/"#%+(B'% )#">AB*8%"/%.".E01221.$%B(2+28%(.>%."*% /#(A>%B(2+2 -0)A*+%01221.$%CA(.*%;(5A+2%34%D(5%>1;1>+>% 34%0+>1(.%A.1*%)#1B+ -0)A*+%01221.$%D(5%34%CA(.*%*10+2%0+>1(.% A.1*%)#1B+ N+EB(5BA5(*+%*'+%A.1*%)#1B+%;(#1(35+8%d)#1B+ Statistics 503, Spring 2013, ISU 24 ;?8'&$%4)%?$(1". &(5BA5(*+%0+>1(.%A.1*%)#1B+%/"#%+(B'% )#">AB*8%"/%.".E01221.$%B(2+28%(.>%."*% /#(A>%B(2+2 -0)A*+%01221.$%CA(.*%;(5A+2%34%D(5%>1;1>+>% 34%0+>1(.%A.1*%)#1B+ -0)A*+%01221.$%...
View Full Document

Ask a homework question - tutors are online