search for: pk2

Displaying 14 results from an estimated 14 matches for "pk2".

Did you mean: p2
2023 Nov 06
2
non-linear regression and root finding
...otal HEPES concentration I can calculate accurately the pH if I know 3 pK values for HEPES by finding the single root with uniroot Now, the problem is that there is some disagreement in the literature what is the correct value for the 3 pKs. I know the 3 pK values have the relationship pK1 < pK2 <- pK3 and for the most common formulation of HEPES I know the charge on fully protonated species is 2. Hence I can generate a huge number of pK values from uniform distribution by taking sort(runif(3,-1,9) and make sure there are no ties and then run all those triplets of pK values to find...
2023 Nov 06
2
non-linear regression and root finding
Thanks a lot! This was amazing. I'm not sure I see how the conditiion pK1 < pK2 < pK3 is enforced? - it comes from the derivation via generalized Henderson-Hasselbalch but perhaps it is not really necessary. Anyway, the use of Vectorize did the trick! Best wishes Troels Den 06-11-2023 kl. 19:19 skrev Ivan Krylov: > ? Mon, 6 Nov 2023 17:53:49 +0100 > Troels Ring &l...
2023 Nov 06
1
non-linear regression and root finding
...FUNC which delivers charge in the > fluid for known pKs, HEPTOT and SID. Is it possible to have > root-finding in the formula with nls? Sure. Just reformulate the problem in terms of a function that takes a vector of predictors (your independent variable SID) and the desired parameters (pK1, pK2, pK3) as separate arguments and then returns predicted values of the dependent variable (to compare against pHobs): kw <- 1e-14 # I'm assuming pHm <- Vectorize(function(SID, pK1, pK2, pK3) -log10(uniroot(HEPESFUNC,c(1e-20,1),tol=1e-20,maxiter=1e4, HEPTOT=HEPTOT,SID = SID, pK1=pK...
2023 Nov 06
1
non-linear regression and root finding
...meters from below. Note that nls() can only handle bounds in the "port" algorithm, and the man page rather pours cold water on using that algorithm. Best, JN On 2023-11-06 14:43, Troels Ring wrote: > Thanks a lot! This was amazing. I'm not sure I see how the conditiion pK1 < pK2 < pK3 is enforced? - it comes from the > derivation via generalized Henderson-Hasselbalch but perhaps it is not really necessary. Anyway, the use of Vectorize > did the trick! > > Best wishes > Troels > > Den 06-11-2023 kl. 19:19 skrev Ivan Krylov: >> ? Mon, 6 Nov...
2023 Nov 07
1
non-linear regression and root finding
G'day Troels, On Mon, 6 Nov 2023 20:43:10 +0100 Troels Ring <tring at gvdnet.dk> wrote: > Thanks a lot! This was amazing. I'm not sure I see how the conditiion > pK1 < pK2 < pK3 is enforced? One way of enforcing such constraints (well, in finite computer arithemtic only "<=" can be enforced) is to rewrite the parameters as: pK1 = exp(theta1) ## only if pK1 > 0 pK2 = pK1 + exp(theta2) pK3 = pk2 + exp(theta3) And then use your optimiser to...
2023 Nov 07
1
non-linear regression and root finding
Thanks a lot, Berwin. Unfortunately, pK1 may well be negative and as I understand the literature it may be poorly defined as such, and also seems to be at a boundary, since when lower is set to say rep(-4,3) pK1 is returned as -4 while pK2 and pK3 are undisturbed. Perhaps the point is that pK1 is not carrying any information at the pH around 5. Fair enough, I guess. Only, I believe I need stick to including all three pK values to be in agreement with the molecular information about HEPES - although even this is contentious. Be as...
2011 Feb 17
0
S3/S4/NAMESPACE
In one package (pk1) I define some S3 generics and methods. In pk2 I extend the methods to some S4 objects following the description in ?Methods, with setMethod() and setGeneric() either explicit or implicit (tried both). I export the S3 generic and methods from pk1 NAMESPACE and the S4 from pk2. This works, except when I try to use a function defined in pk1, W...
2008 Oct 23
3
USB support
Hello Everybody! :D :D :D I changed from Windows to Ubuntu a short time ago. Under Win I programmed microcontrollers with Microchip PicKit2 programmer, which has USB connection. After I installed Ms .NET Framework 2.0 with winetricks, the Wine enablet do install PicKit2 program; it runs, but can not wiev / handle programmer, which I plug in to an USB port. Please help me. Have any USB
2011 Jul 27
2
fitting sine wave
...m number of Iterations? ? m<-c(-0.2061826,0.5888406,0.2026079,1.0000000,0.2342754,0.6865078,-0.1265754) x <- c(1,2,3,4,5,6,7) p <- nls(m~k1*x+k2*cos(x)+k3*sin(x)+k4*cos(2*x)+k5*sin(2*x)+k6*cos(3*x),start = list(k1=0,k2=0,k3=0.1,k4=0.1,k5=0,k6=0)) par ?<- c(pk1=summary(p)$parameters[1,1],pk2=summary(p)$parameters[2,1],pk3=summary(p)$parameters[3,1],pk4=summary(p)$parameters[4,1],pk5=summary(p)$parameters[5,1],pk6=summary(p)$parameters[6,1]) xx <- seq(1,7,length.out=500) mm <- par[1]*xx+par[2]*cos(xx)+par[3]*sin(xx)+par[4]*cos(2*xx)+par[5]*sin(2*xx)+par[6]*cos(3*xx) plot(x,m) poin...
2009 Nov 02
2
a prolem with constrOptim
...n = data[(1+4*(i-1)):(4*i)] p = theta[(1+3*(i-1)):(3*i)] P = 1-sum(p) S[(1+3*(i-1)):(3*i)] = n[1:3]/p-n[4]/P } S } #where theta=(p11,p12,p13,p21,p22,p23,...,pK1,pK2,pK3). #The function Rmat calculates the restriction matrix needed for constrained estimation Rmat = function(k) { R = matrix(1,4,3) R[1,2] = R[1,3] = R[2,3] = R[3,2] = 0 RR = cbind(-R,R) RRR = matrix(0,4*(k-1),3*k) fo...
2004 Aug 30
3
D'agostino test
Hi, Does anyone know if the D'agostino test is available with R ? Alex
2015 Nov 27
0
ldap paging
...Q49bHbzc4asD7r XlbwS7whkDKrJpflK39PLPw5BJoptKhwLNOueotFv9Pq8EYQBkN/gX69BzxeoFk8 DZpiP/ogYQIG1lUijes4UkbttVpnviy9/mLBKjIfIkvGDu0q3zwuq5876q6t2Qxx kJkpLSizxAfnGLeD03txVPAc8wGzxhxkyEdosQ+ARriYI1Ce+dfK28z6hSAEXMA+ 4JZEvIsy6P+xepFCFYILFWeRO2YBzqHtgtjKu8KCiyBdUPG0Nii4z2YmN2AoCj7m rQ8l4CeTDw+lk0pMy26kCsmh+PK2/OXCUGjxgYJOR3mxn2HNSIfUXFVWs4ri464= =qWS+ -----END PGP SIGNATURE-----
2009 May 01
1
how to disable auto-increment in primary key.
...ent for a primary key data type. The purpose of using primary_key data type is using different name for primary key. But we still want to use all the properties of "id" except for auto increment part. I had my migration as following #=============MIGRATION def self.up create_table :pk2s , :id=> false do |t| t.primary_key :uid t.string :name t.timestamps end end # ========== Model class Pk2 < ActiveRecord::Base set_primary_key "uid" end --vipin
2007 Aug 23
6
Saving ActiveRecord in PostgreSQL without id
I have a small table that is used to temporarily queue requests, as such it does not have an id field (or any other primary key), because it doesn''t make sense to have one. When I created an ActiveRecord class and tried to save it, I get: ActiveRecord::StatementInvalid: PGError: ERROR: relation "temp_requests_id_seq" does not exist It keeps looking for the id to auto