search for: p2

Displaying 20 results from an estimated 3257 matches for "p2".

Did you mean: 2p
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 suc...
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 suc...
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)), .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 + mu2 + p1 + p2)^2...
2004 Aug 26
1
Why terms are dropping out of an lm() model
...irly 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 satisfie...
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]]
2011 Sep 28
0
Problems using the 'HPloglik' function in the SDE package
.../(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 <- (theta[6]+1)/(theta[6]-1) p2...
2000 Jan 06
1
nlme
Among others, datam contains the columns: logconc, tm, dose, subj, bilirubin. None of these are factor variables. The following compartment models work (the first still has not converged after 100 interations): res1 <- nlme(logconc~p2+p3+log(dose/(exp(p1)-exp(p2))* (exp(-exp(p2)*tm)-exp(-exp(p1)*tm))),start=list(fixed=c(5,-2,-0.1)), fixed=list(p1+p2+p3~1),control=list(maxIter=100), groups=~subj,data=datam,verbose=T,method="ML") res2 <- nlme(logconc~p2+p3+log(dose/(exp(p1)-exp(p2))* (exp(-exp(p2)*tm)-exp(-exp(p1...
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 -- Ro...
2020 May 21
0
CEBA-2020:2086 CentOS 7 bind BugFix Update
...fix Advisory 2020:2086 Upstream details at : https://access.redhat.com/errata/RHBA-2020:2086 The following updated files have been uploaded and are currently syncing to the mirrors: ( sha256sum Filename ) x86_64: 33ec13f338452b9770a8d2b63f45df42d3a7a09f9e4a46e76e88c56081ba2e06 bind-9.11.4-16.P2.el7_8.3.x86_64.rpm fe1ef1647e094ac4463fee7f23ff367fe52a9b853a6c17813ef95a05516e72ee bind-chroot-9.11.4-16.P2.el7_8.3.x86_64.rpm 996a9b6a27e6a0012a6134837011ead4cd93927e9948e12d8608fdb8f7e77bd3 bind-devel-9.11.4-16.P2.el7_8.3.i686.rpm d96961f57a5c63dbe7757b21ca5f43ecec43d2fc781e5d4fda03a265de81235...
2020 Jun 01
0
CESA-2020:2344 Important CentOS 7 bind Security Update
...ory 2020:2344 Important Upstream details at : https://access.redhat.com/errata/RHSA-2020:2344 The following updated files have been uploaded and are currently syncing to the mirrors: ( sha256sum Filename ) x86_64: 7d441e8126dd927899c78af78ffd1f1e460afef943e27596cacb4fd917cdf708 bind-9.11.4-16.P2.el7_8.6.x86_64.rpm b2636b99596138a3eb6f29f55d40506dbb8f9c8d98bafea6eae1dad0220ee26c bind-chroot-9.11.4-16.P2.el7_8.6.x86_64.rpm b6684c4a2a9341e877cf1766d21d75f47af5dede5138c5eeccc8814aab9e7b6d bind-devel-9.11.4-16.P2.el7_8.6.i686.rpm 7426c0203ca23e864c4e4de8164d583a68bc03dc721e44362670eb32eaa431b...
2020 Nov 18
0
CESA-2020:5011 Moderate CentOS 7 bind Security Update
...sory 2020:5011 Moderate Upstream details at : https://access.redhat.com/errata/RHSA-2020:5011 The following updated files have been uploaded and are currently syncing to the mirrors: ( sha256sum Filename ) x86_64: 10a06eabffcd2d73d1de3fa1821108cbfe10fb4977603c9f495854984a91542b bind-9.11.4-26.P2.el7_9.2.x86_64.rpm 3f9569f5e76f2c85ea0b8843abaa2fe4d295bef235b8e3c6c65588c40bfbaad2 bind-chroot-9.11.4-26.P2.el7_9.2.x86_64.rpm f82ec6b5a321f21916898763958f2f66aa27af989f717611ee77da7475cd01db bind-devel-9.11.4-26.P2.el7_9.2.i686.rpm 5171be56dca06ca1e7da429b0b918c643f00522f432cfaa4d67aeea0ee79630...
2011 Mar 29
4
Creating 3 vectors that sum to 1
I have 3 vectors: p1, p2, and p3. I would like each vector to be any possible value between 0 and 1 and p1 + p2 + p3 = 1. I want to graph these and I've thought about using scatterplot3d(). Here's what I have so far. library(scatterplot3d) p1 <- c(1,0,0,.5,.5,0,.5,.25,.25,.34,.33,.33,.8,.1,.1,.9,.05,.05) p2 &lt...
2011 Dec 14
1
uniroot function question
...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[i] = p2 i = i+1 p1 = p1 + .01 } plot(p1.vector,p2.vecto...
2005 Sep 27
1
Simulate phi-coefficient (correlation between dichotomous vars)
...; 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) ,-_|\ | emai...
2010 Oct 01
1
add a new column to data frame
Hi, I am wondering if anyone can propose a simple/best way to do the following: Let's say I have a data frame dat <- cbind(expand.grid(mode=c('right','left'),time=0:3,id=c('p1','p2','p3')),y=c(3,5,rep(4,6),6,2,rep(3,6),4,4,rep(2,6))) dat mode time id y 1 right 0 p1 3 2 left 0 p1 5 3 right 1 p1 4 4 left 1 p1 4 5 right 2 p1 4 6 left 2 p1 4 7 right 0 p2 6 8 left 0 p2 2 9 right 1 p2 3 10 left 1 p2 3 11 right 2 p2 3...
2007 Jan 26
1
Bayesian inference: Poisson distribution with normal (!) prior
...ter the first observed period. My question is now, how to get the randoms for the n following periods? Thanks a lot for your hints! Maybe there is an easier way to do the necessary calculations...? Carsten # Function 1: Posterior for the first observation test.posterior=function(x,observation,p1,p2) { f1=function(x,observation,p1,p2) dpois(observation,qnorm(pnorm(x,p1,p2),p1,p2))*dnorm(x,p1,p2) integral=integrate(f1,0,Inf,p1=p1,p2=p2,observation=observation)$value ausgabe=f1(x,observation,p1=p1,p2=p2)/integral return(ausgabe) } # Function 2: Random numbers for Lambda in the second period tes...
2012 Feb 13
3
Change dataframe-structure
Ein eingebundener Text mit undefiniertem Zeichensatz wurde abgetrennt. Name: nicht verf?gbar URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20120213/d2a5afa6/attachment.pl>
2010 Jun 13
1
Pairwise cross correlation from data set
...ld like to reorder a dataset and compute pairwise correlations. But I'm having some real problems getting this done. My data looks something like: Participant Stimulus Measurement p1 s`1 5 p1 s`2 6.1 p1 s`3 7 p2 s`1 4.8 p2 s`2 6 p2 s`3 6.5 p3 s`1 4 p3 s`2 7 p3 s`3 6 As a first step I would imagine that I have to rearrange my data into a fram...
2020 Feb 27
2
TBAA for struct fields
[AMD Official Use Only - Internal Distribution Only] Hi, Following issue is observed with Type Based Alias Analysis(TBAA). ####################################################### struct P { float f1; float f2; float f3[3]; float f4; }; void foo(struct P* p1, struct P* p2) { p1->f2 = 1.2; p2->f1 = 3.7; } int callFoo() { struct P p; foo(&p, &(p.f2)); } ###################################################### Printing alias-sets using commands: clang -O1 -S -emit-llvm struct_tbaa.c opt -basicaa -tbaa -print-alias-sets -disable-output struct_...
2006 Jul 14
1
Optim()
Dear all, I have two functions (f1, f2) and 4 unknown parameters (p1, p2, p3, p4). Both f1 and f2 are functions of p1, p2, and p3, denoted by f1(p1, p2, p3) and f2(p1,p2,p3) respectively. The goal is to maximize f1(p1, p2, p3) subject to two constraints: (1) c = k1*p4/(k1*p4+(1-k1)*f1(p1,p2,p3)), where c and k1 are some known constants (2) p4 = f2(p1, p2, p3) In...