Re: [R] Nested Models

2012-07-26 Thread Rolf Turner
Homework? Ask your prof. cheers, Rolf Turner On 26/07/12 11:48, stuco wrote: Hey, I'm an R noobie and I have been trying calculate SSEr and SSEc in order to determine if there is sufficient evidence to include second-order terms in my model, but I have no idea what command to use

Re: [R] ff package: reading selected columns from csv

2012-07-26 Thread Jan van der Laan
Having had a quick look at the source code for read.table.ffdf, I suspect that using 'NULL' in the colClasses argument is not allowed. Could you try to see if you can use read.table.ffdf with specifying the colClasses for all columns (thereby reading in all columns in the file)? If that w

Re: [R] Nested Models

2012-07-26 Thread peter dalgaard
On Jul 26, 2012, at 09:07 , Rolf Turner wrote: > > Homework? Ask your prof. Not necessarily, Rolf. Project work perhaps, but could also be completely extracurricular (knows theory and textbook notation, now has a real data set). I think a few hints could be in order: (a) Figure out how to f

Re: [R] Between-group variance from ANOVA

2012-07-26 Thread peter dalgaard
On Jul 25, 2012, at 14:56 , arun wrote: > Hi, > > From the ANOVA results, you could get MSE and MS of group. MSE is basically > sigma^2 error. MS group of MS between group contains sigma^2 > error+replication*sigma^2group (please check the formula. It can be slightly > different when the m

Re: [R] loop for, error: obj type 'closure' not subsetable

2012-07-26 Thread Rui Barradas
Hello, Simple, look carefully at what you have, rho is a function (type closure), the vector is rhoes. And you are trying to print rho[i], the i-th function in the "vector" called rho. print( rhoes[i] ) # works Hope this helps, Rui Barradas Em 26-07-2012 06:40, Rafael_Leon escreveu: Hi e

Re: [R] Memisc package: imported varibles from SPSS have got wrong measurement

2012-07-26 Thread Paul Bivand
David's ?measurement measurement(mz$age_variable) <- "interval" # where age_variable is the unstated item in that "select" list is what I use in similar circumstances. Where it seems to come from is the SPSS users habit of setting value labels on various categories of user-missing values - so a su

[R] optimal cut off with Epi package

2012-07-26 Thread Luigi
Dear all, I would like to calculate the optimal cut off (threshold) of a test using the Epi package. Here I am presenting some data based on the output of two tests. I am interested in identifying the optimal cut off an its 95% CI. Running the ROC() function with the Epi package I obtain a nice

Re: [R] strapply and characters adjacent to the matched pattern

2012-07-26 Thread Gabor Grothendieck
On Wed, Jul 25, 2012 at 4:34 PM, mdvaan wrote: > Thanks Gabor. That worked really well. I have been reading about the use of > POSIX and regular expressions and I tried to use your example to see if I > could ignore all matches in which the character preceding (rather than > following) the match

[R] Variables in a Tabular form. easily saved in a txt file

2012-07-26 Thread Alaios
Dear all, I would like to save few variable-names with their values in a tabular form, with that I mean that files can be printed easily in R in a tabular form and also saved in a ascii file that when one opens it see also the variables in a nice tabular format. IS that possible? Below a small

[R] scale_y_logit not present in ggplot2 0.9?

2012-07-26 Thread Francisco Javier Perez Caballero
I have updated from ggplot2 0.8.9 on Windows to ggplot 0.9.0 (and then 0.9.1) and I can't find scale_y_logit() anymore ... On Mac, I can't see scale_y_logit() in ggplot 0.9.0 either. Am I missing anything? Thanks __ R-help@r-project.org mailing list ht

Re: [R] Variables in a Tabular form. easily saved in a txt file

2012-07-26 Thread Eik Vettorazzi
Hi Alex, sprintf with left alignment might be a start: cat(sprintf("%-7s| %-12d| %-5d",paste("City",1:3,sep=""),(12345)%/%10^c(1:3),c(2,5,54433)),sep="\n") #cat has also a file option, see ?cat. but acutally your given output doesn't look like a conventional table but much more like this: cat(sp

Re: [R] Only one class shown in SVM plot?

2012-07-26 Thread Jessica Streicher
example but a wild guess: if your class information is numeric the default is to do eps-regression, not classification. Use factors or specify the type you want to use. ?svm might help there. On 25.07.2012, at 15:31, Meffy wrote: > Hello users! > I'm calculating a simple model using svm(

Re: [R] warning message while plotting taylor diagram

2012-07-26 Thread Henrik Singmann
Dear Waheed, As you correctly inferred, these are just warnings and dont need to bother you now. The maintainer/author of the taylor.diagram function should be more worried. These warnings just say that in upcoming versions of R the functions within taylor.diagram() will not work anymore. How

Re: [R] Arranging the data

2012-07-26 Thread arun
HI Namit, I did posted a reply on nabble.  Is that the solution you were looking for?? A.K. - Original Message - From: namit To: r-help@r-project.org Cc: Sent: Thursday, July 26, 2012 1:32 AM Subject: Re: [R] Arranging the data Hi Arun, Its the same question,but i need to arrange t

[R] Plot Cubist Tree

2012-07-26 Thread Dominik Bruhn
I got a regression model trained using the 'cubist' function of the 'Cubist' package. This works fine. I'm now searching for a graphical representation of the regression model: As the Cubist Algorithm is based on a forrest of trees (or a single tree if 'committees==1'), is it somehow possible to a

[R] precision warning in delaunayn function

2012-07-26 Thread Jean-Luc Dupouey
Dear R helpers, I try to use the 'delaunayn' function in the 'geometry' package for Delaunay triangulation in 2 dimensions. For the four following points, I get a warning message : > coord=matrix(ncol=2,byrow=TRUE,c(622633,7073452, + 621228,7073517, +

[R] gamma distribution in rugarch package

2012-07-26 Thread saraberta
Hi guys, does anyone know if there is the possibility to fit a gamma distribution using ugarch?honestly i don't know if maybe is possible to fix some parameters that reduce ghyp or ged in a gamma distribution.. thanks a lot sara -- View this message in context: http://r.789695.n4.nabble.com/ga

Re: [R] ff package: reading selected columns from csv

2012-07-26 Thread threshold
Dear Jan, thank you for your answer. I am basically following the code Ive been using with read.table, where x.class <- c('NULL', 'numeric','NULL','NULL','NULL', 'NULL', 'NULL') has been working fine. Reading all columns works with me but take much longer than allowed time constrains.. (460 such

[R] Gaussian model GLM summary(model)$dispersion

2012-07-26 Thread D_Tomas
Hi, I have some data that is log-normally distributed and I am using a glm, type Gaussian to fit the logs. I would like to know the expected values within the context of the lognormal model. I am unsure whether I have to use: Expected_values= exp(fitted(model)+sqrt(summary(model)$dispersion)

[R] Grofit package parameters

2012-07-26 Thread gianluca.filippa
Good afternoon, I am using the function gcFitModel() from grofit package for modelling grass growth pattern over time. Besides the usual parameters that come out from the model, i.e. A, mu and lambda, I am interested in finding the timepoint at which A is reached (what I call the day_max) . Look

[R] Get XML or JSON data from api into data frame

2012-07-26 Thread Richard Ohrvall
Dear all, I am new to R in general and ways to retrieve XML or JSON data in particular. I have tried to get information through the XML package and various websites without being able to do exactly what I want. I hope someone of you can give me some help. I want to retrieve information about movi

[R] Passing arguments to SQL Query in R

2012-07-26 Thread guruappa
Hello all, I am a newbie at R, with some experience in PERL. I have a database table that contains the following data: Name | Score === | = Sachin T | 25 Sachin T | 53 Sachin T | 57 Sachin T | 34 Rahul D | 38 Rahul D | 31 Rahul D | 53 Ricky P | 7 Ricky P | 45 Ricky P

[R] RGL

2012-07-26 Thread Guillaume Meurice
Dear all, I was willing to use the library "rgl" to plot some 3D graphics, but unfortunately, I wan't able to instal the library. The error message is below. I would be very grateful if you could give me any clues about how I can solve this. Below you will find : - installation from binaries

Re: [R] ff package: reading selected columns from csv

2012-07-26 Thread threshold
*..plus I get the following message after reading the whole set (all 7 columns):* > read.csv.ffdf(file=csvfile, header=FALSE, skip=100, first.rows=1000, > next.rows=1e7, VERBOSE=TRUE) read.table.ffdf 1..1000 (1000) csv-read=0.02sec ffdf-write=0.08sec read.table.ffdf 1001..10001000 (1000) cs

[R] PCM() non-convergence problem: how to get diagnostics?

2012-07-26 Thread Rob Forsyth
I am attempting to fit a partial credit model using the PCM() function in eRm. My data set comprises 88 items in 43 individuals with possible scores 0,1,2,3. Attempting either a PCM or RSM model fit simply hangs - no error messages but no return to command prompt and a continuously spinning "wo

[R] Adjust the position of main in par(mfrow)

2012-07-26 Thread phillen
hey guys I want two plots in one window with an overall title and with individual titles for each plots. my code: par(mfrow=c(2,1)) bp_dirverq1=boxplot(dirverq1, col="orange",horizontal=TRUE, main="Q1 2012",cex.main=0.7) bp_dirverq2=boxplot(dirverq2, col="orange",horizontal=TRUE, main="Q2 2012",

[R] Working with Numbers generated from Regression Output

2012-07-26 Thread Krunal Nanavati
Hi, I have a query on regression output generated by R. > result=lm( Y~X , data=trail) > summary(result) After running this 2 statements the following output is generated. Call: lm(formula = Y ~ X, data = trail) Residuals: Min 1Q Median 3Q Max -245.30 -90.77

Re: [R] Variables in a Tabular form. easily saved in a txt file

2012-07-26 Thread arun
HI, Not sure if this is what you are looking for. Try: dat1<-read.table(text=" Postal Code | Superb City1   |   2134  |  2 City2   |   254    |  5 City3   |   12  |  54433 ",sep="|",header=TRUE)  Postal.Code1<-paste0("|",dat1$Postal.Code) Supertb1<-paste0("|",d

Re: [R] gamma distribution in rugarch package

2012-07-26 Thread MK
I don't think it is provided and gamma is neither a special case of ghyp nor ged. Is there a reason for you to use the gamma distribution? The gamma distribution only has support for positive number and thus impossible for stock return. Cheers, M On 26/07/12 09:52, saraberta wrote: Hi guys

Re: [R] precision warning in delaunayn function

2012-07-26 Thread Keith Jewell
Does > delaunayn(scale(coord),options="Qbb") help? Keith J On 26/07/2012 08:26, Jean-Luc Dupouey wrote: Dear R helpers, I try to use the 'delaunayn' function in the 'geometry' package for Delaunay triangulation in 2 dimensions. For the four following points, I get a warning message : > co

Re: [R] ff package: reading selected columns from csv

2012-07-26 Thread Jan van der Laan
Looking at the source code for read.table.ffdf what seems to happen is that when reading the first block of data by read.table (standard 1000 lines) the specified colClasses are used. In subsequent calls the types of the columns of the ffdf object are used as colClasses. In your case the

Re: [R] ff package: reading selected columns from csv

2012-07-26 Thread Jan van der Laan
You probably have a character (which is converted to factor) or factor column with a large number of distinct values. All the levels of a factor are stored in memory in ff. Jan threshold schreef: *..plus I get the following message after reading the whole set (all 7 columns):* read.c

Re: [R] optimal cut off with Epi package

2012-07-26 Thread Frank Harrell
It is not appropriate to seek a cutoff for a test unless every patient is known to have exactly the same utility function, which is extremely rare. There is nothing wrong with developing probability models and stopping at that point, deferring the decision to the possessor of the utility function.

Re: [R] regression analysis

2012-07-26 Thread R. Michael Weylandt
Something like that should work, though you might need to construct the formula as a string: paste("y ~", names(x)[i]) instead. More worrisome is the methodology: doing 10k regressions on a single response is almost guaranteed to give spurious results. This methodological mistake has different n

Re: [R] Passing arguments to SQL Query in R

2012-07-26 Thread R. Michael Weylandt
On Thu, Jul 26, 2012 at 3:59 AM, guruappa wrote: > Hello all, > > I am a newbie at R, with some experience in PERL. > > I have a database table that contains the following data: > Name | Score > === | = > Sachin T | 25 > Sachin T | 53 > Sachin T | 57 > Sachin T | 34 > Rahul D |

Re: [R] How to draw fancy image in R?

2012-07-26 Thread R. Michael Weylandt
On Wed, Jul 25, 2012 at 11:41 PM, Manish Gupta wrote: > Hi, > > I am working on reporting and need some fancy image instead of barplot, pie > etc. Like Clock and Speedometer. How can i draw myself in R? Well, I don't know, because I have no idea what you look like :-) But you might want to

Re: [R] How to draw fancy image in R?

2012-07-26 Thread Michael Sumner
fortune() On Fri, Jul 27, 2012 at 12:26 AM, R. Michael Weylandt wrote: > On Wed, Jul 25, 2012 at 11:41 PM, Manish Gupta > wrote: >> Hi, >> >> I am working on reporting and need some fancy image instead of barplot, pie >> etc. Like Clock and Speedometer. How can i draw myself in R? > > Well, I

Re: [R] Adjust the position of main in par(mfrow)

2012-07-26 Thread R. Michael Weylandt
On Thu, Jul 26, 2012 at 4:28 AM, phillen wrote: > hey guys > > I want two plots in one window with an overall title and with individual > titles for each plots. > > my code: > > par(mfrow=c(2,1)) > bp_dirverq1=boxplot(dirverq1, col="orange",horizontal=TRUE, main="Q1 > 2012",cex.main=0.7) > bp_dirv

[R] How can I correctly access a string element of a dataframe?

2012-07-26 Thread jpm miao
Dear All, I would like to read the data file via read.csv (the 3rd line of the following program) and the file name is stored in a dataframe. Since I have several files to read, I store the file names as well as the sample period inside a file “B_M2Q.csv” and I read the file name first, and th

Re: [R] Passing arguments to SQL Query in R

2012-07-26 Thread John Kane
Let me count the ways... R supplies a number of different ways. Here is sample using basic R and some other packages. Youprobably will need to install the packages ( ?install.packages) to run any but aggregate(). mydata <- structure(list(Name = structure(c(4L, 4L, 4L, 4L, 2L, 2L, 2L, 3L, 3

Re: [R] How can I correctly access a string element of a dataframe?

2012-07-26 Thread Bert Gunter
1. m2q already is a data frame, so the m2qldf statement that follows is completely unnecessary. 2. Please read ?read.table carefully, and especially the bit about the stringsAsFactors argument. The problem is that by default character strings are read in as factors, not characters strings. So you

Re: [R] Adjust the position of main in par(mfrow)

2012-07-26 Thread Jean V Adams
Try changing your plot and outer margins. par(mfrow=c(2,1), mar=c(4, 4, 2, 1), oma=c(0, 0, 2, 0)) Jean phillen wrote on 07/26/2012 04:28:58 AM: > > hey guys > > I want two plots in one window with an overall title and with individual > titles for each plots. > > my code: > > par(mfrow=c(2

Re: [R] Get XML or JSON data from api into data frame

2012-07-26 Thread Hadley Wickham
On Thu, Jul 26, 2012 at 4:18 AM, Richard Ohrvall wrote: > Dear all, > > I am new to R in general and ways to retrieve XML or JSON data in > particular. I have tried to get information through the XML package > and various websites without being able to do exactly what I want. I > hope someone of y

Re: [R] How can I correctly access a string element of a dataframe?

2012-07-26 Thread Bert Gunter
Sorry, got cut off... On Thu, Jul 26, 2012 at 8:07 AM, Bert Gunter wrote: > 1. m2q already is a data frame, so the m2qldf statement that follows > is completely unnecessary. > > 2. Please read ?read.table carefully, and especially the bit about the > stringsAsFactors argument. The problem is that

Re: [R] Working with Numbers generated from Regression Output

2012-07-26 Thread Jean V Adams
You can learn a lot from the help files. Check out the help files for the lm() and summary.lm() functions ?lm ?summary.lm You can extract the beta values in a few different ways. These two will give you just the estimates in a vector: coef(result) result$coef These two will give you the estim

Re: [R] scale_y_logit not present in ggplot2 0.9?

2012-07-26 Thread John Kane
I think it has been moved to the scales package but I've never used it so I don't know the syntax. John Kane Kingston ON Canada > -Original Message- > From: fjpcaball...@gmail.com > Sent: Thu, 26 Jul 2012 07:41:58 -0400 > To: r-help@r-project.org > Subject: [R] scale_y_logit not present

Re: [R] Variables in a Tabular form. easily saved in a txt file

2012-07-26 Thread John Kane
It is really not clear what you want without some idea of what the variables and data look like. However if the data is in a couple of vectors you could try something like this postal <- c(2134, 54, 12) superb <- c(2,5,54433) cities <- c("City1", "City2", "City3") hds <- c("Postal.Code",

[R] Advice on multi-user server for R

2012-07-26 Thread Carrie Wager
I'm currently developing several tools in R that I'd like to deploy for use by multiple analysts in my research group. Many of the analysts have no background in using R (but have plenty of experience with SAS), so part of my effort will be in training them to use the new tools. Some of the analyse

Re: [R] warning message while plotting taylor diagram

2012-07-26 Thread yssp03
Dear Henrik Thank you so much for the clarification. Best regards waheed On Thu, Jul 26, 2012 at 9:32 PM, Henrik Singmann [via R] < ml-node+s789695n463791...@n4.nabble.com> wrote: > Dear Waheed, > > As you correctly inferred, these are just warnings and dont need to bother > you now. The maint

[R] hdf4 files

2012-07-26 Thread uday
Hi, I have problem to read hdf4 files in R, I would be very grateful if somebody can tell me how to deal with hdf4 files. I can read hdf5 using "hdf5" and "h5r" packages, but these packages does not work for hdf4 files. I was trying to open some MODIS data files those are in hdf4 format. Th

[R] SAR structure in linear mixed model in R

2012-07-26 Thread Timo Schmid
Hey, I want to estimate a spatial linear mixed model y=X\beta+Zv+e with e\sim N(0,4) and v\sim N(0,G). G is a covariance matrix of a simultaneously autoregressive model (SAR) and is given by G=\sigma_v^2((I-pW)(I-pW^T))^{-1} where p is a spatial correlation parameter and W is a matrix which desc

Re: [R] Parallel computing on Windows (foreach)

2012-07-26 Thread deep123
Hello all, My problem is similar to Sergey's. I could not try what Mario suggested, since doMPI is not available for windows. I have tried the Cedrick's commands, i.e. cl.tmp = makeCluster(rep("localhost",2), type="SOCK") registerDoSNOW(cl.tmp) but this is instead increasing the time taken. Fo

[R] Error Bars ggplot2

2012-07-26 Thread Adam Gabbert
Hello, I'm attempting to plot error bars side by side rather than stacked on top of each other with ggplot2. Here is the sample code I am using: #Code #Data spd<-c("s","f","f","s","f","s","s","s","f","f","s","f") r<-c(4.9,3.2,2.1,.2,3.8,6.4,7.5,1.7,3.4,4.1,2.2,5) #Turn spd into a factor spd.f<

[R] lda, collinear variables and CV

2012-07-26 Thread Christian Hennig
Dear R-help list, apparently lda from the MASS package can be used in situations with collinear variables. It only produces a warning then but at least it defines a classification rule and produces results. However, I can't find on the help page how exactly it does this. I have a suspicion (

[R] Package 'ordinal' question

2012-07-26 Thread Jiayi Hou
Hi all, I am using R package 'ordinal' to fit a cumulative logit ordinal model with random effects. Does someone know 1) The optimization method used in estimating the parameters from the marginal likelihood? 2) In Adaptive Gauss-Hermite Quadrautre, let f() be the function to be intergrated. The

Re: [R] strapply and characters adjacent to the matched pattern

2012-07-26 Thread mdvaan
Thanks Gabor for your invaluable help! I learned a lot. -- View this message in context: http://r.789695.n4.nabble.com/strapply-and-characters-adjacent-to-the-matched-pattern-tp4637673p4637939.html Sent from the R help mailing list archive at Nabble.com. ___

Re: [R] Get XML or JSON data from api into data frame

2012-07-26 Thread Erdal Karaca
You can try this one... # library(RCurl) library(rjson) ids <- c("tt0110074", "tt0096184", "tt0081568", "tt0448134", "tt0079367") titles <- data.frame() for ( i in 1:length(ids)) { req <- paste("http://www.imdbapi.com/?i=";, ids[i] , "&tomatoes=TRUE", sep="") u <- getURL(req) j <- fromJSON(u

[R] how to plot hazard function for coxph model?

2012-07-26 Thread suman kumar
Dear all, I have been trying to plot hazard function in R for survival data, but in vain. Can anybody help me out in plotting hazard function in R? Dr Suman Kumar -- View this message in context: http://r.789695.n4.nabble.com/how-to-plot-hazard-function-for-coxph-model-tp4637953.html Sent fro

Re: [R] Variables in a Tabular form. easily saved in a txt file

2012-07-26 Thread arun
HI, I guess this should be the one: dat1<-read.table(text=" Postal Code | Superb City1   |   2134  |  2 City2   |   254    |  5 City3   |   12  |  54433 ",sep="|",header=TRUE) write.table(dat1,"dat7.txt",sep="|",quote=FALSE) #contents of dat7.txt Postal.Code|

Re: [R] Adjust the position of main in par(mfrow)

2012-07-26 Thread phillen
thanks! the line command worked well. -- View this message in context: http://r.789695.n4.nabble.com/Adjust-the-position-of-main-in-par-mfrow-tp4637901p4637948.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mail

[R] snow apparently using only one CPU (on Mac OS X)

2012-07-26 Thread Santiago Beguería Portugués
Hi, I am trying to optimize a complex model calibration using a genetic algorithm. I choose rgenoud package because it allows for easy parallelization through snow package. I am on a Mac Pro with 2 x 2.66 GHz 6-Core Intel Xeon machine, i.e. I have 12 CPUs available. So I set the cluster optio

Re: [R] Only one class shown in SVM plot?

2012-07-26 Thread Meffy
Ok, here a simple example. The file http://r.789695.n4.nabble.com/file/n4637924/test.csv test.csv has 400 lines containing 20 columns (1. column is class label, the other 19 are the features). So what I'm doing is / data <- read.csv(file="test.csv", head=F, sep=",") names(data) <- c("Class","V1

Re: [R] Working with Numbers generated from Regression Output

2012-07-26 Thread suman kumar
Check str(lmobj). You can see the underlying structure of lm object. It is actually a list. You can access its individual components with $ operator. Bye -- View this message in context: http://r.789695.n4.nabble.com/Working-with-Numbers-generated-from-Regression-Output-tp4637919p4637957.htm

[R] Getting warning message

2012-07-26 Thread namit
Hi Friends, I have a data frame X, and I want to add “%” & “$” in row 4 and 5 respectively. when I’m trying using below logic, I’m getting warning message. Can anyone help me out on this. X: Summary G Y R T Accts582644 0 1226 AcctCov 230

Re: [R] Adding "%" symbol in middle Row

2012-07-26 Thread John Kane
Something as simple as dat1[2,2] <- "3%" where your data is in a data.frame called dat will change 3 to 3% it but it changes everything in that column to character if it was numeric. str(dat1) John Kane Kingston ON Canada > -Original Message- > From: saileshchowd...@gmail.com > S

Re: [R] Getting warning message

2012-07-26 Thread andrija djurovic
Hi. I don't know how did you create data frame X but if you check str(X) you will see that you have one or more factors inside. Try using stringsAsFactors=FALSE options while creating data frame. Hope this helps. Andrija On Thu, Jul 26, 2012 at 3:23 PM, namit wrote: > Hi Friends, > > > I have

Re: [R] Error Bars ggplot2

2012-07-26 Thread John Kane
Is this what you mean? dat1 <- data.frame( spd = c("s","f","f","s","f","s","s","s","f","f","s","f"), r = c(4.9,3.2,2.1,.2,3.8,6.4,7.5,1.7,3.4,4.1,2.2,5)) myplot<-ggplot(dat1, aes(spd, r, colour = spd)) + geom_errorbar(aes(ymin=3, ymax=5), width=.1) + geom_point() + coord_flip

Re: [R] Advice on multi-user server for R

2012-07-26 Thread R. Michael Weylandt
On Thu, Jul 26, 2012 at 7:59 AM, Carrie Wager wrote: > I'm currently developing several tools in R that I'd like to deploy for use > by multiple analysts in my research group. Many of the analysts have no > background in using R (but have plenty of experience with SAS), so part of > my effort will

Re: [R] Parallel computing on Windows (foreach)

2012-07-26 Thread R. Michael Weylandt
It's sad, but not an impossible result with synchronization overhead (though I wouldn't have guessed it would be that bad) -- can you try it on a more reasonable benchmark? Also, that advice might be somewhat out of date -- why not use the tools provided in library(parallel) available for recen

Re: [R] SSEc and SSEr

2012-07-26 Thread suman kumar
You can make different lm objects by adding all predictors and compare them with anova(lm1,lm2,lm3...). See if p value is not significant, the more complex model is not appropriate. Dr Suman Kumar -- View this message in context: http://r.789695.n4.nabble.com/SSEc-and-SSEr-tp4637855p4637963.ht

Re: [R] Getting warning message

2012-07-26 Thread arun
HI, I posted reply in nabble. One more comment regarding your code.  If your dataset is X.  I wonder how it changed to Z16.  Probably, you have to use X[5,2:5] A.K. - Original Message - From: namit To: r-help@r-project.org Cc: Sent: Thursday, July 26, 2012 9:23 AM Subject: [R] Get

[R] Testing significance of interaction between group and longitudinal change for part of the age range in a mixed linear model

2012-07-26 Thread Angela Brant
Hi all, I've fit a mixed linear model to some longitudinal data. I'm interested in the differences in patterns of decrease in the dependent variable according to group status, and my hypothesis particularly predicts a difference between the groups in trajectory of change at between specific a

[R] HELP

2012-07-26 Thread Orla Carey
Hello, I am running classification trees fro the purpose of predicting dividends. I have training and test data sets, but am running to issues when evaluating the prediction accuracy of the tree as it isn't a simple 'predict' formulation as the determinant variable is not a simple set of classifyi

[R] Using pspline in bic.surv of BMA package

2012-07-26 Thread Hui Xiong
Hi, I'm trying to using pspline in bic.surv{BMA}. # library(BMA) library(survival) data(veteran) test.bic.surv<- bic.surv(Surv(time,status) ~ karno+pspline(age,df=3)+diagtime+prior, data = veteran, factor.type = TRUE) summary(test.bic.surv, conditional=FALSE, digits=2

Re: [R] Testing significance of interaction between group and longitudinal change for part of the age range in a mixed linear model

2012-07-26 Thread Bert Gunter
1. Your post is unacceptable (imho, of course). Read the bottom of this message (re: "posting guide") and re-post properly. 2. This is not an R-help question. Re-post on r-sig-mixed-models -- or perhaps on a non-R statistical forum like stats.stackexchange.com, as this appears to have little to do

Re: [R] SSEc and SSEr

2012-07-26 Thread Bert Gunter
Sadly, your commonly held belief is wrong (imho) -- p values/statistical significance are not a legitimate decision criteria for model "appropriateness," especially scientific appropriateness. That requires more careful consideration of a relevant "utility function" (to use Frank Harrell's phrase),

Re: [R] Integrate(dnorm) with different mean and standard deviation help

2012-07-26 Thread FJ M
It would be a useful additon to the help page to add integrate(dnorm, lower = -1.96, upper = 1.96, mean = 2, sd = 1) as an example. Thanks, Frank Chicago > Date: Mon, 23 Jul 2012 19:54:45 -0700 > From: ehl...@ucalgary.ca > To: kri...@ymail.com > CC: chicagobrownb...@hotmail.com; r-help@

Re: [R] HELP

2012-07-26 Thread Bert Gunter
Your post is unacceptable (imho, of course). Read the bottom of this message (re: "posting guide") and re-post properly. -- Bert On Thu, Jul 26, 2012 at 9:30 AM, Orla Carey wrote: > Hello, > > I am running classification trees fro the purpose of predicting dividends. > I have training and test d

Re: [R] Integrate(dnorm) with different mean and standard deviation help

2012-07-26 Thread R. Michael Weylandt
I might suggest: integrate(dnorm, lower = -1.96 + 2 , upper = 1.96 + 2, mean = 2, sd = 1) instead. Incidentally, (and since I find this treatment of ... somewhat opaque) I think anonymous first class functions are much easier: integrate(function(x) dnorm(x, mean = 2, sd = 1), lower = -1.96, upp

Re: [R] package memisc: recode examples

2012-07-26 Thread John Kane
"The following object(s) are masked from 'package:A'" is equivalent to "The following object(s) from 'package:A' are masked" and perhaps that might be a more universally understood phrasing. I do find this better but I don't see any real need to change the status quo. It becomes fairly obvious af

Re: [R] HELP

2012-07-26 Thread Weidong Gu
Hi, You can try predict.rpart in rpart package for prediction on a test data. ?predict.rpart Weidong On Thu, Jul 26, 2012 at 12:30 PM, Orla Carey wrote: > Hello, > > I am running classification trees fro the purpose of predicting dividends. > I have training and test data sets, but am running t

[R] Linking to C type short?

2012-07-26 Thread Spencer Graves
Hello, All: What references exist on how to link to C? I'm familiar with sections 5.2 and 5.6 of the "Writing R Extension" manual plus chapter 6 of Venables and Ripley (2000) S Programming (Springer). From these, I get the following: R storage mode C type logical i

Re: [R] Package 'nlme' linear mixed effects model error "unexpected symbol"

2012-07-26 Thread Steve Taylor
This will work: model2007 <- You can't start an identifier with a digit. -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of msherwood Sent: Thursday, 26 July 2012 9:44a To: r-help@r-project.org Subject: [R] Package 'nlme' linear mixed

[R] Solving quadratic equation in R

2012-07-26 Thread Diviya Smith
Hi there, I would like to solve a simple equation in R a^2 - a = 8.313 There is no real solution to this problem but I would like to get an approximate numerical solution. Can someone suggest how I can set this up? Thanks in advance, Diviya [[alternative HTML version deleted]] ___

Re: [R] Solving quadratic equation in R

2012-07-26 Thread Diviya Smith
Sorry it is important for me to constrain the value of 'a' between c(0,1) On Thu, Jul 26, 2012 at 4:48 PM, Diviya Smith wrote: > Hi there, > > I would like to solve a simple equation in R > > a^2 - a = 8.313 > > There is no real solution to this problem but I would like to get an > approximate nu

Re: [R] Solving quadratic equation in R

2012-07-26 Thread Nordlund, Dan (DSHS/RDA)
> -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- > project.org] On Behalf Of Diviya Smith > Sent: Thursday, July 26, 2012 1:50 PM > To: r-help@r-project.org > Subject: Re: [R] Solving quadratic equation in R > > Sorry it is important for me to constrain t

Re: [R] Solving quadratic equation in R

2012-07-26 Thread Diviya Smith
On Thu, Jul 26, 2012 at 5:16 PM, Diviya Smith wrote: > Thank you for pointing me to the uniroot function? > > Is there a way to constrain this solution so that it only gives me values > of 'a' between c(0,1)? > > I tried using nlminb and for some reason it always estimates a = 0, even > when I cha

[R] conditional sum two dataframes

2012-07-26 Thread jcrosbie
I have two data frames. One with a matrix of months and the other with a matrix of values. The two dataframes correspond to each other. I would like to sum up all the values in by month. What would be an efficient way to do this? a=C(2,3,5,2,3,5) b=c(2,6,3,2,6,3) c=c(2,6,7,2,6,5) months <- dat

[R] Model comparison with bayesglm

2012-07-26 Thread dao06
Dear list I have a data set involving binary responses (successes failures) for which some explanatory variables result in a quasi complete separation problem. To deal with the separation problem I tried to run a glm with "bayesglm" in the arm package. However when I try to compare different bay

Re: [R] Getting warning message

2012-07-26 Thread namit
Hi Arun, Bymistake it kept X instead of Z16. -- View this message in context: http://r.789695.n4.nabble.com/Getting-warning-message-tp4637928p4637983.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list

Re: [R] Error Bars ggplot2

2012-07-26 Thread Adam Gabbert
Hi Dennis, Part of my problem could be that I'm unsure how to nest another variable withn spd.f. Perhaps if I give a better explanation of my goal things will make more sense. My intent is to calculate two sets of confidence intervals to show the benefits of a DOE approach versus a Non-DOE appro

[R] code coverter r to C

2012-07-26 Thread suman kumar
Hi all, is there a package for converting R code into C code? Thanks. Suman -- View this message in context: http://r.789695.n4.nabble.com/code-coverter-r-to-C-tp4637999.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-projec

Re: [R] conditional sum two dataframes

2012-07-26 Thread Bert Gunter
The values need not be a data frame as the number of unique months could be different among the columns, right?. So you're going to have to rethink your data structure. Probably as a list. Once you get that straight,?tapply and friends should make it trivial, if I understand you correctly. -- Ber

[R] Sub-Directories

2012-07-26 Thread Michael Grant
I've searched hard in texts, email threads, FAQs etc. and cannot find out how to successfully utilize sub-directories below my WorkingDirectory. I can create them, and create R objects within the sub-directories but (a) the objects() command lists ONLY the objects in the WorkingDirectory and no

[R] names function not working at the 2nd place in a program

2012-07-26 Thread zz
Hello, I am using names function to name an array. It works first time when I use *as.numeric(names(myVar1)* However, at a place later, when I tried to use a very similar line of code *as.numeric(names(myVar2)*, it always returned 'numeric(0)' (or if I only type 'names(myVar2), it gave me NULL'.

Re: [R] density

2012-07-26 Thread David L Carlson
If you want a recommendation, why not use the one that comes with the manual page for density(): ?density Under bw "The default, "nrd0", has remained the default for historical and compatibility reasons, rather than as a general recommendation, where e.g., "SJ" would rather fit, see also V&R (20

Re: [R] Solving quadratic equation in R

2012-07-26 Thread Rui Barradas
Hello, Surely one of f <- function(a) a^2 - a - 8.313 curve(f, from=0, to=1) # zeros of f root <- polyroot(c(-8.313, -1, 1)) ifelse(Im(root) == 0, Re(root), root) # minimum of f optimize(f, interval=c(0, 1)) Hope this helps, Rui Barradas Em 26-07-2012 22:13, Nordlund, Dan (DSHS/RDA) escreve

Re: [R] Plotting LDA results

2012-07-26 Thread David L Carlson
You asked why you could not get two discriminant functions and that question was answered. The number of discriminant functions is one less than the number of groups (assuming you have more variables than groups). Now you are asking a different question. How to plot the discriminant boundary betwee

Re: [R] names function not working at the 2nd place in a program

2012-07-26 Thread Rui Barradas
Hello, About the cause of your problem, it's difficult to have an idea without any code. But maybe it's helpfull to know that 'names' is an attribute, so you can see its value with attr(x, "names") # just 'names' attribute attributes(x)# values of all attributes Hope this helps, Ru

Re: [R] Query

2012-07-26 Thread David L Carlson
Actually you probably want the full manual. It is here http://cran.r-project.org/doc/manuals/fullrefman.pdf -- David L Carlson Associate Professor of Anthropology Texas A&M University College Station, TX 77843-4352 > -Original Message- > From:

  1   2   >