search for: rscore

Displaying 13 results from an estimated 13 matches for "rscore".

Did you mean: score
2017 Oct 09
1
Help RFM analysis in R (i want a code where i can define my own breaks instead of system defined breaks used in auto_RFM package)
...of purchase # and column 3 is date of purchase qdrfm<-function(x,rbreaks=3,fbreaks=3,mbreaks=3,date.format="%Y-%m-%d", weights=c(1,1,1),finish=NA) { # if no finish date is specified, use current date if(is.na(finish)) finish<-as.Date(date(), "%a %b %d %H:%M:%S %Y") x$rscore<-as.numeric(finish-as.Date(x[,3],date.format)) x$rscore<-as.numeric(cut(x$rscore,breaks=rbreaks,labels=FALSE)) custIDs<-unique(x[,1]) ncust<-length(custIDs) rfmout<-data.frame(custID=custIDs,rscore=rep(0,ncust), fscore=rep(0,ncust),mscore=rep(0,ncust)) rfmout$rscore<-cut(by...
2017 Oct 09
2
Help RFM analysis in R (i want a code where i can define my own breaks instead of system defined breaks used in auto_RFM package)
...gt; qdrfm<-function(x,rbreaks=3,fbreaks=3,mbreaks=3,date.format="%Y-%m-%d", >> weights=c(1,1,1),finish=NA) { >> >> # if no finish date is specified, use current date >> if(is.na(finish)) finish<-as.Date(date(), "%a %b %d %H:%M:%S %Y") >> x$rscore<-as.numeric(finish-as.Date(x[,3],date.format)) >> x$rscore<-as.numeric(cut(x$rscore,breaks=rbreaks,labels=FALSE)) >> custIDs<-unique(x[,1]) >> ncust<-length(custIDs) >> rfmout<-data.frame(custID=custIDs,rscore=rep(0,ncust), >> fscore=rep(0,ncust),m...
2017 Oct 09
0
Help RFM analysis in R (i want a code where i can define my own breaks instead of system defined breaks used in auto_RFM package)
...s date of purchase > qdrfm<-function(x,rbreaks=3,fbreaks=3,mbreaks=3,date.format="%Y-%m-%d", > weights=c(1,1,1),finish=NA) { > > # if no finish date is specified, use current date > if(is.na(finish)) finish<-as.Date(date(), "%a %b %d %H:%M:%S %Y") > x$rscore<-as.numeric(finish-as.Date(x[,3],date.format)) > x$rscore<-as.numeric(cut(x$rscore,breaks=rbreaks,labels=FALSE)) > custIDs<-unique(x[,1]) > ncust<-length(custIDs) > rfmout<-data.frame(custID=custIDs,rscore=rep(0,ncust), > fscore=rep(0,ncust),mscore=rep(0,ncust))...
2017 Oct 10
0
Help RFM analysis in R (i want a code where i can define my own breaks instead of system defined breaks used in auto_RFM package)
...rbreaks=3,fbreaks=3,mbreaks=3,date.format="%Y-%m-%d", > >> weights=c(1,1,1),finish=NA) { > >> > >> # if no finish date is specified, use current date > >> if(is.na(finish)) finish<-as.Date(date(), "%a %b %d %H:%M:%S %Y") > >> x$rscore<-as.numeric(finish-as.Date(x[,3],date.format)) > >> x$rscore<-as.numeric(cut(x$rscore,breaks=rbreaks,labels=FALSE)) > >> custIDs<-unique(x[,1]) > >> ncust<-length(custIDs) > >> rfmout<-data.frame(custID=custIDs,rscore=rep(0,ncust), > >&gt...
2009 Apr 09
1
.Call()
...in C. #include <stdio.h> #include <R.h> #include <Rdefines.h> #include <math.h> SEXP ESscore(SEXP Rgeneset, SEXP Rgenemat, SEXP Rranklist, SEXP sim) { int nc = ncols(Rgenemat); double *geneset = NUMERIC_DATA(Rgeneset); double *genemat = NUMERIC_DATA(Rgenemat); SEXP Rscore; PROTECT(Rscore=NEW_NUMERIC(sim)); double *score = NUMERIC_DATA(Rscore); for(i=1; i<=sim; i++){ if(i>2) {genemat <- genemat[,sample(1:nc)];} for(k=1; k<nc ) } } [[alternative HTML version deleted]]
2017 Oct 11
0
RFM analysis
...t time and fixes a bug in the recency scoring. qdrfm<-function(x,rbreaks=3,fbreaks=3,mbreaks=3, date.format="%Y-%m-%d",weights=c(1,1,1),finish=NA) { # if no finish date is specified, use current date if(is.na(finish)) finish<-as.Date(date(), "%a %b %d %H:%M:%S %Y") x$rscore<-as.numeric(finish-as.Date(x[,3],date.format)) cat("Range of purchase recency",range(x$rscore),"\n") cat("Range of purchase freqency",range(table(x[,1])),"\n") cat("Range of purchase amount",range(by(x[,2],x[,1],sum)),"\n") custIDs&...
2005 Dec 06
1
standardized residuals (rstandard & plot.lm) (PR#8367)
...destination = c("1", "2", "3", "4", "5", "6", "7", "8")), .Names = c("origin", "destination")), class = "table") Diag <- as.factor(diag(1:8)) Rscore <- scale(as.numeric(row(occupationalStatus)), scale = FALSE) Cscore <- scale(as.numeric(col(occupationalStatus)), scale = FALSE) Uniform <- glm(Freq ~ origin + destination + Diag + Rscore:Cscore, family = poisson, data = occupationalStatus) residuals(Uniform)[as.logical(dia...
2017 Oct 06
3
Help RFM analysis in R (i want a code where i can define my own breaks instead of system defined breaks used in auto_RFM package)
I'm trying to perform an RFM analysis on the attached dataset, I'm able to get the results using the auto_rfm function but i want to define my own breaks for RFM. as follow r <-c(30,60,90) f <-c(2,5,8) m <-c(10,20,30) but when i tried to define my own breaks i got the identical result for RFM i.e 111 for every ID. please help me with this with working R script so that i can get
2012 Apr 02
2
linear-by-linear association model in R?
Dear all, can somebody give me some pointer how I can fit a "linear-by-linear association model" (i.e. loglinear model for the ordinal variables) in R? A brief description can be found here 'https://onlinecourses.science.psu.edu/stat504/node/141'. Thanks for your help
2006 Jan 10
2
standardized residuals (rstandard & plot.lm) (PR#8468)
...quot;, "2", "3", "4", "5", = "6", "7", > "8")), .Names =3D c("origin", "destination"))= , > class =3D "table") > Diag <- as.factor(diag(1:8)) > Rscore <- scale(as.numeric(row(occupationalStatus)), scale =3D FALSE) > Cscore <- scale(as.numeric(col(occupationalStatus)), scale =3D FALSE) > Uniform <- glm(Freq ~ origin + destination + Diag + > Rscore:Cscore, family =3D poisson, data =3D occupationalSta= tus) > resid...
2007 Apr 17
3
Extracting approximate Wald test (Chisq) from coxph(..frailty)
Dear List, How do I extract the approximate Wald test for the frailty (in the following example 17.89 value)? What about the P-values, other Chisq, DF, se(coef) and se2? How can they be extracted? ######################################################> kfitm1 Call: coxph(formula = Surv(time, status) ~ age + sex + disease + frailty(id, dist = "gauss"), data = kidney)
2010 Dec 02
0
survival - summary and score test for ridge coxph()
It seems to me that summary for ridge coxph() prints summary but returns NULL. It is not a big issue because one can calculate statistics directly from a coxph.object. However, for some reason the score test is not calculated for ridge coxph(), i.e score nor rscore components are not included in the coxph object when ridge is specified. Please find the code below. I use 2.9.2 R with 2.35-4 version of the survival package. Thanks DK. > fit <- coxph(Surv(futime, fustat) ~ ridge(rx, age, ecog.ps, theta=1),data=ovarian) > a<-summary(fit) Call: coxp...
2004 Jul 26
5
covariate selection in cox model (counting process)
Hello everyone, I am searching for a covariate selection procedure in a cox model formulated as a counting process. I use intervals, my formula looks like coxph(Surv(start,stop,status)~ x1+x2+...+cluster(id),robust=T) where id is a country code (I study occurence of civil wars from 1962 to 1997). I'd like something not based on p-values, since they have several flaws for this purpose. I turned