search for: pr1

Displaying 20 results from an estimated 36 matches for "pr1".

Did you mean: pr
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,
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) #...
2011 Jun 10
2
Plotting NLS profiles
...t variables. Specifically, I'd like to be able to change the x-axis title and the colors to black and white. Has anyone had any luck with this? If not, is there a way to override to plotting colors, perhaps in par()? Thanks, Sam fm1 <- nls(demand ~ SSasympOrig(Time, A, lrc), data = BOD) pr1 <- profile(fm1, alpha = 0.05) opar <- par(mfrow = c(2,2), oma = c(1.1, 0, 1.1, 0), las = 1) plot(pr1, conf = c(95, 90, 80, 50)/100) # works fine plot(pr1, conf = c(95, 90, 80, 50)/100,xlab=expression(theta),col=1) # doesn't change
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...
2004 Nov 01
1
plot time series / dates (basic)
...', header = T, sep = ",", quote="", 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-p...
2002 Nov 23
0
2.2.7 and printer status
...mand = /usr/bin/lpq -P%p -L lpq cache time = 4 lprm command = /usr/bin/lprm -P%p %j lppause command = /usr/sbin/lpc hold %p %j lpresume command = /usr/sbin/lpc release %p %j queuepause command = /usr/sbin/lpc stop %p queueresume command = /usr/sbin/lpc start %p Printer Share: [pr1] comment = local printer pr1 on %h browseable = yes printable = yes public = yes create mode = 0700 path = /tmp Relevant Information for printing in printcap: pr1: :done_jobs=0 :rw :sh :lp=/dev/lp0 :sd=/var/spool/lpd/pr1 :fx=flp...
2009 Jan 28
3
initial value in 'vmmin' is not finite
...2],x[5],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 = optim(c(0,0,0,0,0.1,-2,-0.2),fr, hessian = TRUE, metho...
2010 Sep 15
1
optim with BFGS--what may lead to this, a strange thing happened
...data) { # define 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]+ac...
2010 Sep 07
5
question on "optim"
...data) { # define 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]=...
2009 Mar 02
1
initial gradient and vmmin not finite
...= rbind(x[2],x[5],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 _________...
2005 Jun 10
1
problem with polr ?
...1.3 14 a 1.3 4 m 1.4 15 f 1.4 12 a 1.4 3 However, after having performed the analysis, it appears this is not correct as the 3 outputs per experiment are not linked... library(MASS) dt.plr <- polr(output ~ factor, data=dt, weights=n) > dt.pr1<-predict(dt.plr, , type="probs") > dt.pr1 a f m 1 0.09987167 0.4578184 0.4423099 2 0.09987167 0.4578184 0.4423099 3 0.09987167 0.4578184 0.4423099 4 0.09437078 0.4477902 0.4578390 5 0.09437078 0.4477902 0.4578390 6 0.09437078 0.4477902 0.4578390 7 0.0891...
2011 Sep 03
2
ROCR package question for evaluating two regression models
...t, family = binomial(link=logit))  and I would like to compare these two models based on the prediction that I get from each model: pred1 = predict(model1, test.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=&q...
2002 Feb 11
0
profile
...t) <- c('gN', 'MnmN', 'OptN', 'DIs', 'beta', 'eta1', 'eta2') simparj.fm <- nls(Y.simulated ~ Y.model(gN, MnmN, OptN, DIs, beta, eta1, eta2, Popn, Dmax, AWC, SumEp, PotYield3, Nsupply), start = simparj.st, trace =T) pr1<-profile(simparj.fm) # define a new profile function pr2<- function (fitted, which = 1:npar, maxpts = 100, alphamax = 0.01, delta.t = cutoff/5) { f.summary <- summary(fitted) std.err <- f.summary$parameters[, "Std. Error"] npar <- length(std.err) n...
2003 Nov 26
1
Samba and W2K printer issues
...;wins service = yes wins support = Yes path = /smb/Delorme local master = yes [joec] comment = Personal network share path = /smb/joec read only = No [peggyc] comment = Personal network share path = /smb/peggyc read only = No [pr1] printable = yes printcap name = /etc/printcap print command = /usr/bin/lpr -P%p -r %s ;printer driver = dj1 printer = dj1 printing = BSD path = /var/tmp valid users = joec peggyc root administrator min print space = 2000 I ca...
2012 Jul 17
2
Problem creation tensor
...for (j in 1:m){ 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...
2009 Aug 05
1
Decision boundaries for lda function?
Hi, I am using the lda function from the MASS library. I would to find the decision boundaries of each class and subsequently plot them. I wonder if anybody can offer any help on this topic? Below I applied the lda function on a small dataset of mine. Any help will be much appreciated. > library(MASS) >
2020 Jan 30
2
[cfe-dev] RFC: Switching from Bugzilla to Github Issues
> Will you be able to start numbering in github at a number larger than the largest bug in bugzilla? It would be annoying to have overlapping bug numbers. Bug numbers exist in code comments, list archives, etc., etc. If someone reads 'clang bug #1234' somewhere it will be ambiguous, which would be a real shame. This won't work in general, unfortunately as there are already a
2004 Mar 18
1
profile error on an nls object
...Signif. codes: 0 `***' 0.001 `**' 0.01 `*' 0.05 `.' 0.1 ` ' 1 Residual standard error: 0.1542 on 66 degrees of freedom Correlation of Parameter Estimates: theta1 theta2 theta3 theta2 -0.02168 theta3 -0.02029 0.997736 theta4 -0.97182 -0.008054 -0.008952 > pr1 <- profile(hyp.res) 1.825584 : 0.3894059947 -4.8975821760 0.0004141343 1.58426 : 0.373691474 -4.909091289 0.000824045 1.583673 : 0.4176596873 -4.8774106487 0.0008176545 1.583670 : 0.4196944963 -4.8760375504 0.0008187918 1.583670 : 0.4199010211 -4.8758854269 0.0008188162 1.624899 :...
2005 Jun 14
2
Logistic regression with more than two choices
Dear all R-users, I am a new user of R and I am trying to build a discrete choice model (with more than two alternatives A, B, C and D) using logistic regression. I have data that describes the observed choice probabilities and some background information. An example below describes the data: Sex Age pr(A) pr(B) pr(C) pr(D) ... 1 11 0.5 0.5 0 0 1 40 1 0 0 0 0 34 0 0 0 1 0 64 0.1 0.5 0.2 0.2 ...
2003 May 05
3
polr in MASS
...Error t value Low|Medium -0.4961 0.1248 -3.9740 Medium|High 0.6907 0.1255 5.5049 Residual Deviance: 3479.149 AIC: 3495.149 I also tried to predict the probabilities of the 3 categories of "Sat" using the predict function: > hnames<-lapply(housing[,-5],levels) > house.pr1<-predict(house.plr,expand.grid(hnames[-1]),type="probs")> cbind(expand.grid(hnames[-1]),round(house.pr1,2)) Infl Type Cont Low Medium High 1 Low Tower Low 0.38 0.29 0.33 2 Medium Tower Low 0.26 0.27 0.47 3 High Tower Low 0.14 0.21 0.65 4 L...