search for: p1

Displaying 20 results from an estimated 2400 matches for "p1".

Did you mean: sp1
2012 Oct 05
2
problem with convergence in mle2/optim function
Hello R Help, I am trying solve an MLE convergence problem: I would like to estimate four parameters, p1, p2, mu1, mu2, which relate to the probabilities, P1, P2, P3, of a multinomial (trinomial) distribution. I am using the mle2() function and feeding it a time series dataset composed of four columns: time point, number of successes in category 1, number of successes in category 2, and number of...
2012 Sep 27
0
problems with mle2 convergence and with writing gradient function
Dear R help, I am trying solve an MLE convergence problem: I would like to estimate four parameters, p1, p2, mu1, mu2, which relate to the probabilities, P1, P2, P3, of a multinomial (trinomial) distribution. I am using the mle2() function and feeding it a time series dataset composed of four columns: time point, number of successes in category 1, number of successes in category 2, and number of...
2011 Sep 11
3
(no subject)
Dear all, Can anyone take a look at my program below? There are two functions: f1 (lambda,z,p1) and f2(p1,cl, cu). I fixed p1=0.15 for both functions. For any fixed value of lambda (between 0.01 and 0.99), I solve f1(p1=0.15, lambda=lambda, z)=0 for the corresponding cl and cu values. Then I plug the calculated cl and cu back into the function f2. Eventually, I want to find the lambda value...
2012 Oct 11
2
model selection with spg and AIC (or, convert list to fitted model object)
..., 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L)), .Names = c("tv", "n1", "n2", "n3"), row.names = c(NA, -20L), class = "data.frame") # Negative log likelihood functions NLL1 <- function(par, y){ p1 <- par[1] p2 <- par[2] mu1 <- par[3] mu2 <- par[4] n1 <- y$n1 n2 <- y$n2 n3 <- y$n3 t <- y$tv P1 <- (p1*((-1 + exp(sqrt((mu1 + mu2 + p1 + p2)^2 - 4*(mu2*p1 + mu1*(mu2 + p2)))*t))*((-mu2)*(mu2 - p1 + p2) + mu1*(mu2 + 2*p2)) - mu2*sqrt((mu1...
2010 Sep 27
2
subtraction based on two groups in a dataframe
Hello I have a data set like below: plate.id well.id Group HYB rlt1 1 P1 A1 Control SKOV3hyb 0.190 2 P1 A2 Control SKOV3hyb 0.210 3 P1 A3 Control SKOV3hyb 0.205 4 P1 A4 Control SKOV3hyb 0.206 5 P1 A5 Control SKOV3hyb 0.184 385 P1 A1 ovca SKOV3hyb 0.184 386 P1 A2 ovca SKOV3hyb 0.229 387...
2004 Aug 26
1
Why terms are dropping out of an lm() model
...39;m fairly new to R and not too experienced with regression. Because of one or both of those traits, I'm not seeing why some terms are being dropped from my model when doing a regression using lm(). I am trying to do a regression on some experimental data d, which has two numeric predictors, p1 and p2, and one numeric response, r. The aim is to compare polynomial models in p1 and p2 up to third order. I don't understand why lm() doesn't return coefficients for the p1^3 and p2^3 terms. Similar loss of terms happened when I tried orthonormal polynomials to third order. I'm s...
2017 Apr 11
5
Potential issue with noalias @malloc and @realloc
Hi all, I think I've spotted a semantic issue with marking @malloc and @realloc as noalias.  Say we have the program: int f() {   int* p0 = malloc(size of(int));   free(p0);   int* p1 = malloc(sizeof(int));   if (!p1) return 20;   int value = 0;   for (int i = 0; i < 1; i++) {     *p1 = 20;     value = *p1;     if (false)  // "false" is obscured in a way the compiler can't fathom       if (p0 == p1)         a();       else         b();   }   return result; } Th...
2004 Jul 16
3
still problems with predict!
Hi all, I still have problems with the predict function by setting up the values on which I want to predict ie: original df: p1 (193 obs) variates y x1 x2 rm(list=ls()) x1<-rnorm(193) x2<-runif(193,-5,5) y<-rnorm(193)+x1+x2 p1<-as.data.frame(cbind(y,x1,x2)) p1 y x1 x2 1 -0.6056448 -0.1113607 -0.5859728 2 -4.2841793 -1.0432688 -3.3116807 ...... 192 -1.3228239 1.0263013 -2.780132...
2019 May 06
2
RegAlloc Q: spill when implicit-def physreg is also the output reg of instruction
...tended (always spilling live regs across implicit-def inst?), I am puzzled on how to use MyInst that has variable output reg with static implicit-defs. Any tips would be greatly appreciated. Reduced Example: _*Before RegAlloc:*_ %1:reg = COPY ...; %2:reg = MyInst %1:reg, ..., implicit-def dead $p1, ...; %3:reg = Use %2:reg _*RegAlloc:*_ >> %2:reg = MyInst %1:reg, ..., implicit-def dead $p1, ...; Regs: $p1=%1 Killing last use: %1:reg Assigning %2 to $p1 Spilling %2 in $p1 to stack slot #2  <-- suspicious if this is inserting spill, unaware of output reg being same << $p1 =My...
2007 Jul 03
3
generating correlated Bernoulli random variables
Hi all, I was wondering how to generate samples for two RVs X1 and X2. X1 ~ Bernoulli (p1) X2 ~ Bernoulli (p2) Also, X1 and X2 are correlated with correlation \rho. Regards, Vineet [[alternative HTML version deleted]]
2007 Jun 18
4
triangle contour plots
Suppose I have three numbers p1, p2, p3 with 0 <= p1,p2,p3 <= 1 and p1+p2+p3=1, and a function f=f(p1,p2,p3) = f(p1,p2,1-p1-p2). How to draw a contour plot of f() on the p1+p2+p3=1 plane, that is, an equilateral triangle? Functions triplot(), triangle.plot(), and ternaryplot() give only scatterplots, AFAICS -...
2011 Sep 28
0
Problems using the 'HPloglik' function in the SDE package
...nsform <- function(t,x,theta) (1/(theta[5]*(theta[6]-1)))*(x^(1-theta[6])) ## define the diffusion function S <- function(t,x,theta) theta[5]*(x^theta[6]) ## define the transformed drift function and it's first six derivatives m0 <- function(t,x,theta) { b <- theta[5]*(theta[6]-1) p1 <- (theta[6]+1)/(theta[6]-1) p2 <- theta[6]/(theta[6]-1) p3 <- (2-theta[6])/(1-theta[6]) (-1/theta[5])*(theta[1]*((b*x)^p1) - theta[2]*((b*x)^p2) + theta[3]*b*x - theta[4]*((b*x)^p3) - 0.5*theta[6]*(theta[5]^2)*((b*x)^(-1))) } m1 <- function(t,x,theta) { b <- theta[5]*(theta[6]-1) p1...
2011 Dec 14
1
uniroot function question
...ation, two unknowns, so I am trying to build the solution set by running through possible values for one unknown, and then using uniroot to solve for the accompanying second solution, then graphing the two vectors. p0 = .36 f = function(x) 0.29 * exp(5.66*(x - p0)) f.integral = integrate(f, p0, 1) p1 = p0 + .01 i = 1 n = (1 - p0)/.01 p1.vector = rep(0,n) p2.vector = rep(0,n) for (i in 1:n) { p1.vector[i] = p1 fcn = function(p2) p1*f(p1) + (.20/5.66)*(exp(5.66*(p2 - p0)) - exp(5.66*(p1 - p0))) + (1 - p2)*f(p2) - as.numeric(f.integral$value) sol = uniroot(try, lower = p1, upper = 1) p2.vector...
2009 Mar 30
3
Calculating First Occurance by a factor
...hat without using a for loop. For the amount of data I (will) have, the for loop will probably be too slow. I tried searching around before posting and couldn't find anything, hopefully it's not embarrassingly easy. Consider the data.frame, Data, below Data Sub Tr IA FixInx FixTime p1 t1 1 1 200 p1 t1 2 2 350 p1 t1 2 3 500 p1 t1 3 4 600 p1 t1 3 5 700 p1 t1 4 6 850 p1 t1 3 7 1200 p1 t1 5 8 1350 p1 t1 5 9 1500 What I'm trying to do is for each unique IA get the...
2011 Feb 21
1
question about solving equation using bisection method
Hi all, I have the following two function f1 and f2. f1 <- function(lambda,z,p1){ lambda*(p1*exp(-3*z-9/2)+(0.2-p1)*exp(4*z-8))-(1-lambda)*0.8} f2 <- function(p1,cl, cu){ 0.8*(pnorm(cl)+(1-pnorm(cu)))/(0.8*(pnorm(cl)+(1-pnorm(cu)))+p1*(pnorm(cl+3)+(1-pnorm(cu+3)))+(0.2-p1)*(pnorm(cl-4)+(1-pnorm(cu-4))))}-0.05 First fix p1 to be 0.15. (i) choose a lambda value, say lamda=...
2019 May 07
2
RegAlloc Q: spill when implicit-def physreg is also the output reg of instruction
..., I am puzzled on how to use MyInst that has variable output >> reg with static implicit-defs. Any tips would be greatly appreciated. >> >> Reduced Example: >> >> _*Before RegAlloc:*_ >> %1:reg = COPY ...; >> %2:reg = MyInst %1:reg, ..., implicit-def dead $p1, ...; >> %3:reg = Use %2:reg >> >> _*RegAlloc:*_ >> >> %2:reg = MyInst %1:reg, ..., implicit-def dead $p1, ...; >> Regs: $p1=%1 >> Killing last use: %1:reg >> Assigning %2 to $p1 >> Spilling %2 in $p1 to stack slot #2  <-- suspicious if this...
2008 Jul 08
1
CESA-2008:0533 Important CentOS 5 x86_64 bind Update
...entOS Errata and Security Advisory 2008:0533 Important Upstream details at : https://rhn.redhat.com/errata/RHSA-2008-0533.html The following updated files have been uploaded and are currently syncing to the mirrors: ( md5sum Filename ) x86_64: c2c6d8ced889948d7a52fbbb577ec2ff bind-9.3.4-6.0.1.P1.el5_2.x86_64.rpm 0c66970cb9b1b46e7f8210c638134ba7 bind-chroot-9.3.4-6.0.1.P1.el5_2.x86_64.rpm 1a7ac4ce354fcec092883a9576b36df6 bind-devel-9.3.4-6.0.1.P1.el5_2.i386.rpm 8c583619590d9ed1eadb4eb051596b2e bind-devel-9.3.4-6.0.1.P1.el5_2.x86_64.rpm 3619ebd7db64aca5233f8f8ee5257ad3 bind-libbind-devel...
2009 Jul 29
1
CESA-2009:1179 Important CentOS 5 x86_64 bind Update
CentOS Errata and Security Advisory 2009:1179 Important Upstream details at : https://rhn.redhat.com/errata/RHSA-2009-1179.html The following updated files have been uploaded and are currently syncing to the mirrors: ( md5sum Filename ) x86_64: 0f252bb2790ca6c3409c6d1077dbde2a bind-9.3.4-10.P1.el5_3.2.x86_64.rpm 9c2df4609ef325b9fe235c7cb2646657 bind-chroot-9.3.4-10.P1.el5_3.2.x86_64.rpm 8dad85ffd4d49f17f3b64d39aa507008 bind-devel-9.3.4-10.P1.el5_3.2.i386.rpm 237263f6603c3f6b36907a8e25a72cea bind-devel-9.3.4-10.P1.el5_3.2.x86_64.rpm bf274a3956104fde2f50d2dd44cfc670 bind-libbind-devel-...
2005 Sep 27
1
Simulate phi-coefficient (correlation between dichotomous vars)
...for > example the mvrnorm function in MASS), but am stumped when dealing with > dichotomous variables. > > Paul One way is to sample from the 2x2 table with the specified means and pearson correlation (phi): for a fourfold table, a b c d with marginal proportions p1 and p2 cov <- phi * sqrt(p1*(1-p1)*p2*(1-p2)) a <- p1*p2 + cov b <- p1*(1-p2) - cov c <- (1-p1)*p2 - cov d <- (1-p1)*(1-p2) + cov expand.grid(0:1,0:1)[sample(1:4, size=25, replace=TRUE, prob=c(a,b,c,d)),] David. | David Duffy (MBBS PhD) ,-_|\...
2023 Mar 13
1
str_replace por orden de aparición en una cadena.
Hola, Tengo una variable string que tiene muchos casos, pero necesito en cada uno de ellos reemplazar el último "==" por "=". asi está asi necesito si p1 == 1 o 2 == 1,3 si p1 == 1 o 2 = 1,3 si p1 == 3 o 4 == 1 si p1 == 3 o 4 = 1 si p1 == 5 == 0,7 si p1 == 5 = 0,7 si p1 == 5 = 0,7 si p1 == 5 = 0,7 si p1 == 6 == 0 si p1 == 6 = 0 si p1 == 7 == no aplica si p1 == 7 = no aplica Muchas gracias!! Juan. [[alternative HTML version deleted]]