similar to: How to generate multiple squre Orthogonal matrices?

Displaying 20 results from an estimated 11000 matches similar to: "How to generate multiple squre Orthogonal matrices?"

2001 Apr 09
4
fastest R platform
Hello, everyone! I picked up R several months ago and have adopted it as my choice for statistical programming. Coming from a Java background, I can honestly say that R is not only free, it is better tha S-plus: the lexical scope in R makes it very simple to simulate Java's object model. For this, I encourage everyone to read the artcle: Robert Gentleman and Ross Ihaka (2000) "Lexical
2004 Nov 02
2
Matrix decomposition: orthogonal complement
Hello, How I can compute in R the orthogonal complement of one matrix? If A (n x m ) matrix of full column rank (n>m), its orthogonal complement is denoted by A_ . A_ is n X (n-m) matrix of full column rank and such that A'A_=0. I need to compute A_. How I can compute A_ in R? Best Regards, /Florin -- Florin G. Maican Ph.D. candidate, Department of Economics School of
2003 Aug 13
3
A question on orthogonal basis vectors
Hey, R-listers, I have a question about determining the orthogonal basis vectors. In the d-dimensinonal space, if I already know the first r orthogonal basis vectors, should I be able to determine the remaining d-r orthognal basis vectors automatically? Or the answer is not unique? Thanks for your attention. Fred
2006 Jul 10
1
Query:chi-squre test
Hi, I have calculated chi-square goodness of fit test,Sample coming from Poisson distribution. please copy this script in R & run the script The R script is as follows ########################## start ######################################### No_of_Frauds<- c(4,1,6,9,9,10,2,4,8,2,3,0,1,2,3,1,3,4,5,4,4,4,9,5,4,3,11,8,12,3,10,0,7) lambda<- mean(No_of_Frauds) # Chi-Squared
2009 Apr 21
4
My surprising experience in trying out REvolution's R
I care a lot about R's speed. So I decided to give REvolution's R (http://revolution-computing.com/) a try, which bills itself as an optimized R. Note that I used the free version. My machine is a Intel core 2 duo under Windows XP professional. The code I run is in the end of this post. First, the regular R 1.9. It takes 2 minutes and 6 seconds, CPU usage 50% Next, REvolution's R.
2008 Aug 13
3
issue building dataframes with matrices.
Hello, Is this a bug or a feature? I am using R 2.7.1 on Apple OS X. > y <- matrix(1:3,nrow=3) # y is a single-column matrix > df <-data.frame(x=1:3,y=y) > sapply(df,data.class) x y "numeric" "numeric" > df$yy <- y > sapply(df,data.class) x y yy "numeric" "numeric" "matrix"
2011 Oct 05
6
reporting multiple objects out of a function
Dear folks, I?m trying to build a function to create and make available some variables I frequently use for testing purposes. Suppose I have a function that takes some inputs and creates (internally) several named objects. Say, fun1 <- function(x, y, z) {obj1 <- x; obj2 <- y; obj3 <- z <missing stuff> } Here is the challenge: After I run it, I want the objects to be
2006 Jan 19
4
multiple database in the same actions?
Hi, I read the example in http://wiki.rubyonrails.com/rails/pages/HowtoUseMultipleDatabases, it show us how to connect to other database, each time we start a new action, however, this doesn''t work while you try to connect to two different database within the same action. SO I wonder is it possible to bind to two or more database within the same action???? Thanks you very much Saiho
2004 Feb 15
1
manova() with a data frame
I'm trying to learn to use manova(), and don't understand why none of the following work: > data(iris) > fit <- manova(~ Species, data=iris) Error in lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) : incompatible dimensions > fit <- manova(iris[,1:4] ~ Species, data=iris) Error in model.frame(formula, rownames, variables, varnames, extras,
2011 Aug 28
2
converting matrix in array
Hi everyone, have a small problem trying to converting a dataset in matrix form to an array. Specifically: data include 3D measurement -x,y,z of 59 points in 36 objects. They are stored as a matrix (x) of 2124 rows and 3 columns. What I want to do is to extract each subject's dataset using an array (b). Accordingly, I tried the following command: b<-array(a,c(59,3,36)). The problem is
2005 Jan 11
5
global objects not overwritten within function
Dear useRs, I have a function that creates several global objects with assign("obj",obj,.GlobalEnv), and which I need to run iteratively in another function. The code is similar to f <- function(...) { assign("obj",obj,.GlobalEnv) } fct <- function(...) { for (i in 1:1000) { ... f(...) ...obj... rm(obj) #code fails without this line } } I don't understand
2012 Jul 24
1
Function for ddply
Hello, all. I'm new to R and just beginning to learn to write functions. I know I'm out of my depth posting here, and I'm sure my issue is mundane. But here goes. I'm analyzing the American National Election Study (nes), looking at mean values of a numeric dep_var (environ.therm) across values of a factor (partyid3). I use ddply from plyr and wtd.mean from Hmisc. The nes requires a
2004 Jan 16
2
reference to objects
Hi, is there a way to reference to a data object without copying it? For example I have a huge matrix called dist and I want two objects obj1 and obj2 to have a memeber dist that points to the matrix, but I don't want, for memory reasons, to copy the matrix twice. As far as I understand the following code will generate three copies of my data: dist <- some_code_that_generates_data
2006 Jul 07
3
attach and detach question
I have a large R program that I am constantly running over and over again. At the beginning of this program, I create a hige matrix and a huge dataframe but these are constant. What I mean by constant is that, if I run the program over later, I really should just use the old matrix and dataframe ( if they exist ) that were created in a previous run so that the program doesn't have to spend
2008 Oct 07
1
Mac crash- Probably memory problem
Dear all, I am running a code using bootstraps for estimating standard errors but the mac crashes. When I use small number of bootstraps (100) it works fine but if I increase that number it crashes. Thanks in advance dimitris The code, the error and my mac characteristics are the following: ##############code##################### qr.1<- rq(y~factor(year)+factor(state)+x1+I(x^2)+I(x^3),
1998 May 13
1
all.equal
I need the function all.equal which is in Splus but not yet in R. Below is a first cut. Comments would be appreciated. Paul Gilbert _______ all.equal <- function(obj1, obj2, ...) {if(mode(obj1) != mode(obj2) ) return("modes differ.") if(class(obj1) != class(obj2)) return("classes differ.") if(! all(unlist(attributes(obj1)) ==
2001 Dec 19
1
Pearson residuals in quasi family
Hi all, This is a very silly question or something escapes me: Let obj a simple gam poisson model. Let >obj<-gam(....,family=poisson) >obj1<-update(obj, family=quasi(link="log", var="mu")) >From summary.glm(obj1) the dispersion parameter is estimated 1.165; In fact it is: > (predict(obj1, se.fit=T)$se.fit[1:5]/predict(obj, se.fit=T)$se.fit[1:5])^2 4
2010 Mar 08
2
fit a gamma pdf using Residual Sum-of-Squares
Hi all, I would like to fit a gamma pdf to my data using the method of RSS (Residual Sum-of-Squares). Here are the data: x <- c(86, 90, 94, 98, 102, 106, 110, 114, 118, 122, 126, 130, 134, 138, 142, 146, 150, 154, 158, 162, 166, 170, 174) y <- c(2, 5, 10, 17, 26, 60, 94, 128, 137, 128, 77, 68, 65, 60, 51, 26, 17, 9, 5, 2, 3, 7, 3) I have typed the following code, using nls method:
2010 Mar 05
1
Changing the Prompt for browser()
Is there a way that I can change the prompt for within a browser() call. I often use use code like > with(obj1,browser()) Browse[1]> Is there a way that I can set it so that I can get something like > with(obj1,browser(prompt="obj1")) obj1[1]> I know that prompt is not a valid option for browser, but it would be nice if it were. There is an option('prompt")
2010 Mar 05
1
Changing the Prompt for browser()
Is there a way that I can change the prompt for within a browser() call. I often use use code like > with(obj1,browser()) Browse[1]> Is there a way that I can set it so that I can get something like > with(obj1,browser(prompt="obj1")) obj1[1]> I know that prompt is not a valid option for browser, but it would be nice if it were. There is an option('prompt")