Dear Simona, See the ncv.test() function in the car library, available at <http://socserv.socsci.mcmaster.ca/jfox/Books/Companion/car.html>. I hope this helps, John -- John Fox Department of Sociolog
Dear Sohail, One way would be, Data <- as.data.frame(matrix(NA, 65000, 37)) John -- John Fox Department of Sociology McMaster University Hamilton, Ontario Canada L8S 4M4 905-525-9140x23604 http://soc
Dear John, As the error message suggests, t.test() doesn't return a vector or matrix -- it returns an object with several elements, one of which (presumably "statistic") you want to bootstrap. Try bo
Dear Mark, In my version of S-PLUS (6.2 for Windows), data.frame(cbind(a,b,c,d)) does produce a data frame with column names "a", "b", "c", and "d". But why the cbind()? If some columns are character
Dear Glenn, deparse(substitute()) will do what you describe: [1] "jj.df" I hope this helps, John Quick question. I know that I can use the get function to retreive an object from it's character strin
Dear Eva, There's probably a more elegant solution based on something like do.call(), but I don't see it. The following should work, however (where matrices is your list of matrices): S <- matrix(0,
Dear Henrik, It doesn't work for me: Problem in +: argument number 4 in call not matched: "+"(structure(c(1, 2, 3, 4), c(2, 2), N ULL), structure(c(5, 6, 7, 8), c(2, 2), NULL), structure(c(9, 10, 11,
Dear Joe, t() works on data frames, so all you need do is t(your.data.frame). Of course, this likely only makes sense if all of the columns of your.data.frame are numeric, and a numeric matrix will r
Dear Chris, The following function is from my Rcmdr package for R, and is a slightly modified version of a solution contributed by Brian Ripley to the R-help list: levene.test <- function(y, group) {
Dear Naomi, At 07:47 AM 1/9/2004 -0500, Naomi B. Robbins wrote: Apologies. I should have been more specific. There is a chapter on roses in Wainer's "Visual Revelations." Florence Nightingale introdu
Dear Joe, I believe that what you're referring to is Stevens's Law in psychophysics, which states that the perceived strength of a stimulus is proportional to some power of the physical stimulus, wit
Dear Spencer and Ping Zhang, The sem package in R estimates structural equation models by maximum likelihood (assuming multinormality) not by partial least squares (which I think is best thought of a
Dear Christoph, plot(x, y, axes=FALSE) axis(2) axis(1, at=seq(1, 9, by=2), labels=LETTERS[1:5]) box() I hope that this helps, John Using the command line (and avoiding using "GuiCreate"), how can I s
Dear Jag, If you mean random combinations, sample(1:13,3) will do the trick; if you mean all combinations, there's code for this problem in Venables and Ripley's S Programming (p. 49). I hope that th
Dear Greg, Other solutions have been posted to the list. The code for Venables and Ripley's subsets function -- a very clear solution based on recursion -- is available in the complements for their b
Dear Gary, ifelse *is* a vectorized conditional, and (unless I misunderstand what you want to do more generally) your example can be reproduced using cascading ifelses: + ifelse(c(T,F,F,F,F,F),7:12,
Dear Mark, I have the following problem that I have spent a lot of time on but I can't figure out. I have a string called tickerstring that might be "ANL LN32" and i want to get rid of the digit piec