search for: a21

Displaying 20 results from an estimated 43 matches for "a21".

Did you mean: 21
2013 Feb 01
2
Nested loop and output help
...ce=T) cut1 <- mean(X) + dev1 dev2 <- sample(12:54, 1, replace=T) cut2 <- mean(X) + dev1 + dev2 X2 <- X-cut1 Y2 <- Y-cut2 c3 <- cor(X2,Y2) mat2 <-cbind(X2,Y2) a11 <- ifelse( X < cut1 & Y < cut2, 1, 0) a12 <- ifelse( X < cut1 & Y >= cut2, 1, 0) a21 <- ifelse( X >= cut1 & Y < cut2, 1, 0) a22 <- ifelse( X >= cut1 & Y >= cut2, 1, 0) mat3 <-matrix(c(sum(a11),sum(a21), sum(a12),sum(a22)), nrow = 2) mat4 <-matrix(c(sum(a11),sum(a22), sum(a12),sum(a21)), nrow = 2) out3a <- mcnemar.test(mat3, correct=FALSE) out...
2005 Nov 09
8
Element-by-element multiplication operator?
Is there an element-by-element multiplication in R, like the .* operator in Matlab? eg: A (2x3) B (2x3) C=A.*B C (2x3) C = [[a11*b11 a12*b12 a13*b13]; [a21*b21 a22*b22 a23*b23]] I can't find one... Thanks -Mike Gates
2007 Nov 16
4
Permutation of a distance matrix
...permuting the rows and columns of a symmetrical matrix that represents ecological or actual distances between objects in space. The permutation is of the type used in a Mantel test. Specifically, the permutation has to accomplish something like this: Original matrix addresses: a11 a12 a13 a21 a22 a23 a31 a32 a33 Example permutation a22 a23 a21 a32 a33 a31 a12 a13 a11 that is relative positions of rows and columns are conserved in the permutation. Basically, I have been doing this in a "for" loop by (1) permuting the raw data vector using "sampl...
2003 May 08
1
A problem in a glm model
....1642 2.9133 Coefficients: Estimate Std. Error z value Pr(>|z|) (Intercept) -2.7647 0.7523 -3.675 0.000238 *** ... ... ... ... ... flg.a21 0.7898 0.4948 1.596 0.110475 flg.d.na21 0.2097 0.7336 0.286 0.774963 flg.v21 0.3928 0.5257 0.747 0.454994 flg.cc21 -0.8547 1.4954 -0.572 0....
2009 Jul 10
3
strange strsplit gsub problem 0 is this a bug or a string length limitation?
...items, not 113. Is it due to a string length limitation in R or is it a bug in the strsplit or gsub functions, or in my string? I'd very much appreciate any suggestions ============Input script: backtestFormula<-SPX~A1+A2+A3+A4+A5+A6+A7+A8+A9+A10+A11+A12+A13+A14+A15+A16+A17+A18+A19+A20+A21+A22+A23+A24+A25+A26+A27+A28+A29+A30+A31+A32+A33+A34+A35+A36+A37+A38+A39+A40+A41+A42+A43+A44+A45+A46+A47+A48+A49+A50+A51+A52+A53+A54+A55+A56+A57+A58+A59+A60+A61+A62+A63+A64+A65+A66+A67+A68+A69+A70+A71+A72+A73+A74+A75+A76+A77+A78+A79+A80+A81+A82+A83+A84+A85+A86+A87+A88+A89+A90+A91+A92+A93+A94+A95+A96...
2012 Mar 28
6
How to get all possible combinations?
Dear all, suppose I have a vector with elements as: Vec <- c(2,3,4,5,6) Now I want to have all possible combination of length 3 using those elements and without any repetition. Like, I want to have 1 possibility like 2-3-4 but not 3-2-4. Can somebody guide me how to achieve that in R? Thanks for your help.
2007 Oct 18
1
programming question
hie i'm tryimg to generate two survival data using the following code (I know its ugly ) but it seems to repeat two of the variables can any one tell me whats the porblem. n=20 n1=n/2 n2=n/4 a11=1 ;a12=1.4 ;a21=16 ;a22=a12 * a21 t1<-array(1,c(n1)) t2<-array(2,c(n1)) treatgrp=matrix(c(t1,t2)) st11<-array(1,c(n2)) st12<-array(2,c(n2)) st21<-array(1,c(n2)) st22<-arr...
2004 Jul 03
1
solving for a 2D transformation matrix
...quot; coordinates of a subset of the points. I want to use this subset of points to compute a best-fit transformation matrix so that the remaining points can be converted to world coordinates. The transformation matrix is (I think) of the form: [ x' ] [ a11 a12 a13 ] [ x ] | y' | = | a21 a22 a23 | | y | [ w' ] [ a31 a32 a33 ] [ w ] where: x,y = page coordinates x',y' = world coordinates a13 = translation of x a23 = translation of y a11 = scale * cos(theta) a12 = sin(theta) a21 = -sin(theta) a22 = scale * cos(theta) a31 = 0...
2007 Apr 27
1
Problem with formatted xtable in R 2.5.0
Dear R-Devel subscriber, I encountered the following problem for tex-formatted table with xtable(). Suppose I do want the following matrix as a table in LaTeX: library(xtable) a11 <- "\\color{green}\\textbf{big green}" a21 <- "\\color{red}\\textbf{big red}" a12 <- "\\color{green}green" a22 <- "\\color{red}red" A <- matrix(c(a11, a21, a12, a22), nrow = 2, ncol = 2) colnames(A) <- c("big", "normal") rownames(A) <- c("green", "red")...
2017 Jun 04
0
Hlep in analysis in RWinBugs
...GS and don't know how we perform the analysis. I wonder whether I can run the following the example data and Winbugs Model in R. Your help will be highly appreciated. Sincerely, SN PANDIT === library(R2WinBUGS) #Model model{ #likelihood for(i in 1:N){ a1[i] ~ dnorm(a11[i],tau) 2[i] ~ dnorm(a21[i],tau1) a3[i] ~ dnorm(a31[i],tau2) a11[i]<-sm[i]*S1*m1 a21[i]<-sm[i]*S1*(1-m1)*S2*m2 a31[i]<-sm[i]*S1*(1-m1)*S2*(1-m2)*S3 sum[i]<-a11[i]+a21[i]+a31[i] } #priors #priors are dbeta(0.5,0.5), uniform is dbeta(1,1) S1~dbeta(1,1)#I(0,0.2) # S2~dbeta(1,1)#I(0.15,0.5) # S3~dbeta(1,1)#I(0.3,...
2017 Jun 04
0
Help in analysis in RWinBugs
...GS and don't know how we perform the analysis. I wonder whether I can run the following the example data and Winbugs Model in R. Your help will be highly appreciated. Sincerely, SN PANDIT === library(R2WinBUGS) #Model model{ #likelihood for(i in 1:N){ a1[i] ~ dnorm(a11[i],tau) 2[i] ~ dnorm(a21[i],tau1) a3[i] ~ dnorm(a31[i],tau2) a11[i]<-sm[i]*S1*m1 a21[i]<-sm[i]*S1*(1-m1)*S2*m2 a31[i]<-sm[i]*S1*(1-m1)*S2*(1-m2)*S3 sum[i]<-a11[i]+a21[i]+a31[i] } #priors #priors are dbeta(0.5,0.5), uniform is dbeta(1,1) S1~dbeta(1,1)#I(0,0.2) # S2~dbeta(1,1)#I(0.15,0.5) # S3~dbeta(1,1)#I(0.3,...
2001 May 11
1
lsoda
...n below ('lvcomp2'), I don't know what global values lsoda needs at each point in time (see???), other than the previous time step's values of y and the parms. Any help? Also, any rule of thumb advice regarding rtol and atol would be appreciated. p <- c(r1=.01, r2=.01, a12=0.5, a21=0.6, k1=1,k2=1) t <- 1:20 lvcomp2 <- function(y, t, p) { # Lotka - Volterra model of two competing populations dN1.dt <- p["r1"] * y[1] * (1-(y[1] + p["a12"]*y[2])/p["k1"]) dN2.dt <- p["r2"] * y[2] * (1-(y[2] + p["a21"]*y[1])/p["k2&...
2008 Nov 29
2
Reading mixed tables
...I guess R may work very well in this kind of contests but the input of file has been a problem for me. Take this case for example (http://code.google.com/codejam/contest/dashboard?c=agdjb2RlamFtchALEghjb250ZXN0cxjRzBQM), the files are usually of the form: A(number of lines for group 1) a11 a12 a13 a21 a22 a23 ... B(number of lines for group 2) b11 b12 b13 b21 b22 b23 ... I guess SAS may work pretty well in this kind of situation with data step. But I don't know how to handle them using R. Any suggestions? Thanks a lot. Best wishes, -- ??? Hesen Peng http://hesen.peng.googlepages.com/
2012 Jan 10
3
unir en .dbf luego de aplicar read.xls a varios archivos
...1], perl="C:\\strawberry\\perl\\bin\\perl.exe",skip=12,dec=",",header=F,as.is=T) a2 <- read.xls(archivos[2], perl="C:\\strawberry\\perl\\bin\\perl.exe",skip=12,dec=",",header=F,as.is=T) a11 <- cbind(a1[1,1:2],a1[4:which(a1=="Art. 14")-1,1:7]) a21 <- cbind(a2[1,1:2],a1[4:which(a1=="Art. 14")-1,1:7]) a3 <- rbind(a11,a21) Si lo hago con lapply me queda mal. Saludos, Sebastián.
2011 Aug 05
2
R compare cells in one matrix
...] [,3] [,4] [,5] [1,] 277.4 276.24 275.62 276.55 278.05 [2,] 277.4 276.24 275.55 276.42 277.72 [3,] 277.4 276.24 275.50 276.22 277.39 [4,] 277.4 276.24 275.42 276.02 277.02 [5,] 277.4 276.22 275.37 275.82 276.64 And I want to *compare*its cells like this: a11 and a12; a11 and a21; a11 and a22. then a12 and a22; a12 and a13; a12 and a23. and so on in a cycle. *Is there a function or a package that can be used for comparation?* Thank you! -- View this message in context: http://r.789695.n4.nabble.com/R-compare-cells-in-one-matrix-tp3720854p3720854.html Sent from the R he...
2007 Mar 10
3
long character string problem
...6*(X16*x1+X26*x2)+1*sqrt(B16*(X16*x1+X26*x2)^2+C16)A17*(X17*x1+X27*x2)+1*sqrt(B17*(X17*x1+X27*x2)^2+C17)A18*(X18*x1+X28*x2)+1*sqrt(B18*(X18*x1+X28*x2)^2+C18)A19*(X19*x1+X29*x2)+-1*sqrt(B19*(X19*x1+X29*x2)^2+C19)A110*(X110*x1+X210*x2)+1*sqrt(B110*(X110*x1+X210*x2)^2+C110)" > cum2 [1] "A21*(X11*x1+X21*x2)+1*sqrt(B21*(X11*x1+X21*x2)^2+C21)A22*(X12*x1+X22*x2)+1*sqrt(B22*(X12*x1+X22*x2)^2+C22)A23*(X13*x1+X23*x2)+-1*sqrt(B23*(X13*x1+X23*x2)^2+C23)A24*(X14*x1+X24*x2)+-1*sqrt(B24*(X14*x1+X24*x2)^2+C24)A25*(X15*x1+X25*x2)+1*sqrt(B25*(X15*x1+X25*x2)^2+C25)A26*(X16*x1+X26*x2)+1*sqrt(B26*(X16*...
2011 Dec 31
4
PXELINUX 4.10-pre17 and newer Dell OptiPlex/Latitude/Precision
Shantanu, let's continue here. You first noticed this on a Dell OptiPlex 755. I think it covers all Dell OptiPlex/Latitude/Precision models that are PCIe based with Intel LoM (LAN on motherboard) utilizing the BIOS PXE OROM, based on the similarity of these systems. The symptoms are that PXELINUX requests pxelinux.cfg/<UUID> by TFTP (but it might not strictly be a TFTP issue) when not
2017 Mar 03
2
Bug in nlm()
Dear all, I have found a bug in nlm() and would like to submit a report on this. Since nlm() is in the stats-package, which is maintained by the R Core team, bug reports should be submitted to R's Bugzilla. However, I'm not a member of Bugzilla. Could anyone be so kind to add me to R's Bugzilla members or let me know to whom I should send the bug report? Thank you in advance. Kind
2007 Oct 29
3
using survfit
hie when i use plot.survfit to plot more than one graph why I only see the last graph how do i see the other graphs.for example n=20 n1=n/2 n2=n/4 a11=4;a12=4 ;a21=4 ;a22=4 t1<-array(1,c(n1)) t2<-array(2,c(n1)) treatgrp=matrix(c(t1,t2)) st11<-array(1,c(n2)) st12<-array(2,c(n2)) st21<-array(1,c(n2)) st22<-array(2,c(n2...
2005 Dec 04
1
Understanding nonlinear optimization and Rosenbrock's banana valley function?
...)^2+(1-x[1])^2 attr(b, "gradient") <- Dbanana(x) b } nlm(banana1, c(-1.2, 1)) # solved the problem in 24 iterations nlminb(c(-1.2, 1), banana, Dbanana)# solution in 35 iterations D2banana <- function(x){ a11 <- (2 - 400*(x[2] - x[1]^2) + 800*x[2]*x[1]^2) a21 <- (-400*x[1]) matrix(c(a11,a21,a21,200),2,2) } banana2 <- function(x){ b <- 100*(x[2]-x[1]^2)^2+(1-x[1])^2 attr(b, "gradient") <- Dbanana(x) attr(b, "hessian") <- D2banana(x) b } nlm(banana2, c(-1.2, 1)) # Found the valley but not the minimu...