search for: pr2

Displaying 20 results from an estimated 34 matches for "pr2".

Did you mean: cr2
2008 Feb 12
1
Finding LD50 from an interaction Generalised Linear model
...) NULL 11 136.114 ldose 1 106.323 10 29.791 6.266e-25 sex 1 15.063 9 14.729 1.040e-04 ldose:sex 1 7.835 8 6.894 0.005 > ##plot data > pr<-expand.grid(sex=levels(dat$sex),ldose=seq(0,5,0.2)) > pr2<-data.frame(pr,preds=predict(mod1,type="response",newdata=pr)) > > mm<-dat[dat$sex=="M",] > ff<-dat[dat$sex=="F",] > > par(mfrow=c(1,1)) > plot(mm$numsurv/mm$n~ldose,mm,cex=1.5,cex.axis=1.5,xlab="logDose",ylab="Proportion &gt...
2012 Oct 21
0
R^2 in Poisson via pr2() function: skeptical about r^2 results
...ictors each, using glm with family=gaussian. Gaussian distribution fits better than linear regression on fit indices, and also for theoretical reasons (e.g. the dependent variables are counts, and the distribution is highly positively skewed). I want to determine pseudo R^2 now. However, using the pR2() of the pscl package offers drastically higher R^2 values than I get using linear regressions, and that I am "used" from the dataset which I know well (it might sound weird, but sometimes you're just skeptical of the results after you worked a while on the data). Now I know that lin...
2011 Sep 03
2
ROCR package question for evaluating two regression models
...est.data, type = "response")pred2 = predict(model2, test.data, type = "response") I have used ROCR package to compare them:pr1 = prediction(pred1,test.y)pf1 = performance(pr1, measure = "prec", x.measure = "rec")  plot(pf1) which cutoff this plot is based on? pr2 = prediction(pred2,test.y)pf2 = performance(pr2, measure = "prec", x.measure = "rec")pf2_roc  = performance(pr2,measure="err")plot(pf2) First of all, I would like to use cutoff = 0.5 and plot the ROC, precision-recall curves based on that cutoff value. In other words,...
2007 Oct 12
2
accessing ylim set by xyplot
Hello, I would like to know if there is a clever way to avoid the problem illustrated below within the xyplot function. x <- seq(1:10) y <- seq(1:10) pr1 <- xyplot(x ~ y) u <- seq(1:12) v <- seq(1:12) pr2 <- xyplot(u ~ v, col = "red", more = FALSE) prts <- list(pr1, pr2) for(i in prts) print(i, more = TRUE) I realize that one possibility is to explicitly set the same values for xlim and ylim for the plot, but that doesn't work very well for me because I am accessing data...
2013 Mar 21
1
contourplot
Greets, I'm using a data frame that looks like: > head(pr2) X1 X2 X3 X4 Y fit res 1 44 33.2 5 30 41.2 39.22201 1.977991 2 43 33.8 4 41 31.7 38.48476 -6.784761 3 48 40.6 3 38 39.4 44.78278 -5.382783 4 52 39.2 7 48 57.5 51.48134 6.018656 5 71 45.5 11 53 74.8 68.25585 6.544153 6 44 37.5 9 65 59.8 53.27743 6.522569 Along with the co...
2005 May 03
2
comparing lm(), survreg( ... , dist="gaussian") and survreg( ... , dist="lognormal")
Dear R-Helpers: I have tried everything I can think of and hope not to appear too foolish when my error is pointed out to me. I have some real data (18 points) that look linear on a log-log plot so I used them for a comparison of lm() and survreg. There are no suspensions. survreg.df <- data.frame(Cycles=c(2009000, 577000, 145000, 376000, 37000, 979000, 17420000, 71065000, 46397000,
2004 Nov 01
1
plot time series / dates (basic)
...e="", dec=".", fill = T, skip=0) attach(d) #function to plot a long time series piece by piece pl <- function(vara, varb, points) { date <- as.POSIXct(strptime(as.character(Date), "%d-%b-%y"), tz = "GMT") pr1 <- vector(mode="numeric") pr2 <- vector(mode="numeric") dat <- vector() for (j in 1:(round(length(Vol)/points)+1)) #number of plots { for (i in ((j-1)*points+1):(j*points)) { pr1[i-points*(j-1)] <- vara[i] pr2[i-points*(j-1)] <- varb[i] dat[i-points*(j-1)] <- date[i] } par(mfrow=...
2008 Jul 24
2
ORA-19870 and ORA-19502 During RMAN restore to OCFS2 filesystem
...the following error during RMAN restore for nearly all of the datafiles attempted to restore with exception of a couple of smaller datafiles which were smaller < 2GB. ORA-19870: error reading backup piece /db/dumps/TR1_1/rmanbackup/TR1_88_1 ORA-19502: write error on file "/db/devices/db1/PR2/pr2_1/pr2.data1", blockno 1409 (blocksize=8192) ORA-27061: waiting for async I/Os failed Linux-x86_64 Error: 5: Input/output error Tried various Oracle init parameters for filesystem i/o SETALL, ASYNCH, DIRECT and also disk_asynch_io settings. After this failure tried to used a non ocfs2 fi...
2010 Oct 13
5
Poisson Regression
Hello everyone, I wanted to ask if there is an R-package to fit the following Poisson regression model log(\lambda_{ijk}) = \phi_{i} + \alpha_{j} + \beta_{k} i=1,\cdots,N (subjects) j=0,1 (two levels) k=0,1 (two levels) treating the \phi_{i} as nuinsance parameters. Thank you very much -- -Tony [[alternative HTML version deleted]]
2009 Jan 28
3
initial value in 'vmmin' is not finite
...n3 = rbind(x[3],x[5],x[6])+ con4 = rbind(x[5],x[6])+ rho=exp(x[7])/(1+exp(x[7]))+ ey = exp((yop%*%con1)/rho)+ ed = exp((dan%*%con2)/rho)+ eh = exp((hil%*%con3)/rho)+ ew = exp((wt%*%con4)/rho)+ ev = ey+ed+eh+ew+ den=(ey+ed+eh+ew)+ iv = rho*log(den)+ pp=exp(x[4]+iv)/(1+exp(x[4]+iv))+ pr1 =pp* ey/den+ pr2 =pp* ed/den+ pr3 =pp* eh/den+ pr4 =pp* ew/den+ pnp=1/(1+exp(x[4]+iv))+ likelihood = (pnp*yogurt[,1])+(pr1*yogurt[,2])+(pr2*yogurt[,3])+(pr3*yogurt[,4])+(pr4*yogurt[,4])+ lsum = log(likelihood)+ return(-colSums(lsum))+ }> p = optim(c(0,0,0,0,0.1,-2,-0.2),fr, hessian = TRUE, method = "BFGS&qu...
2009 Mar 02
1
initial gradient and vmmin not finite
...,x[6]) con3 = rbind(x[3],x[5],x[6]) con4 = rbind(x[5],x[6]) rho = exp(x[7])/(1+exp(x[7])) ey = exp((yop%*%con1)/rho) ed = exp((dan%*%con2)/rho) eh = exp((hil%*%con3)/rho) ew = exp((wt%*%con4)/rho) ev = ey+ed+eh+ew den=(ey+ed+eh+ew) iv = rho*log(den) pp=exp(x[4]+iv)/(1+exp(x[4]+iv)) pr1 =pp*(ey/den) pr2 =pp*(ed/den) pr3 =pp*(eh/den) pr4 =pp*(ew/den) pnp=1/(1+exp(x[4]+iv)) likelihood = (pnp*yogurt[,1])+(pr1*yogurt[,2])+(pr2*yogurt[,3])+(pr3*yogurt[,4])+(pr4*yogurt[,4]) lsum = log(likelihood) return(colSums(lsum)) } p = summary(maxLik(fr,start=c(0,0,0,1,0,-25,-0.2))) p __________________________...
2004 Nov 04
1
3.0.8pre2 and tdbackup
...cords Thu Nov 4 21:46:12 CET 2004 /var/lock/samba/printing/eisfax.tdb.samba.bak /var/lock/samba/printing/eisfax.tdb : 5 records Thu Nov 4 21:46:16 CET 2004 /var/lock/samba/printing/pdf.tdb.samba.bak /var/lock/samba/printing/pdf.tdb : 7 records Thu Nov 4 21:46:21 CET 2004 /var/lock/samba/printing/pr2.tdb.samba.bak /var/lock/samba/printing/pr2.tdb : 7 records Thu Nov 4 21:46:25 CET 2004 /var/lock/samba/printing/pr3.tdb.samba.bak /var/lock/samba/printing/pr3.tdb : 1 records Thu Nov 4 21:46:29 CET 2004 /var/lock/samba/printing/repr1.tdb.samba.bak /var/lock/samba/printing/repr1.tdb : 1 records Th...
2011 Apr 09
1
loop and sapply problem, help need
Dear R experts Sorry for this question M1 <- 1:10 lcd1 <- c(11, 22, 33, 44, 11, 22, 33, 33, 22, 11) lcd2 <- c(22, 11, 44, 11, 33, 11, 22, 22, 11, 22) lcd3 <- c(12, 12, 34, 14, 13, 12, 23, 23, 12, 12) #generating variables through sampling pvec <- c("PR1", "PR2", "PR3", "PR4", "PR5", "PR6", "PR7", "PR8", "PR9", "PR10") fun11 <- function(x){ smpool <- c(1,2,3,3) x <- sample(smpool, 10, replace= TRUE) } newd <- sapply (pvec, fun11) # function to reco...
2005 Feb 07
2
logit link + alternatives
...link function (probit logit, loglog etc.) in lm with an abitrary user-defined function? The task is to perform ML Estimation of betas for a dichotome target variable. Maybe there is already a package for this (I did not find one). Any hints or a code excerpt would be welcome! Thank you -Jeff jeff.pr2 (at) added-insight (dot) net
2010 Sep 15
1
optim with BFGS--what may lead to this, a strange thing happened
...the parameter matrix used in following part vbar2<-matrix(0,n,nt) vbar3<-matrix(0,n,nt) v8 <-matrix(0,n,nt) regw<-matrix(0,n,nt) wden<-matrix(0,n,nt) lia<-matrix(0,n,nt) ccl<-matrix(1,n,ns) eta<-c(0,0) # setup the parts for loglikelihood q1<-exp(par[1]) pr1<-q1/(1+q1) pr2<-1-pr1 eta[2]<-par[2] a<-par[3:6] b<-par[7:11] w<-par[12:npar] for(m in 1:ns){ regw<-exp(w[1]+w[2]*eta[m])*actr+exp(w[3]+ w[4]*eta[m])*acwrk vbar2=a[1]+ eta[m]+regw*a[2]+acwrk*a[3]+actr*a[4] vbar3=b[1]+b[2]*eta[m]+regw*b[3]+acwrk*b[4]+actr*b[5] v8=1+...
2012 Jul 17
2
Problem creation tensor
...UserItem[,j] =factor(UserItem[,j],levels=1:5) } occ=factor(c(rep(1,dim(M1)[1]),rep(2,dim(M2)[1]), ...,rep(21,dim(M21)[1])),levels=1:21) Z <- array(rep(0,m*21*5),c(m,21,5), list(paste("item",1:m,sep=""),paste("Occ",1:21,sep=""),c("pr1","pr2","pr3","pr4","pr5"))) for ( i in 1:m){ as.matrix(table(occ, UserItem[,2])) Z[i,,]=table(occ, UserItem[,i]) } Z.CAND <- CANPARA(Z,dim=7) I have implemented this code but I have one error in correspondance of: for ( i in 1:m){ Z[i,,]=table(occ,Us...
2010 Sep 07
5
question on "optim"
...the parameter matrix used in following part vbar2<-matrix(0,n,nt) vbar3<-matrix(0,n,nt) v8 <-matrix(0,n,nt) regw<-matrix(0,n,nt) wden<-matrix(0,n,nt) lia<-matrix(0,n,nt) ccl<-matrix(1,n,ns) eta<-c(0,0) # setup the parts for loglikelihood q1<-exp(par[1]) pr1<-q1/(1+q1) pr2<-1-pr1 eta[2]<-par[2] a<-par[3:6] b<-par[7:11] w<-par[12:npar] for(m in 1:ns){ ?for(i in 1:nt){ ?? regw[,i]<-w[1]+ w[2]*eta[m]+exp(w[3]+w[4]*eta[m])*actr[,i]+w[5]*acwrk[,i] ??? vbar2[,i]=a[1]+???? eta[m]+regw[,i]*a[2]+acwrk[,i]*a[3]+actr[,i]*a[4] ??? vbar3[,i]=b[1]+b[2]*eta[m]+r...
2007 Apr 25
1
Symbolic links on Mac OSX
...5 Apr 26 00:02 softfile1@ -> file1 ../folder2: total 16 -rw-r----- 1 alan alan 12 Apr 26 00:00 file1 lrwxrwxrwx 1 alan alan 5 Apr 26 00:03 softfile1@ -> file1 The symbolic link has a new creation time and different permissions. I am using rsync version 3.0.0cvs protocol version 30.PR2 The Apple rsync version 2.6.3 protocol version 28 gives the same result. Is this a MacOSX quirk that I don't need to worry about.
2017 Jun 02
1
modEvA D-squared for gamma glm
...and few predictors). I want to calculate r-squared for this model. I have been reading online about it and found there are multiple formulas for calculating R2 (psuedo) for glm (in R) with gaussian (r2 from linear model), logistic regression (1-deviance/null deviance), poisson distribution (using pR2 in pscl package, D-squared value from modEvA R package). But I could not find anything specific to gamma distributions. Can pscl and modEVA packages be used for gamma distributions as well? or there is any other formula for doing the same? Thanks Regards, Anchal -- Anchal Sharma, PhD Postdoct...
2011 Apr 11
1
pseudo-R by hand
hello dear list! since we want to do a model analysis and some people would like to see pseudo-R^2 values for different types of glm of a logistic regression, i've decided to write a function that computes either nagelkerkes normed pseudo-R or cox & snells pseudo-R. however, i am not clear as in the decisive step, i need to calculate the log of (maximum likelihood estimates of model