search for: rr1

Displaying 20 results from an estimated 32 matches for "rr1".

Did you mean: rc1
2010 Oct 04
1
Help with apply
Suppose I have the following data: tmp <- data.frame(var1 = sample(c(0:10), 3, replace = TRUE), var2 = sample(c(0:10), 3, replace = TRUE), var3 = sample(c(0:10), 3, replace = TRUE)) I can run the following double loop and yield what I want in the end (rr1) as: library(statmod) Q <- 2 b <- runif(3) qq <- gauss.quad.prob(Q, dist = 'normal', mu = 0, sigma=1) rr1 <- matrix(0, nrow = Q, ncol = nrow(tmp)) L <- nrow(tmp) for(j in 1:Q){ for(i in 1:L){...
2012 Jul 15
1
how to extract p-value in GenMatch function
...alue. I have written R-code below library("Matching") data("lalonde") attach(lalonde) names(lalonde) Y <- lalonde$re78 Tr <- lalonde$treat glm1 <- glm(Tr~age+educ+black+hisp+married+nodegr+re74+re75,family=binomial,data=lalonde) pscore.predicted <- predict(glm1) rr1 <- Match(Y=Y,Tr=Tr,X=glm1$fitted,estimand="ATT", M=1,ties=TRUE,replace=TRUE) summary(rr1) > summary(rr1) Estimate...  2624.3  AI SE......  802.19  T-stat.....  3.2714  p.val......  0.0010702  Original number of observations..............  445  Original number of treated obs........
2009 Jul 06
1
transform multi skew-t to uniform distribution
Hi R-users,  I have a data from multi skew t and would like to transform each of the data to uniform data.  I tried using 'pmst' but only got one output:   > rr1 <- as.vector(r1);rr1  [1]  0.7207582  5.2250906  1.7422237  0.5677233  0.7473555 -0.6020626 -2.1947872 -1.1128313 -0.6587316 -1.1409261     > pmst(rr1, xi=rep(0,10), Omega=diag(10), alpha=rep(1,10), df=5) [1] 3.676525e-09 attr(,"error") [1] 3.878226e-11 attr(,"status") [1]...
2010 Sep 29
1
nlminb and optim
...} else { startVal <- rep(0, ncol(data)) } #qq <- gauss.quad.prob(Q, dist = 'normal', mu = 0, sigma=1) qq <- gauss.quad.prob(Q, dist = 'uniform', alpha = -5, beta=5) rr1 <- matrix(0, nrow = Q, ncol = nrow(data)) data <- as.matrix(data) L <- nrow(data) C <- ncol(data) fn <- function(b){ b <- b[1:C] for(j in 1:Q){...
2008 Sep 19
0
panel data analysis possible with mle2 (bbmle)?
...######################################## cross <- 3;years <- 13 #cross sections and years to be included frontr<-vector(length=years);ggwth <- 0.03; frontr[1]=17 for (i in 2:years) {frontr[i]=frontr[i-1]*(1+ggwth)} frontr <- rep(frontr,times=cross) atech <- matrix(0,years,cross);rr1 <- matrix(0,years,cross) agwth <- matrix(0,years,cross);cfgwth <- matrix(0,years,cross) aobs <- c(15.89,16.69,17.93,17.49,18.3,19.1,19.2,19.4,20.29,21.13,21.42,22.76,23.83, 14.1,14.4,13.4,14.9,15.23,15.4,15.55,16.7,17.8,18.87,18.99,19.24,20.59, 14.3,14.4,14.7,14.9,1...
2005 Nov 08
2
retrieve most abundant species by sample unit
...s what it looks like stacked. I have experimented with tapply(), by(), and some functions mentioned in archived postings, but I haven't seen anything that answers to this directly. Does anybody have any ideas? OBJECTID PolygonID SpeciesCod AbundanceP 1 15006 ANT-CBG-rr1 Leymol 5.00000 3 15008 ANT-CBG-rr1 Ambcha 5.00000 5 15010 ANT-ESH-27 Atrpat 20.00000 6 15011 ANT-ESH-27 Ambcha 10.00000 11 15016 ANT-ESH-28 Salvir 20.00000 14 15019 ANT-ESH-28 Atrpat 5.00000 18 15023 ANT...
2012 Oct 22
1
Matlab code to R code
...ever it dies not work as expected.  Hope somebody can help me to match Matlab and r codes. R code: rr <- function(r,cxn) { tol <- 1E-4; for(i in 1:n) { t1 <- (1+(i-1)*r)*log((1+(i-1)*r)) t2 <- (i-1)*(1-r)*log(1-r) rri <- ((t1+t2)/i*log(i))-cxn rr <- rri > tol } round(rr,4) } rr1 <- rr(0.5,0.0242) ; rr1 Matlab code: function F = cxncnr(r) n = 4; % terms t1 = (1+(n-1)*r)*log((1+(n-1)*r)); t2 = (n-1)*(1-r)*log(1-r); %f = term - cxn f = (t1+t2)/(n*log(n)) - 0.05011007 F = [f]; % r0 = [0.5] ; r = fsolve(@cxncnr,r0) Thank you so much for any help given. [[alternative H...
2008 Aug 26
2
svymeans question
I have the following code which produces the output below it clus1 <- svydesign(ids = ~schid, data = lower_dat) items <- as.formula(paste(" ~ ", paste(lset, collapse= "+"))) rr1 <- svymean(items, clus1, deff='replace', na.rm=TRUE) > rr1 mean SE DEff W525209 0.719748 0.015606 2.4932 W525223 0.508228 0.027570 6.2802 W525035 0.827202 0.014060 2.8561 W525131 0.805421 0.015425 3.1350 W525033 0.242982 0.020074 4.5239 W525163 0.904647 0.013905...
2007 Aug 23
0
weighted nls and confidence intervals
...consider the following simple example (yes, I know that this actually is a linar model :-)): #----------------------------------------------------------------------------------- probex <- 0.05 x <- 1:10 y <- rnorm(x, x, .8) w1 <- rep(1, 10) w2 <- w1; w2[7:10] <- 0.01 * w2[7:10] rr1 <- nls(y ~ a*x + b, data = list(x = x, y = y), start = list(a = 1, b = 0), weights = w1) rr2 <- nls(y ~ a*x + b, data = list(x = x, y = y), start = list(a = 1, b = 0), weights = w2) yfit1 <- fitted(rr1) yfit2 <- fitted(rr2) se.fit1 <- sqrt(apply(rr1$m$gradient(), 1, function(x) sum(v...
2007 Aug 31
0
non-linear fitting (nls) and confidence limits
...consider the following simple example (yes, I know that this actually is a linar model :-)): #----------------------------------------------------------------------------------- probex <- 0.05 x <- 1:10 y <- rnorm(x, x, .8) w1 <- rep(1, 10) w2 <- w1; w2[7:10] <- 0.01 * w2[7:10] rr1 <- nls(y ~ a*x + b, data = list(x = x, y = y), start = list(a = 1, b = 0), weights = w1) rr2 <- nls(y ~ a*x + b, data = list(x = x, y = y), start = list(a = 1, b = 0), weights = w2) yfit1 <- fitted(rr1) yfit2 <- fitted(rr2) se.fit1 <- sqrt(apply(rr1$m$gradient(), 1, function(x) sum(v...
2009 Nov 29
1
optim or nlminb for minimization, which to believe?
...startVal <- startVal } else { p <- colMeans(data) startVal <- as.vector(log((1 - p)/p)) } qq <- gauss.quad.prob(Q, dist = 'normal') rr1 <- matrix(0, nrow = Q, ncol = nrow(data)) data <- as.matrix(data) L <- nrow(data) C <- ncol(data) fn <- function(b){ for(j in 1:Q){ for(i in...
2008 Apr 22
3
[PATCH 0/3] ia64/pv_ops preparation
Hi. This patchset is preparation patches for ia64/pv_ops support. They are almost trivial and mainly make kernel paravirtualization friendly. thanks, Diffstat: arch/ia64/kernel/irq_ia64.c | 1 - include/asm-ia64/intrinsics.h | 11 +++++++++++ include/asm-ia64/mmu_context.h | 6 +----- include/asm-ia64/smp.h | 2 ++ include/asm-ia64/system.h | 10 ++++++++-- 5 files
2008 Aug 17
1
before-after control-impact analysis with R
...cted and 6 impacted). In this dataset, site is nested within harvest (H) and year is nested within before-after (BA). Also, site is considered as random by the authors. The data (fake again) can be produced with the following commands: >site<-c(rep(c("A1","A2", "RR1", "RR2", "WT1", "WT2", "WT3", "WT4"),8)) >H<-c(rep(c("exp", "exp", "prot", "pro", "exp", "exp", "exp", "exp"), 8)) >year<-c(rep(1989,8), rep(1990,8),...
2017 Oct 11
1
[PATCH v1 01/27] x86/crypto: Adapt assembly for PIE support
...x1, x0, t0; \ @@ -251,9 +255,9 @@ __cast5_enc_blk16: movq %rdi, CTX; - vmovdqa .Lbswap_mask, RKM; - vmovd .Lfirst_mask, R1ST; - vmovd .L32_mask, R32; + vmovdqa .Lbswap_mask(%rip), RKM; + vmovd .Lfirst_mask(%rip), R1ST; + vmovd .L32_mask(%rip), R32; enc_preload_rkr(); inpack_blocks(RL1, RR1, RTMP, RX, RKM); @@ -287,7 +291,7 @@ __cast5_enc_blk16: popq %rbx; popq %r15; - vmovdqa .Lbswap_mask, RKM; + vmovdqa .Lbswap_mask(%rip), RKM; outunpack_blocks(RR1, RL1, RTMP, RX, RKM); outunpack_blocks(RR2, RL2, RTMP, RX, RKM); @@ -325,9 +329,9 @@ __cast5_dec_blk16: movq %rdi, CTX;...
2018 Mar 13
32
[PATCH v2 00/27] x86: PIE support and option to extend KASLR randomization
Changes: - patch v2: - Adapt patch to work post KPTI and compiler changes - Redo all performance testing with latest configs and compilers - Simplify mov macro on PIE (MOVABS now) - Reduce GOT footprint - patch v1: - Simplify ftrace implementation. - Use gcc mstack-protector-guard-reg=%gs with PIE when possible. - rfc v3: - Use --emit-relocs instead of -pie to reduce
2018 Mar 13
32
[PATCH v2 00/27] x86: PIE support and option to extend KASLR randomization
Changes: - patch v2: - Adapt patch to work post KPTI and compiler changes - Redo all performance testing with latest configs and compilers - Simplify mov macro on PIE (MOVABS now) - Reduce GOT footprint - patch v1: - Simplify ftrace implementation. - Use gcc mstack-protector-guard-reg=%gs with PIE when possible. - rfc v3: - Use --emit-relocs instead of -pie to reduce
2017 Oct 04
28
x86: PIE support and option to extend KASLR randomization
These patches make the changes necessary to build the kernel as Position Independent Executable (PIE) on x86_64. A PIE kernel can be relocated below the top 2G of the virtual address space. It allows to optionally extend the KASLR randomization range from 1G to 3G. Thanks a lot to Ard Biesheuvel & Kees Cook on their feedback on compiler changes, PIE support and KASLR in general. Thanks to
2017 Oct 04
28
x86: PIE support and option to extend KASLR randomization
These patches make the changes necessary to build the kernel as Position Independent Executable (PIE) on x86_64. A PIE kernel can be relocated below the top 2G of the virtual address space. It allows to optionally extend the KASLR randomization range from 1G to 3G. Thanks a lot to Ard Biesheuvel & Kees Cook on their feedback on compiler changes, PIE support and KASLR in general. Thanks to
2018 May 23
33
[PATCH v3 00/27] x86: PIE support and option to extend KASLR randomization
Changes: - patch v3: - Update on message to describe longer term PIE goal. - Minor change on ftrace if condition. - Changed code using xchgq. - patch v2: - Adapt patch to work post KPTI and compiler changes - Redo all performance testing with latest configs and compilers - Simplify mov macro on PIE (MOVABS now) - Reduce GOT footprint - patch v1: - Simplify ftrace
2008 Apr 30
16
[PATCH 00/15] ia64/pv_ops take 5
Hi. This patchset implements ia64/pv_ops support which is the framework for virtualization support. Now all the comments so far have been addressed, but only a few exceptions. On x86 various ways to support virtualization were proposed, and eventually pv_ops won. So on ia64 the pv_ops strategy is appropriate too. Later I'll post the patchset which implements xen domU based on ia64/pv_ops.