[R] How to do varimax rotation for principal component based factor analysis, any packages?

2006-04-16 Thread Yong Wang
Dear R users the factanal pacakge is always MLE, which package can do varimax rotation with the results from princomp ? thank you yong __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting

Re: [R] string vector indices

2006-04-16 Thread Philipp Pagel
On Sun, Apr 16, 2006 at 12:26:29AM -0400, Luke wrote: x - a, aab y - a, aa, aab, aabc. Is there any R function to get the indices of y for the elements of x, that is, foo(x, y) will give me the index vector c(1, 3)? match(x, y) cu Philipp -- Dr. Philipp Pagel

Re: [R] How to do varimax rotation for principal component based factor analysis, any packages?

2006-04-16 Thread ronggui
I don't think the result from _princomp _ should be rotated. The definition of principal components explicitly indicates that the result is to have axes that are uncorrelated and line up in directions of maximum variance. If I am wrong,I hope some one else to point it out. 2006/4/16, Yong Wang

Re: [R] permutation of rows of a matrix

2006-04-16 Thread Manuel López-Ibáñez
Dear John, I understand what you mean. However, when someone is learning R for the first time or have little experience, such examples help to understand the connection of different parts of the language. Moreover, things that make sense once you know them, can be difficult to relate in the

Re: [R] solve matrix

2006-04-16 Thread Peter Dalgaard
Nongluck Klibbua [EMAIL PROTECTED] writes: Hi R-users, I try to use solve to find the answer of this linear equation a=x*b where a is 2*1 matrix and b is 2*2 matrix.I would like to get x so I call y-solve(a,b) but this one happen a is 2*1 matrix so what I should do . Thanks Luck First

Re: [R] How to do varimax rotation for principal component based factor analysis, any packages?

2006-04-16 Thread Prof Brian Ripley
On Sun, 16 Apr 2006, ronggui wrote: I don't think the result from _princomp _ should be rotated. The definition of principal components explicitly indicates that the result is to have axes that are uncorrelated and line up in directions of maximum variance. If I am wrong,I hope some one else

Re: [R] permutation of rows of a matrix

2006-04-16 Thread John Fox
Dear Manuel, I do understand your point of view, and think that it is reasonable, but in this case, I disagree. It wouldn't hurt to have an example in ?sample of using a permutation to index a matrix, but this is one of many uses of permutations and it is not possible to show or even to

Re: [R] string vector indices

2006-04-16 Thread Marc Schwartz
On Sun, 2006-04-16 at 11:48 +0200, Philipp Pagel wrote: On Sun, Apr 16, 2006 at 12:26:29AM -0400, Luke wrote: x - a, aab y - a, aa, aab, aabc. Is there any R function to get the indices of y for the elements of x, that is, foo(x, y) will give me the index vector c(1, 3)? match(x,

Re: [R] dcolumn

2006-04-16 Thread Frank E Harrell Jr
Brian Quinif wrote: Does anyone out there use dcolumn=TRUE in the latex() function in the Hmisc library? I would like to line up the data in a latex table I'm making using latex(), but I'm having some issues with this feature. Since there is no description of it in the help, I thought that

Re: [R] matching identical row names

2006-04-16 Thread John Kane
Dear Dr. Fox Your reply to Sirinivas Iyyar was most helpful to me. I am trying to collapse some categories of a data.frame in a similar way. I have a data frame in the form below Prog Sub.Program Job V1 V2 V3 1 Alpha A 1 2 3 2 Alpha

Re: [R] matching identical row names

2006-04-16 Thread John Fox
Dear John, You can use aggregate(), also described in my suggestion to Sirinivas: aggregate(Data[, 4:6], Data[1:3], sum) Prog Sub.Program Job V1 V2 V3 11 Alpha A 3 4 5 22 Alpha A 3 4 1 32 Alpha B 2 3 1 42 Gamma B 3 5 6 I hope this

Re: [R] matching identical row names

2006-04-16 Thread John Kane
This was immensely helpful ! I had tried aggregate() , messed it up and decided that I must have misunderstood its use vs by() and so posted my question to you. Instead I must have had a typo in there somewhere . I went back, did it again and it is lovely. I was going to have to 'slice

[R] Predict nls new data with se.fit snf intervals

2006-04-16 Thread Jiawei Yan
Using R to predict.nls() using new data, `se.fit' and `interval' are ignored. . Is there any update for this? Anybody has those routine or may advise me how to do that? Thanks [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch

Re: [R] [S] Problems with lme and 2 levels of nesting:Summary

2006-04-16 Thread Douglas Bates
I have taken the liberty of including the R-help mailing list on this reply as that is the appropriate place to discuss lmer results. On 4/5/06, Andreas Svensson [EMAIL PROTECTED] wrote: Hello again I have now recieved some helpful hints in this matter and will summarize them but first let me

Re: [R] generalized hypergeometric function

2006-04-16 Thread Ben Bolker
Marc Schwartz MSchwartz at mn.rr.com writes: On Sat, 2006-04-15 at 20:59 -0300, Bernardo Rangel tura wrote: Hi R-masters I need compute generalized hypergeometric function. I look in R-project and R-help list and not find nothing about generalized hypergeometric function Is

[R] Var.calc in Match()

2006-04-16 Thread Brian Quinif
Does anyone else find that using the Var.calc option (for heteroscedasticity consistent std. errors) in Match() (from the Matching library) slows down computation of the matching estimator by a lot? I don't really understand why when I use this option it slows down so much, but for me it does

Re: [R] logistic regression model with non-integer weights

2006-04-16 Thread Ramón Casero Cañas
Michael Dewey wrote: At 17:12 09/04/06, Ramón Casero Cañas wrote: I am not sure what the problem you really want to solve is but it seems that a) abnormality is rare b) the logistic regression predicts it to be rare. If you want a prediction system why not try different cut-offs (other

Re: [R] generalized hypergeometric function

2006-04-16 Thread Marc Schwartz
On Sun, 2006-04-16 at 17:54 +, Ben Bolker wrote: Marc Schwartz MSchwartz at mn.rr.com writes: On Sat, 2006-04-15 at 20:59 -0300, Bernardo Rangel tura wrote: Hi R-masters I need compute generalized hypergeometric function. I look in R-project and R-help list and not find

Re: [R] logistic regression model with non-integer weights

2006-04-16 Thread Rick Bilonick
On Sun, 2006-04-16 at 19:10 +0100, Ramón Casero Cañas wrote: Thanks for your suggestions, Michael. It took me some time to figure out how to do this in R (as trivial as it may be for others). Some comments about what I've done follow, in case anyone is interested. The problem is a)

[R] summary stats

2006-04-16 Thread Neil Hepburn
I have a data set that has student test scores along with several categorical variables. I would like to generate a set of summary stats (mean, variance, n) for the data grouped by school authority and by exam topic. I have tried the by() function but that seems to only be able to handle one

Re: [R] summary stats

2006-04-16 Thread Christos Hatzis
You could use aggregate: agg.mean - aggregate(my.data, by=list(Board, Subject), FUN=mean) The caveat is that you can only use one aggregator function at a time. You could rerun the same for FUN=var and FUN=length to get the additional aggregate statustics that you need and then cbind the

Re: [R] logistic regression model with non-integer weights

2006-04-16 Thread Frank E Harrell Jr
Ramón Casero Cañas wrote: Michael Dewey wrote: At 17:12 09/04/06, Ramón Casero Cañas wrote: I am not sure what the problem you really want to solve is but it seems that a) abnormality is rare b) the logistic regression predicts it to be rare. If you want a prediction system why not try

[R] a question on df of linear model

2006-04-16 Thread Joe Moore
Dear R-users: On page 155 of Mixed-effects Models in S and S-Plus, the degree of freedoms of the anova comparison of lme and lm are 8 and 5. But when I use the following SAS code: proc glm data=ortho2; class gender; model distance = age|gender / solution ; run; The df is 3. Could you

[R] Reading SPSS .sav files

2006-04-16 Thread David Kaplan
Greetings, How to I read in SPSS .sav files into R. Thank you. David = David Kaplan, PhD Professor of Education School of Education University of Delaware Newark DE 19716 Voice:

Re: [R] summary stats

2006-04-16 Thread John Fox
Dear Neil, Coincidentally, more or less the same question was asked on r-help yesterday and today. You can use either the by() function or aggregate(), though you'll have to do a bit of work on the result if you want it to look just like your example. I hope this helps, John

Re: [R] Reading SPSS .sav files

2006-04-16 Thread John Fox
Dear David, There is the read.spss() function in the foreign package, and spss.get() in Hmisc. The former is a part of the standard R distribution, so you could have discovered it via, e.g., help.search(SPSS) I hope this helps, John John Fox Department of

