search for: k2

Displaying 20 results from an estimated 306 matches for "k2".

Did you mean: 2k
2006 Mar 11
1
Non-linear Regression : Error in eval(expr, envir, enclos)
Hi.. i have an expression of the form: model1<-nls(y~beta1*(x1+(k1*x2)+(k1*k1*x3)+(k2*x4)+(k2*k1*x5)+(k2*k2*x6)+(k3*x7)+(k3*k4*x8)+(k3*k2*x9)+(k3*k3*x10)+ (k4*x11)+(k4*k1*x12)+(k4*k2*x13)+(k4*k3*x14)+(k4*k4*x15)+(k5*x16)+(k5*k1*x17)+(k5*k2*x18)+(k5*k3*x19)+ (k5*k4*x20)+(k5*k5*x21)+(k6*x22)+(k6*k1*x23)+(k6*k2*x24)+(k6*k3*x25)+(k6*k4*x26)+(k6*k5*x27)+(k6*k6*x28)+...
2004 Mar 17
1
file name starting with [0-9]* not synchronized (!?)
...ackup a remote directory. Although the remote directory hasn't been changed after rsync's run, I realize that the supposed synchronization missed some files. Does it have to do with rsync or I miss something ? Thanks very much, Mihai. ______________________________ quad ...lu2/BACKUP/k2/mnt/i1/vbs# rsync -av --stats rsync://mlozo@k2/vobuser/user /mnt/lu2/BACKUP/k2/mnt/i1/vbs/ --password-file=/mnt/lu2/BACKUP/rsync/.pass receiving file list ... done Number of files: 271 Number of files transferred: 0 Total file size: 1207607 bytes Total transferred file size: 0 bytes Literal d...
2013 Mar 15
2
Help finding first value in a BY group
I have a large Excel file with SKU numbers (stock keeping units) and forecasts which can be mimicked with the following: Period <- c(1, 2, 3, 1, 2, 3, 4, 1, 2) SKU <- c("A1","A1","A1","X4","X4","X4","X4","K2","K2") Forecast <- c(99, 103, 128, 63, 69, 72, 75, 207, 201) PeriodSKUForecast <- data.frame(Period, SKU, Forecast) PeriodSKUForecast Period SKU Forecast 1 1 A1 99 2 2 A1 103 3 3 A1 128 4 1 X4 63 5 2 X4 69 6 3 X...
2010 Dec 15
5
Solution to differential equation
Hello, I am trying to find the analytical solution to this differential equation dR/dt = k1*(R^k2)*(1-(R/Rmax)); R(0) = Ro k1 and k2 are parameters that need to fitted, while Ro and Rmax are the baseline and max value (which can be fitted or fixed). The response (R) increases initially at an exponential rate governed by the rate constants k1 and k2. Response has a S-shaped curve as a function...
2004 Jan 23
0
cmptl_analy.R
...nce. I notice it has to be higher than usual, but, I recovered your noisy "known" parameter values with an error of K1 (-7%) and k1 (-6%): #### Miller problem with Dalgaard modifications ## Linares 1/22/2004 ## Solution 1 nls(noisy ~ lsoda(xstart, time, one.compartment.model, c(K1=K1, k2=k2))[,2], data=C1.lsoda, start=list(K1=0.3, k2=0.7), control=nls.control(maxiter=50,tol=1), trace=T ) 0.3594355 : 0.3 0.7 0.006118908 : 0.3456684 0.3518834 0.002828044 : 0.4057868 0.4081200 Nonlinear regression model model: noisy...
2007 Sep 22
0
error messages
...given. My program is shown below: library(circular) ######################################## 4 parameters ######################################## z<-rvonmises(100,0,1) z<-as.vector(z) x<-rvonmises(100,0,2+cos(z)) x<-as.vector(x) f<-function(x){ k1<-x[1] k2<-x[2] k12<-x[3] g<-x[4] -2*sum(log( exp(k1*cos(x))*integrate(function(y)exp((k2+k12*cos(x))*cos(y)),g,2*pi,subdivisions=1000000)$value /(2*pi*integrate(function(y)besselI(k1+k12*cos(y),0)*exp(k2*cos(y)),g,2*pi,subdivisions=1000000)$value) )) } gr<-function(u){ k1<-u...
2010 Aug 20
5
paired samples, matching rows, merge()
Hi everyone! I'm matching two samples to create one sample that have pairs of observations equal for the k1 variable. Merge() doesn't work because I dont't want to recycle the values. x <- data.frame(k1=c(1,1,2,3,3,5), k2=c(20,21,22,23,24,25)) x y <- data.frame(k1=c(1,1,2,2,3,4,5,5), k2=c(10,11,12,13,14,15,16,17)) y merge(x,y,by="k1") k1 k2.x k2.y 1 1 20 10 2 1 20 11 3 1 21 10 4 1 21 11 5 2 22 12 6 2 22 13 7 3 23 14 8 3 24 14 9 5 25 16 10 5 25...
2003 Jun 09
1
questions about nls
Dear R users, I am new in R and I want to use the nls package to analyze some experimental data. The data is in the attached file "data". It is the response "Sav" measured at different "C0". Basically, the "C0" is a function of C1, K2, and r, and the "Sav" is a function of C0, C1, K2, and r. The math equations are shown in the attached file"equations". The parameters K2 and r are the physical properties I want to get from the non-linear regression. The R codes I wrote is in the attached file"Rcode&quot...
2007 Aug 14
2
State Space Modelling
Hey all, I am trying to work under a State Space form, but I didn't get the help exactly. Have anyone eles used this functions? I was used to work with S-PLUS, but I have some codes I need to adpt. Thanks alot, Bernardo [[alternative HTML version deleted]]
2007 May 23
1
Readline - wait for user input
...for the input and gives an error. There must be a way to have are pause/wait for an answer, but I can't seem to find it. Thanks! J Code: choosefunction <- function(){readline("1. linear, 2. linear with lag, 3. nonlinear ")} ans <- as.integer(choosefunction()) if (ans==1){K2=x1} if (ans==2){K2=x2 } if (ans==3){K2=x3 } ans Error text: > ans <- as.integer(choosefunction()) 1. linear, 2. linear with lag, 3. nonlinear if (ans==1) {K2=x1}]} Warning message: NAs introduced by coercion > if (ans==2){K2=x2) } Error in if (ans == 2) { : missing value where TRUE/FALS...
2007 Oct 23
1
How to avoid the NaN errors in dnbinom?
...produced I know from the help files that for dnbinom "Invalid size or prob will result in return value NaN, with a warning", but I am not able to find a workaround for this in my code to avoid it. I appreciate the help. Thanks. Below is the reproducible code: mixnbinom=function(y,k1,mu1,k2,mu2,prob,eps= 1/100000){ new.parms=c(k1,mu1,k2,mu2,prob) err=1 iter=1 maxiter=100 hist(y,probability=T,nclass=30,col="lightgrey",main="The EM algorithm") xvals=seq(min(y),max(y),1) lines(xvals,prob*dnbinom(xvals,size=k1,mu=mu1)+ (1-prob)*dnbinom(xvals,size=k2,mu=mu2),col="g...
2007 Oct 24
1
Error in nls model.frame
...rame When I run the following nls model an error message appears and I dont know how to solve that. Could you help me?? mat = c(1,2,3,4,5,6,7,8,9,12,16,24,36,48,60) for (i in 1:length(j30)) { bliss = nls(c(j[i,1:length(mat)]) ~ b0 + b1*((1-exp(-k1*mat))/(k1*mat)) + b2*(((1-exp(-k2*mat))/(k2*mat))-exp(-k2*mat)), start = list(k1=0.1993, k2=0.1993, b0= 22.0046, b1=-2.7661, b2=-5.8912), trace = TRUE) } Error in model.frame(formula, rownames, variables, varnames, extras, extranames, : variable lengths differ (found in 'mat') j is a (1883...
2007 Jun 27
1
Another loop avoidance question.
Hi I want to sum over one of the dimensions of a n x k1 x k2 array in which each column is the product of the corresponding columns from two matrices with dimensions n x k1 and n x k2. I can see two approaches: a loop on k1 and a loop on k2. But I cannot figure a solution that avoids the loop? Is it possible? (I don't refer to apply or lapply etc either...
2018 Feb 25
2
include
HI Jim and all, I want to put one more condition. Include col2 and col3 if they are not in col1. Here is the data mydat <- read.table(textConnection("Col1 Col2 col3 K2 X1 NA Z1 K1 K2 Z2 NA NA Z3 X1 NA Z4 Y1 W1"),header = TRUE,stringsAsFactors=FALSE) The desired out put would be Col1 Col2 col3 1 X1 0 0 2 K1 0 0 3 Y1 0 0 4 W1 0 0 6 K2 X1 0 7 Z1 K1 K2 8 Z2 0 0 9 Z3 X1 0 10 Z4 Y1 W1 K...
2009 Jun 10
1
Resetting Marker Bits
...nable SIP Markers, or specifically, how to have the TIME reset when a call route changes. I'm debugging an issue, where a sip client we have switching to one-way-audio, when an asterisk server fruther down the call path dials out to the PSTN. Scenario is: SIP Client -> A*k1 -> A*k2 -> PSTN Provider/Gradwell -> O2 -> Mobile - the SIP client dials on O2 mobile, call goes out to A*1. - A*1 Dials out to A*k2 as A*k2 is the gateway to PSTN providers and normal office phones. - A*k2 dials some local Cisco phones, then on no answer plays a...
2008 Dec 01
1
Spatstat - K2 index
...es not appear to be homogenous, so I would like to use inhomogeneous techniques. I realise there is a inhomogeneous K-function available in spatstat, but there doesn't not appear to be one for the pair-correlation function (O-ring statistic). As such I was planning to use a new technique (the K2 index) as described in Schiffers et al. (2008) [Ecography, 31:545-555]. The following website has more detail [http://www.oikos.ekol.lu.se/appendixdown/E5374-example.R]. Despite this I cannot get the function to run! I am not very familiar with R so it is likely my problem is simple. Does anyone...
2012 Mar 02
5
Calculation of standard error for a function
Dear list, If I know the standard error for k1 and k2, is there anything I can call in R to calculate the standard error of k1/k2? Thanks. Jun [[alternative HTML version deleted]]
2014 Dec 04
2
[PATCH v2] v2v: When picking a default kernel, favour non-debug kernels over debug kernels (RHBZ#1170073).
...ki_supports_virtio = supports_virtio; ki_is_xen_kernel = is_xen_kernel; + ki_is_debug = is_debug; } ) @@ -745,7 +752,12 @@ let rec convert ~verbose ~keep_serial_console (g : G.guestfs) inspect source = let compare_best_kernels k1 k2 = let i = compare k1.ki_supports_virtio k2.ki_supports_virtio in if i <> 0 then i - else compare_app2_versions k1.ki_app k2.ki_app + else ( + let i = compare_app2_versions k1.ki_app k2.ki_app in + if i <> 0 then i + (* Favour no...
2012 Jun 14
0
fixed trimmed mean for j-group
...miu,sd1) b=rnorm(n2,miu,sd2) c=rnorm(n3,miu,sd3) d=rnorm(n4,miu,sd4) ## data transformation g=0 h=0 w<-a*exp(h*a^2/2) x<-b*exp(h*b^2/2) y<-c*exp(h*c^2/2) z<-d*exp(h*d^2/2) mat1<-sort(w) mat2<-sort(x) mat3<-sort(y) mat4<-sort(z) alpha=0.15 k1=floor(alpha*n1)+1 k2=floor(alpha*n2)+1 k3=floor(alpha*n3)+1 k4=floor(alpha*n4)+1 r1=k1-(alpha*n1) r2=k2-(alpha*n2) r3=k3-(alpha*n3) r4=k4-(alpha*n4) ## j-group trimmed mean e1=k1+1 f1=n1-k1 e2=k2+1 f2=n2-k2 e3=k3+1 f3=n3-k3 e4=k4+1 f4=n4-k4 trim1=1/((1-2*alpha)*n1)*(sum(mat1[e1:f1]) + r1*(mat1[k1]+mat1[n1-k1+1])...
2018 Feb 25
0
include
...revity. On February 25, 2018 7:55:55 AM PST, Val <valkremk at gmail.com> wrote: >HI Jim and all, > >I want to put one more condition. Include col2 and col3 if they are >not >in col1. > >Here is the data >mydat <- read.table(textConnection("Col1 Col2 col3 >K2 X1 NA >Z1 K1 K2 >Z2 NA NA >Z3 X1 NA >Z4 Y1 W1"),header = TRUE,stringsAsFactors=FALSE) > >The desired out put would be > > Col1 Col2 col3 >1 X1 0 0 >2 K1 0 0 >3 Y1 0 0 >4 W1 0 0 >6 K2 X1 0 >7 Z1 K1 K2...