Displaying 20 results from an estimated 21 matches for "mat2".

Did you mean:
mat

2008 Mar 05

1

coxme - fitting random treatment effect nested within centre

...dom treatment effect nested within centre. I got 3 treatments (0,1,2) and 3 centres. I used following commands, but got an error.
> ugroup=paste(rep(1:3,each=3),rep(0:2,3),sep='/')
> mat1=bdsmatrix(rep(c(1,1,1,1,1,1,1,1,1),3),blocksize=rep(3,3),dimnames=list(ugroup,ugroup))
> mat2=bdsmatrix(rep(c(0,0,0,0,0,0,0,0,1),3),blocksize=rep(3,3),dimnames=list(ugroup,ugroup))
> group=paste(dat1$centre,dat1$treat,sep='/')
> coxme(Surv(time,status) ~ as.factor(treat), data=dat1,random= ~1|group,varlist=list(mat1,mat2),rescale=F,pdcheck=FALSE)
Error in coxme.fit(X, Y,...

2013 Sep 02

3

Product of certain rows in a matrix

Hi,
You could try:
A<- matrix(unlist(read.table(text="
1 2 3
4 5 6
7 8 9
9 8 7
6 5 4
3 2 1
",sep="",header=FALSE)),ncol=3,byrow=FALSE,dimnames=NULL)
library(matrixStats)
?res1<-t(sapply(split(as.data.frame(A),as.numeric(gl(nrow(A),2,6))),colProds))
?res1
#? [,1] [,2] [,3]
#1??? 4?? 10?? 18
#2?? 63?? 64?? 63
#3?? 18?? 10??? 4

2006 Aug 15

4

nls

Is there anyway to change any y[i] value (i=2,...6) to make following NLS workable?
x <- c(0,5,10,15,20,25,30)
y <- c(1.00000,0.82000,0.68000,0.64000,0.66667,0.68667,0.64000)
lm(1/y ~~ x)
nls(1/y ~~ a+b*x^c, start=list(a=1.16122,b=0.01565,c=1), trace=TRUE)
#0.0920573 : 1.16122 0.01565 1.00000
#Error in numericDeriv(form[[3]], names(ind), env) :
# Missing

2012 Oct 07

1

variances of random effects in coxme

...coxme in order to build Cox
models with complex random effects. Unfortunately, I sometimes get
surprising estimations of the variances of the random effects.
I ran models with different fixed covariates but always with the same 3
random effects defined by the argument
varlist=coxmeMlist(list(mat1,mat2,mat3), rescale = F, pdcheck = F,
positive=F). I get a few times exactly the same estimations of the
parameters of the random effects whereas the fixed effects of the models
are different:
Random effects
Group Variable Std Dev Variance
idp Vmat.1 0.10000000 0.01000000
Vmat.2 0.022...

2011 Apr 24

2

random roundoff?

...iplications, I have a situation in
in which the result depends on the nature of nearby I/O. Thus,
with all arithmetic done with type double, and where values
are mostly in the range [-1.0e0,+1.0e0] or nearby, I do:
cerr << "some stuff" << endl;
mat3 = matmult(mat1,mat2);
I get a difference of the order 1.0e-15 depending on whether the
cerr line does or does not end in "endl" as shown.
I am imagining that there is some "randomness" in the roundoff
that depends on the I/O situation. Is this credible? Any other
suggestions?
Thanks for yo...

2013 May 14

0

Matrix multiplication with scattered NA values

Hi,
Not sure if this is what you wanted:
?mat1<- as.matrix(read.table(text="
????? 33??????? 45??? 50
????? NA?????? NA?? 54
",sep="",header=FALSE))
mat2<- as.matrix(read.table(text="
24??????????????? 0.0000000??????? 0.0000000
0.0000000??????? 14??????????????? 0.0000000
0.0000000 0.0000000??????? 10
",sep="",header=FALSE))
?mat1%*%mat2
?# ??? V1? V2? V3
#[1,] 792 630 500
#[2,]? NA? NA? NA
library(Matrix)
mat1m<- as(mat1...

2008 Jan 02

0

3 commits - libswfdec/swfdec_movie.c test/trace

...0 @@ swfdec_movie_render (SwfdecMovie *movie, cairo_t *cr,
cairo_pattern_t *mask;
if (movie->parent == movie->masked_by->parent) {
cairo_transform (cr, &movie->inverse_matrix);
+ rect = *inval;
} else {
- cairo_matrix_t mat;
+ cairo_matrix_t mat, mat2;
swfdec_movie_local_to_global_matrix (movie, &mat);
+ swfdec_movie_global_to_local_matrix (movie->masked_by, &mat2);
+ cairo_matrix_multiply (&mat, &mat2, &mat);
cairo_transform (cr, &mat);
- swfdec_movie_global_to_local_matrix (movie->mask...

2004 Apr 12

2

fractal calculation using fdim

.... e.g
print(dim(mat))
fd <- fdim(mat,q=2)
[1] 2743 2
[1] 2742 3
[1] 2741 4
[1] 2740 5
[1] 2739 6
[1] 2738 7
[1] 2737 8
[1] 2736 9
[1] 2735 10
[1] 2734 11
[1] 2733 12
Error in slopeopt(AllPoints, Alpha) : Object "LineP"
not found
if I change the data set to mat2 with totally
different values I would get the above error at a
dim(mat) of say
2693 52
thanks for any input.

2007 Jan 18

0

fitCopula method in R

--
Hello,
I am attempting to fit monthly stock returns to possible copula functions using
the copula package in R. Below is my code (mat2 is a 2x119 matrix of the two
stock returns):
my.cop <- normalCopula(param=.3, dim = 2, dispstr = "un")
myfit <- fitCopula(mat2,my.cop, start=.65, optim.control= list(NULL), method =
"BFGS")
myfit
Unfortunately, I continue to receive this error:
Error in optim(start, log...

2013 Jun 05

2

combining two different matrizes

Hello together,
this is ma first post, so please aplogize me if post this in the wrong
section.
I have problem concerning ma two matrizes.
After a regressione and so on, I got two matrizes
Matrixres contains the results of ma calculation.
Matrixr contains my detiene, which where Aldo used for the regression.
Please ser the following code:
#Datei einlesen
residual =

2009 Aug 10

2

strsplit a matrix

Dear all,
I am trying to split a matrix into 2 as efficiently as possible.
It is a character matrix:
1 2 3
1 "2-271" "2-367" "1-79"
2 "2-282" "2-378" "1-90"
3 "2-281" "2-377" "1-89"
I want to make 2 matrices from this, as succinctly and efficiently as
possible.
I've tried such

2010 Aug 03

4

Need help on upper.tri()

HI, I am really messing up to make a symmetrical matrix using upper.tri() & lower.tri() function. Here is my code:
> set.seed(1)
> mat = matrix(rnorm(25), 5, 5)
> mat
[,1] [,2] [,3] [,4] [,5]
[1,] -0.6264538 -0.8204684 1.5117812 -0.04493361 0.91897737
[2,] 0.1836433 0.4874291 0.3898432 -0.01619026 0.78213630
[3,] -0.8356286 0.7383247

2011 May 18

1

Need expert help with model.matrix

...e email in the function model.matrix2:
contr.identity <- contr.treatment
formals(contr.identity)$contrasts <- FALSE
contrasts <- contrasts
formals(contrasts)$contrasts <- FALSE
However, I believe this function is using contrasts = TRUE, as it doesn't
return the identity contrasts
mat2 <- model.matrix2(~ a + b, dd)
Any help here is much appreciated.
Axel.
-----------------------------------------------------------------------------
model.matrix2 <-
function (object, data = environment(object), contrasts.arg = NULL,
xlev = NULL, ...)
{
t <- if (missing(data))...

2012 Sep 14

0

problem with user defined panel function in xyplot

...) ?ts01 <- ts00[,1]
bl <- coredata(ts01)[1]
y2 <- rep(bl, length(ts01))
ymin <- min(coredata(ts01), y2)
?
#vertices for
area under y1
mat1 <-
cbind(c(index(ts01)[1], index(ts01), index(ts01)[length(index(ts01))]), c(ymin,
coredata(ts01), ymin))
?
#vertices for
area under y2
mat2 <-
cbind(c(index(ts01)[1],index(ts01), index(ts01)[length(index(ts01))]), c(ymin,
y2, ymin))
?
pp2 <-
as(mat2, "gpc.poly")
pp1 <-
as(mat1, "gpc.poly")
?
m <-max( (max(coredata(ts01)) - bl)/3,
abs(min(coredata(ts01)) - bl)/3)
m1 <- bl+m
m2 <- bl+2...

2013 Mar 18

4

Why stacking rasters return NAs?

I have several rasters that I want to do some calculations ,basically
calculating the moving average.
dir2 <- list.files("D:\\2010+2011", "*.bin", full.names = TRUE)
saf=stack(dir2)
movi <- overlay(stack(saf),fun=function(x) movingFun(x, fun=mean,
n=3, na.rm=TRUE))
Error in .overlayList(x, fun = fun, filename = filename,

2007 Mar 25

1

anova-interaction

HI,
I am trying to perform ANOVA with 2 factors:
material (3), temperature(3). The interaction is significant. I tried
something like, ( summary(avt, split=list("temp:mat"=list("15"=1,
"70"=2, "125"=3))) is not correct).
Thanks,
av <- aov(time ~ mat*temp, data=dados)
avt <- aov(time ~ temp/mat)
summary(avt,

2009 Feb 13

0

Wine release 1.1.15

...te file.
localspl: Move provider functions to a seperate file.
winspool: Move EnumPortsW to the backend.
spoolss: Implement EnumMonitors.
comctl32/tests: The status control use a different formula in XP and up for the height.
Dmitry Timoshkov (6):
winex11.drv: The MAT2 parameter of GetGlyphOutline is mandatory.
wineps.drv: The MAT2 parameter of GetGlyphOutline is mandatory.
gdi32: The MAT2 parameter of GetGlyphOutline is mandatory.
gdi32: Add a test for the MAT2 parameter of GetGlyphOutline, make it pass under Wine.
mlang: Get rid of ICOM_...

2006 Feb 28

2

vector math: calculating a rolling 12 row product?

I have a dataframe of numeric values with 30 ?rows?
and 7 ?columns?.
For each column, beginning at ?row? 12 and down to
?row? 30, I wish to calculate the ?rolling 12 row
product?. I.e., within each column, I wish to
multiply all the values in row 1:12, 2:13,
19:30.
I wish to save the results as a new dataframe, which
will have 19 rows and 7 columns.

2009 Feb 06

0

RExcel waiting for OLE action

..., send-to-R, run R, retrieve-from-R
macro.
Call Rinterface.StartRServer
Call Rinterface.RRun("rm(list = ls())")
Call Rinterface.RRun("dev.off()")
Call Rinterface.PutArray("mat1", Range("DATA_INPUT_OUTPUT!B7:I506"))
Call Rinterface.PutArray("mat2", Range("DATA_INPUT_OUTPUT!J7:Q506"))
Call Rinterface.PutArray("cpd", Range("DATA_INPUT_OUTPUT!A7:A506"))
Call Rinterface.PutArray("name_of_assay_one",
Range("DATA_INPUT_OUTPUT!B1"))
Call Rinterface.PutArray("name_of_assay_two...

2010 Aug 25

3

approxfun-problems (yleft and yright ignored)

Dear all,
I have run into a problem when running some code implemented in the
Bioconductor panp-package (applied to my own expression data), whereby gene
expression values of known true negative probesets (x) are interpolated onto
present/absent p-values (y) between 0 and 1 using the *approxfun -
function*{stats}; when I have used R version 2.8, everything had
worked fine,
however, after