similar to: array(list(),c(2,5)) gives error in R 1.8.1

Displaying 20 results from an estimated 40000 matches similar to: "array(list(),c(2,5)) gives error in R 1.8.1"

2023 Dec 11
1
Base R wilcox.test gives incorrect answers, has been fixed in DescTools, solution can likely be ported to Base R
While using the Hodges Lehmann Mean in DescTools (DescTools::HodgesLehmann), I found that it generated incorrect answers (see <https://github.com/AndriSignorell/DescTools/issues/97> https://github.com/AndriSignorell/DescTools/issues/97). The error is driven by the existence of tied values forcing wilcox.test in Base R to switch to an approximate algorithm that returns incorrect results - see
2005 Apr 21
2
apply vs sapply vs loop - lm() call appl(y)ied on array
Christoph -- There was just a thread on this earlier this week. You can search in the archives for the title: "refitting lm() with same x, different y". (Actually, it doesn't turn up in the R site search yet, at least for me. But if you just go to the archive of recent messages, available through CRAN, you can search on refitting and find it. The original post was from William
2003 Sep 24
1
storing objects (lm results) in an array
Hi I have calculated lots (>1000) of linear models and would like to store each single result as an element of a 3D matrix or a similar storage: something like glm[i][j][k] = lm(...) Since I read that results are lists: Is it possible to define a matrix of type list? Or what do you recommend? Many thanks Christoph -- Christoph Lehmann <christoph.lehmann at gmx.ch>
2003 Jun 01
6
compositional data: percent values sum up to 1
again, under another subject: sorry, maybe an all too trivial question. But we have power data from J frequency spectra and to have the same range for the data of all our subjects, we just transformed them into % values, pseudo-code: power[i,j]=power[i,j]/sum(power[i,1:J]) of course, now we have a perfect linear relationship in our x design-matrix, since all power-values for each subject sum up
2004 Mar 29
2
c() question
Hi I need to define the following c("one group" = class.weight[2], "other group" = class.weight[1]) #class.weight = c(1,2) but I don't like the hard-coded way and would like to use my.group <- array(c("one group", "other group")) but now c(my.group[1] = class.weight[2], my.group[2] = class.weight[1]) gives an error how can I solve this
2003 Jun 03
3
lda: how to get the eigenvalues
Dear R-users How can I get the eigenvalues out of an lda analysis? thanks a lot christoph -- Christoph Lehmann <christoph.lehmann at gmx.ch>
2003 Sep 26
2
overlay two pixmap
Hi I need to overlay two pixmaps (library (pixmap)). One, a pixmapGrey, is the basis, and on this I need to overlay a pixmapIndexed, BUT: the pixmapIndexed has set only some of its "pixels" to an indexed color, many of its pixels should not cover the basis pixmapGrey pixel, means, for this "in pixmapIndexed not defined pixels" it should be transparent. What would you
2003 Sep 09
2
logistic regression for a data set with perfect separation
Dear R experts I have the follwoing data V1 V2 1 -5.8000000 0 2 -4.8000000 0 3 -2.8666667 0 4 -0.8666667 0 5 -0.7333333 0 6 -1.6666667 0 7 -0.1333333 1 8 1.2000000 1 9 1.3333333 1 and I want to know, whether V1 can predict V2: of course it can, since there is a perfect separation between cases 1..6 and 7..9 How can I test, whether this conclusion (being able to assign an
2003 Dec 13
1
partial proportional odds model (PPO)
Hi Since the 'equal slope' assumption doesn't hold in my data I cannot use a proportional odds model ('Design' library, together with 'Hmisc'). I would like to try therefore a partial proportional odds model Please, could anybody tell me, where to find the code and how to specify such a model ..or any potential alternatives many thanks for your kind help christoph
2003 Dec 08
2
R^2 analogue in polr() and prerequisites for polr()
Hi (1)In polr(), is there any way to calculate a pseudo analogue to the R^2. Just for use as a purely descriptive statistic of the goodness of fit? (2) And: what are the assumptions which must be fulfilled, so that the results of polr() (t-values, etc.) are valid? How can I test these prerequisites most easily: I have a three-level (ordered factor) response and four metric variables. many
2004 Feb 26
3
my own function given to lapply
Hi It seems, I just miss something. I defined treshold <- function(pred) { if (pred < 0.5) pred <- 0 else pred <- 1 return(pred) } and want to use apply it on a vector sapply(mylist[,,3],threshold) but I get: Error in match.fun(FUN) : Object "threshold" not found thanks for help cheers chris -- Christoph Lehmann <christoph.lehmann at gmx.ch>
2001 Oct 26
2
wilcox.test point estimates perverse (PR#1150)
The point estimates produced by wilcox.test are perverse (not wrong, just brain damaged). The Hodges-Lehmann estimator that goes with the signed rank test is the median of the Walsh averages. The Hodges-Lehmann estimator that goes with the rank sum test is the median of the pairwise differences. wilcox.test agrees except that it uses the following very peculiar definition of "sample
2003 Feb 26
1
calculationg condition numbers
am I right in the assumption, that for calculation of the condition numbers I have to use the correlation matrix of X, and not t(x) %*% x? > e <- eigen(t(x) %*% x) better (x must not have a first column of ones): > e <- eigen(cor(x)) > e$val [1] 6.6653e+07 2.0907e+05 1.0536e+05 1.8040e+04 2.4557e+01 2.0151e+00 > sqrt(e$val[1]/e$val) [1] 1.000 17.855 25.153 60.785 1647.478
2004 Jan 06
2
comparing classification methods: 10-fold cv or leaving-one-out ?
Hi what would you recommend to compare classification methods such as LDA, classification trees (rpart), bagging, SVM, etc: 10-fold cv (as in Ripley p. 346f) or leaving-one-out (as e.g. implemented in LDA)? my data-set is not that huge (roughly 200 entries) many thanks for a hint Christoph -- Christoph Lehmann <christoph.lehmann at gmx.ch>
2003 Sep 25
1
Error from gls call (package nlme)
Hi I have a huge array with series of data. For each cell in the array I fit a linear model, either using lm() or gls() with lm() there is no problem, but with gls() I get an error: Error in glsEstimate(glsSt, control = glsEstControl) : computed gls fit is singular, rank 2 as soon as there are data like this: > y1 <- c(0,0,0,0) > x1 <- c(0,1,1.3,0) > gls(y1~x1)
2004 Jun 25
3
sweave: graphics not at the expected location in the pdf
Hi I use sweave for excellent pdf output (thank you- Friedrich Leisch). I have just one problem. Quite often it happens, that the graphics are not at the place where I expect them, but (often on a separate page) later on in the pdf. How can I fix this, means how can I define, that I want a graphic exactly here and now in the document? Many thanks and best regards Christoph -- Christoph
2003 Nov 10
1
criterion for variable selection in LDA
Hi Since a stepwise procedure for variable selection (as e.g. in SPSS) for a LDA is not implemented in R and anyway I cannot be sure, that all the required assumptions for e.g. a procedure using a statistic based on wilks' lambda, hold (such as normality and variance homogeneity) I would like to ask you, what you would recommend me: shall I e.g. define a criterion such as the error-rate
2009 Jul 25
1
Determine the dimension-names of an element in an array in R
Hi: How can I extract the dimension-names of a pre-defined element in a multidimensional array in R ? A toy example is provided below: I have a 4-dimensional array with each dimension having certain length. In the below example, "mydatastructure" explains the structure of my data. mydatastructure = array(0, dim=c(length(b),length(z),length(x),length(d)), dimnames=list(b,z,x,d)) where,
2003 Sep 30
2
using identify() together with plot () and pixmap()
Dear R users I have a two-dimensional array, whose values I want to plot, using the pixmapGrey class. Plotting works fine, and now I would like to be able to identify some of the points in the plot using identify(). But I get the following message while pressing the left mouse button: > plot(pixmapGrey(fmri.vtc[,,slice,volume])) > identify(fmri.vtc[,,slice,volume]) warning: no point with
2009 Sep 01
3
Strange error returned or bug in gam in mgcv????
Dear friends, what is this error message in gam???? I cannot understand what it means .... is it a bug? gam_bray_scot24_pc_0505<gam(bray~s(PC1,PC2,PC3,PC4,PC5, PC1.1,PC2.1,PC3.1,PC4.1,PC5.1),data=dist_scot24_vector_with_climate) Error in if (length(data) != vl) { : missing value where TRUE/FALSE needed Calls: gam ... smooth.construct -> smooth.construct.tp.smooth.spec -> array In