similar to: Conditional sum

Displaying 20 results from an estimated 10000 matches similar to: "Conditional sum"

2012 Oct 19
1
Optimization in R similar to MS Excel Solver
Dear Colleagues, I am attempting to develop an optimization routine for a river suspended sediment mixing model. I have Calcium and Magnesium concentrations (%) for sediments from 4 potential source areas (Topsoil, Channel Banks, Roads, Drains) and I want to work out, based on the suspended sediment calcium and magnesium concentrations, what are the optimal contributions from each source area to
2012 Sep 28
2
Converting array to matrix
Hi, I have a 3d array as below, I want to make this array to a matrix of p=50(rows) and n=20(columns) with the coverage values . The code before the array is: library(binom) Loading required package: lattice pi.seq<-seq(from = 0.01, to = 0.5, by = 0.01) no.seq<-seq(from = 5, to = 100, by = 5) cp.all = binom.coverage( p = pi.seq, n = no.seq , conf.level = 0.95, method = "exact")
2007 Apr 25
1
help
Hi all, I have 2 questions: 1)How do I calculate the mean on an imported txt file? I've imported the file below and that's what it looks like imported. How do I then calcuate the mean, median, or mode on the column LeafArea using the desktop R package? Any help would be greatly appreciated!! Thanks, Nat LeafType Leaflets LeafArea ShapeRatio LeafWeight LeafThickness 1 1
2013 May 29
3
bootstrap
Hi, You might need to check library(boot).? I have never used that before.? So, I can't comment much.? It is better to post on R-help list.? I had seen your postings on Nabble in the past.? Unfortunately those postings were not accepted in R-help.? You have to directly post at ? r-help at r-project.org after registering at: https://stat.ethz.ch/mailman/listinfo/r-help ?
2013 Apr 13
1
how to add a row vector in a dataframe
Hi, Using S=1000 and simdata <- replicate(S, generate(3000)) #If you want both "m1" and "m0" #here the missing values are 0 res1<-sapply(seq_len(ncol(simdata.psm1)),function(i) {x1<-merge(simdata.psm0[,i],simdata.psm1[,i],all=TRUE); x1[is.na(x1)]<-0; x1}) res1[,997:1000] #????? [,1]???????? [,2]???????? [,3]???????? [,4]??????? #x1??? Numeric,3000 Numeric,3000
2011 Dec 06
1
Sequential Sum in R
I am trying to code the following excel formula in R. a b c Result Formula 1 10 0.1 #N/A IF(B2<20,NA(),C2+IF(ISERROR(D1),0,D1)) 2 20 0.2 0.2 IF(B3<20,NA(),C3+IF(ISERROR(D2),0,D2)) 3 30 0.3 0.5 IF(B4<20,NA(),C4+IF(ISERROR(D3),0,D3)) 4 40
2003 Sep 07
0
µÚËĽ챱¾©³¯Ñô¹ú¼ÊÉÌÎñ½Ú
=BE=B4=C6=F4=D5=DF=A3=BA =A1=B0=B5=DA=CB=C4=BD=EC=B1=B1=BE=A9=B3=AF=D1=F4=B9=FA=BC=CA=C9=CC=CE=F1= =BD=DA=A1=B1=BD=AB=D3=DA2003=C4=EA10=D4=C2=D4=DA=B1=B1=BE=A9=BE=D9=B0=EC=A1= =A3=BD=EC=CA=B1=A3=AC=B9=FA=BC=D2=C1=EC=B5=BC=C8=CB=A1=A2=CD=E2=B9=FA=D5=FE= =D2=AA=BA=CD=C0=B4=D7=D4=C3=C0=A1=A2=B5=C2=A1=A2=B7=A8=A1=A2=B0=C4=B4=F3=C0=
2003 May 05
3
polr in MASS
Hi, I am trying to test the proportional-odds model using the "polr" function in the MASS library with the dataset of "housing" contained in the MASS book ("Sat" (factor: low, medium, high) is the dependent variable, "Infl" (low, medium, high), "Type" (tower, apartment, atrium, terrace) and "Cont" (low, high) are the predictor variables
2005 Mar 23
1
Gini's Importance Value Variable = Inf
Hi All, In the script below, the importance measure for column 4 (ie MeanDecreaseGini) indicated "Inf" for V7. Running the getTree command showed that "V7" had been selected at least twice in one of the trees for Random Forest. So the "Inf" command was not generated as a result of dividing the sum of the decreases by 0. Any suggestions on what may be causing the
2012 Mar 12
3
how to calculate a variance and covariance matrix for a vector
Hello, I have a vector {a, b1, b2, b3, b4}. How can I calculate the following matrix: var(a) cov(a, b1) cov(a, b2) cov(a, b3) cov(a, b4) cov(a, b1) var(b1) cov(a, b2) cov(a, b3) cov(a, b4) ... ... cov(a, b1) cov(a, b2) cov(a, b3) cov(a, b4) var(b4) I would very appreciate your inputs. Thank you very much. Sincerely, Jialin Huang [[alternative HTML version deleted]]
2005 Oct 07
3
Converting PROC NLMIXED code to NLME
Hi, I am trying to convert the following NLMIXED code to NLME, but am running into problems concerning 'Singularity in backsolve'. As I am new to R/S-Plus, I thought I may be missing something in the NLME code. NLMIXED *********** proc nlmixed data=kidney.kidney; parms delta=0.03 gamma=1.1 b1=-0.003 b2=-1.2 b3=0.09 b4=0.35 b5=-1.43 varu=0.5; eta=b1*age+b2*sex+b3*gn+b4*an+b5*pkn+u;
2011 Jun 01
0
Simulating SVAR Data
Hello, I'd like to simulate data according to an SVAR model in order to demonstrate how other techniques (such as arima) yield biased estimates. I am interested in a 2 variable SVAR with 2 lags (in the notation of the vars vignette, K = 2, P = 2, where B = I_K). I'm using the {vars} package outlined here: http://cran.r-project.org/web/packages/vars/vignettes/vars.pdf I thought that the
2009 Jan 23
1
Interpreting model matrix columns when using contr.sum
With the following example using contr.sum for both factors, > dd <- data.frame(a = gl(3,4), b = gl(4,1,12)) # balanced 2-way > model.matrix(~ a * b, dd, contrasts = list(a="contr.sum", b="contr.sum")) (Intercept) a1 a2 b1 b2 b3 a1:b1 a2:b1 a1:b2 a2:b2 a1:b3 a2:b3 1 1 1 0 1 0 0 1 0 0 0 0 0 2 1 1 0 0 1 0
2017 Oct 18
1
gfid entries in volume heal info that do not heal
Hey Matt, >From the xattr output, it looks like the files are not present on the arbiter brick & needs healing. But on the parent it does not have the pending markers set for those entries. The workaround for this is you need to do a lookup on the file which needs heal from the mount, so it will create the entry on the arbiter brick and then run the volume heal to do the healing. Follow
2005 Oct 19
1
nlme Singularity in backsolve at level 0, block 1
Hi, I am hoping some one can help with this. I am using nlme to fit a random coefficients model. It ran for hours before returning Error: Singularity in backsolve at level 0, block 1 The model is > plavix.nlme<-nlme(PLX_NRX~loglike(PLX_NRX,PD4_42D,GAT_34D,VIS_42D,MSL_42D,SPE_ROL,XM2_DUM,THX_DUM,b0,b1,b2,b3,b4,b5,b6,b7,alpha), + data=data, + fixed=list(b0 +
2008 Jan 28
2
matrix creation
Hello, I am trying to create multiple matrices (to run a PVA) but can't import all of them from a .csv without the numbers treated as labels and not factors. I can enter the matrix slowly: Site05_96 <- matrix(c(0.07,0,0.03,0.00,NA,0.00, 0.09,0.166666667,0.31,0.42,NA,0.00, 0.00,0,0.00,0.00,NA,0.00, 0.00,0,0.00,0.00,NA,0.00,
2010 Aug 03
2
How to name matrices from a list with lapply ?
Dear list, I have a list of matrices : i1 <- matrix(1:10, nrow = 2, ncol = 5) i2 <- matrix(11:20, nrow = 2, ncol = 5) j <- list(i1 = i1, i2 = i2) I would like to attribute names to each dimension, for each matrix, as follows : $i1 B1 B2 B3 B4 B5 A1 1 3 5 7 9 A2 2 4 6 8 10 $i2 B1 B2 B3 B4 B5 A1 11 13 15 17 19 A2 12 14 16 18 20 However, I have to use lapply function and attribute
2017 Oct 23
0
gfid entries in volume heal info that do not heal
Hi Jim & Matt, Can you also check for the link count in the stat output of those hardlink entries in the .glusterfs folder on the bricks. If the link count is 1 on all the bricks for those entries, then they are orphaned entries and you can delete those hardlinks. To be on the safer side have a backup before deleting any of the entries. Regards, Karthik On Fri, Oct 20, 2017 at 3:18 AM, Jim
2009 Apr 30
0
Categorical variable in a custom nonlin function with gnm
Hi all I want to construct a generalised nonlinear model (binomial family) using gnm, of the form: Response = a + b variable1 + c variable2 + d variable3 - d b variable4 - d c variable5, with the parameters b, c, and d appearing more than once. Hence, I think I need to use a custom nonlin function with gnm. One of my predictor variables is categorical, so I have created a dummy variable for
2017 Oct 17
0
gfid entries in volume heal info that do not heal
Attached is the heal log for the volume as well as the shd log. >> Run these commands on all the bricks of the replica pair to get the attrs set on the backend. [root at tpc-cent-glus1-081017 ~]# getfattr -d -e hex -m . /exp/b1/gv0/.glusterfs/10/86/108694db-c039-4b7c-bd3d-ad6a15d811a2 getfattr: Removing leading '/' from absolute path names # file: