[R] interpreting GLM results and plotting fits

2013-06-29 Thread Robert Lynch
I am trying to interpret the output of GLM and I am not sure how it is treating the factor GENDER with levels G-M and G-F. Below is the output of summary(GPA.lm) Call: glm(formula = zGPA ~ Units.Bfr.7A * GENDER, data = Master1) Deviance Residuals: Min 1Q Median 3Q Max -1.

Re: [R] Lexical scoping is not what I expect

2013-06-29 Thread Greg Snow
If you want to write really confusing code it is possible to do: `1` <- 2 `1` + 1 and things like that, but it is probably a good idea not to. On Fri, Jun 28, 2013 at 7:30 PM, Rolf Turner wrote: > On 29/06/13 02:54, John Fox wrote: > >> Dear Duncan and Steve, >> >> Since Steve's example rais

[R] How to construct a 'proper' Q-Q line in log-log space?

2013-06-29 Thread Marius Hofert
Dear expeRts, I would like to create a Q-Q plot including a Q-Q line for Gamma distributed data. The specialty is that it should be in log-log scale. For Q-Q line in log-log scale, I discovered the argument 'untf' of abline. As you can see in 2), this works fine. But for 3) it does not provide the

Re: [R] RMySQL problems in ubuntu 12.04.2

2013-06-29 Thread Leandro Marino
Sorry, the i deleted the first part of the email. Today I downloaded the Ubuntu 12.04.2 32bits to install it on the virtualbox (in a windows machine). After it i have installed R with success. Before I installed R I installed the LAMP as I show in the first email.

[R] RMySQL problems in ubuntu 12.04.2

2013-06-29 Thread Leandro Marino
Hi, o Before I install an Apache + MySQL + PHP with the following statment: *> sudo apt-get install mysql-server apache2 libapache2-mod-php5 php5 php5-mysql phpmyadmin* When i was trying to install RMySQL with install.packages() i received the following error: Could anyone help me with this? B

[R] Weighted SUR/NSUR

2013-06-29 Thread Tarquinio magalhaes
Hi, Is it possible to run SUR with weights using systemfit? I mean weighted seemingly unrelated regression (weighted SUR) or weighted nonlinear unrelated regression (weighted NSUR).  Parresol (2001) in his paper titled Additivity of nonlinear biomass equations has run weighted NSUR using PROC MODEL

Re: [R] 2SLS / TSLS / SEM non-linear

2013-06-29 Thread Paul Johnson
Please consider using the R package systemfit. It has existed for about 10 years, I've used it many times happily :) I've not used gmm package, I'm not criticizing it. But I have good results from systemfit. It has good documentation. "This package contains functions for fitting simultaneous sys

Re: [R] filling list of data frames

2013-06-29 Thread MacQueen, Don
You might gain some speed by not creating df0 and df0_1: for (i in 2:100) output.list[[i]] <- f1(output.list[[i-1]]) You can also look at the structure of the data frames. For example, if some of the elements in the data frames are factors but don't need to be factors, you might gain by preventi

Re: [R] 2SLS / TSLS / SEM non-linear

2013-06-29 Thread John Fox
Dear Hans-Christian > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- > project.org] On Behalf Of hck > Sent: Saturday, June 29, 2013 11:19 AM > To: r-help@r-project.org > Subject: Re: [R] 2SLS / TSLS / SEM non-linear > > The challenge is to firstly calcu

Re: [R] 2SLS / TSLS / SEM non-linear

2013-06-29 Thread hck
The challenge is to firstly calculate the reduced form. As far as I know, the SEM package does not do this automatically. Am I correct? -- View this message in context: http://r.789695.n4.nabble.com/2SLS-TSLS-SEM-non-linear-tp4670123p4670595.html Sent from the R help mailing list archive at N

Re: [R] To transform a dataframe

2013-06-29 Thread arun
HI, Not sure why df2 didn't include Cat3, Debut3, Fin3, instead included columns with all missing values (Cat5, Debut5, Fin5). library(plyr) library(reshape2) df1New<-ddply(df1,.(Mat),transform,castCat=paste0("Cat",Cat),castDébut=paste0("Début",Cat),castFin=paste0("Fin",Cat)) res<- join_all(list

Re: [R] Lexical scoping is not what I expect

2013-06-29 Thread William Dunlap
> > assign('TRUE', FALSE) > > TRUE > [1] TRUE > > get('TRUE') > [1] FALSE > > but it is probably a different story. The parser converts the text TRUE to the value true, not to the name 'TRUE', just as it converts the text 1 to the value one, not the name '1', before handing off the parse tr

Re: [R] what is the difference between the function "expand.grid" and "data.frame"?

2013-06-29 Thread Pascal Oettli
H ello, Did you read ?data.frame and ?expand.grid. > data.frame(x=1:2, y=1:2) x y 1 1 1 2 2 2 > expand.grid(x=1:2, y=1:2) x y 1 1 1 2 2 1 3 1 2 4 2 2 There is a small difference, isn't it? Regards, Pascal 2013/6/28 Zhaoran Zhou > Hello everyone, > > i found that both of the 2 functions

Re: [R] what is the difference between the function "expand.grid" and "data.frame"?

2013-06-29 Thread Ista Zahn
Why don't you try it and see? data.frame(x=1:5, y=letters[1:5]) expand.grid(x=1:5, y=letters[1:5]) ?data.frame ?expand.grid On Fri, Jun 28, 2013 at 8:30 AM, Zhaoran Zhou wrote: > Hello everyone, > > i found that both of the 2 functions ("expand.grid" and "data.frame") can > be used to produce d

Re: [R] what is the difference between the function "expand.grid" and "data.frame"?

2013-06-29 Thread John Kane
Just have a look at the two help pages ?expand.grid and ?data.frame. R experts will wince but I believe that you can think of a data.frame as one type of R object and expand.grid as one very specialized way to create a data.frame. I guess you can say one is an object and the other is a functio

Re: [R] Data Package Query

2013-06-29 Thread John Kane
I don't know what you think data(Trial) is doing but what it in fact is doing is trying to load a stored data set called Trial and it does not exist. Have a look at ?data to see what I mean. In your program data(Trial) is redundant, well actually closer to meaningless. Trial is already loade

Re: [R] To transform a dataframe

2013-06-29 Thread Rui Barradas
Hello, The following does what you want but the order of columns is different. reshape(df1, v.names = c("Cat", "Début", "Fin"), idvar = "Mat", timevar = "Cat", direction = "wide") Hope this helps, Rui Barradas Em 29-06-2013 10:26, Arnaud Michel escreveu: Hello I would like to tran

Re: [R] Transforming boolean subsetting into index subsetting

2013-06-29 Thread Jim Holtman
which ( abs(V - 9) <= 3 ) Sent from my iPad On Jun 28, 2013, at 17:58, Julio Sergio wrote: > One of the techniques to subset, a vector for instance, is the following: > > V <- c(18, 8, 5, 41, 8, 7) > V > ## [1] 18 8 5 41 8 7 > ( I <- abs(V - 9) <= 3 ) > ## [1] FALSE TRUE FALSE FALSE

[R] To transform a dataframe

2013-06-29 Thread Arnaud Michel
Hello I would like to transform the dataframe df1 into df2 (ie copy the data from several lines for a men/women to only one line by individu men/women) dput(df1) structure(list(Mat = c(934L, 934L, 934L, 935L, 935L, 936L, 936L, 936L, 936L, 937L, 937L, 937L, 937L), Nom = structure(c(2L, 2L, 2L,