Re: [R] Reading SPSS .sav files

2006-04-16 Thread Peter Dalgaard
David Kaplan [EMAIL PROTECTED] writes: Greetings, How to I read in SPSS .sav files into R. with read.spss() (package foreign) Thank you. David ... PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Did you? Following the pointers in there should be enough

Re: [R] Reading SPSS .sav files

2006-04-16 Thread Austin, Matt
I don't use SPSS, so I can't help with the details. That being said, have you looked at the foreign package? --Matt Matt Austin Statistician Amgen, Inc 800 9AMGEN9 x77431 805-447-7431 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of David Kaplan Sent:

Re: [R] logistic regression model with non-integer weights

2006-04-16 Thread Ramón Casero Cañas
Frank E Harrell Jr wrote: This makes me think you are trying to go against maximum likelihood to optimize an improper criterion. Forcing a single cutpoint to be chosen seems to be at the heart of your problem. There's nothing wrong with using probabilities and letting the utility possessor

Re: [R] logistic regression model with non-integer weights

2006-04-16 Thread Frank E Harrell Jr
Ramón Casero Cañas wrote: Frank E Harrell Jr wrote: This makes me think you are trying to go against maximum likelihood to optimize an improper criterion. Forcing a single cutpoint to be chosen seems to be at the heart of your problem. There's nothing wrong with using probabilities and

[R] Problem getting R's decision tree for Quinlan's golf example data

2006-04-16 Thread Alan Lapedes
Newbie question, but I've checked archives etc. Am trying to reproduce in R Quinlan's trivial example of the golf decision tree. The data file of 14 examples follows (read in via read.table()): Outlook Temperature Humidity Windy PlayDontPlay 1 sunny 85 85 false DontPlay 2 sunny 80 90 true

[R] survfit with newdata and individual=TRUE

2006-04-16 Thread Chris Adolph
I'm using the survfit() function with the Cox proportional hazards model, and having trouble producing fitted survivor curves when I ask survfit to use newdata recorded over multiple periods for the same individual. I'm using the counting process formulation, as I have time-varying

[R] R-vim suite

2006-04-16 Thread Jose Quesada
Hi All, If you use vim to edit R code, you may be interested in this. I have put together a personalized syntax file, some code templates, and a way to send code from Vim to R using autoHotKeys (windows). http://www.andrew.cmu.edu/user/jquesada/RvimSuite/instructions.html Actually, the little

Re: [R] suse 10.0

2006-04-16 Thread Ro
Ups...the links are: http://fawn.hsu-hh.de/~steuer/SL-10.0-OSS/ http://mirrors.kernel.org/opensuse/distribution/SL-10.0-OSS/inst-source/ On 15/04/06, Detlef Steuer [EMAIL PROTECTED] wrote: Hi, you can add a repository for R found on my server: http://fawn.hsu-hh.de ~steuer/SL-10.0-OSS

Re: [R] Problem getting R's decision tree for Quinlan's golf exam ple data [Broadcast]

2006-04-16 Thread Liaw, Andy
See ?rpart.control. I get: golf.rp = rpart(Outlook ~ ., golf, control=rpart.control(minsplit=1)) golf.rp n= 14 node), split, n, loss, yval, (yprob) * denotes terminal node 1) root 14 9 rain (0.2857143 0.3571429 0.3571429) 2) Temperature 71.5 6 2 rain (0.167 0.667

[R] autoscall the y-axis

2006-04-16 Thread Fred J.
Dear R users I need to auto scale the left y axis in the code below, so that when I scroll left or right the left y-axis scale changes to accumulate the range of the displayed data with in the max hight of the y-axis. also how can I make the crosshair horizontal since it is only

[R] interaction terms in formula of lm or glm

2006-04-16 Thread Luke
I would like to include pairwise interaction terms for lm(). For example, I want to include the quadratic term of variable V3. my.formula y ~ 1 + V1 + V3 + V3:V3 my.data y V1 V2 V3 1 31 1 42 140 2 32 0 43 120 3 33 0 57 150 4 34 0 55 132 foo - lm(my.formula, data = my.data)

Re: [R] interaction terms in formula of lm or glm

2006-04-16 Thread Christos Hatzis
If you want the quadratic term, you need to pass it as an argument in function I(): y ~ 1 + V1 + V3 + I(V3^2) This is documented in ?formula -Christos -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Luke Sent: Monday, April 17, 2006 12:08 AM To: