[R] Combining characters

2012-01-04 Thread jeremy
Hi all, I'm trying to combine exhaustively several character arrays in R like: x=c("one","two","three") y=c("yellow","blue","green") z=c("apple","cheese") in order to get concatenation of x[1] y[1] z[1] ("one yellow apple") x[1] y[1] z[2] ("one yellow cheese") x[1] y[2] z[1]("one blue apple")

[R] Graphs for scientific publication ?

2015-04-30 Thread Jeremy Clark
Dear All, First of all, many thanks to all R contributors for a fantastic program, and especially to Hadley Wickham for creating ggplot2. The following is intended to be a warning that, if the apparently superficial problems described are not sorted out, R could well find itself being superceded.

Re: [R] Graphs for scientific publication ?

2015-05-04 Thread Jeremy Clark
ecently updated including IOS 8.2, OS X 10.10, Xcode 6.2. I previously, and fairly recently, installed X11 (and Xquartz), and also updated R and R Cairo, but none of this has affected the above behaviour. Any advice gratefully received. Yours sincerely, Jeremy Clark library(ggplot2) library(grid

[R] Integration using nlsLM ?

2015-06-03 Thread Jeremy Clark
Dear All - I'm trying to integrate the following function via nlsLM - and I think the problem is something to do with passing the correct arguments (error is given below) - any help gratefully appreciated - many thanks. library(minpack.lm) dOM <- function(x, mu = 0, sigma = 1, log = FALSE) {

Re: [R] Graphs for scientific publication ?

2015-06-03 Thread Jeremy Clark
The coding I've settled on to save file without clipping is: library(gridExtra) gt <- ggplot_gtable(ggplot_build(q3)) gt$layout$clip[gt$layout$name=="panel"] <- "off" gt4 <- arrangeGrob(gt) ggsave <- ggplot2::ggsave; body(ggsave) <- body(ggplot2::ggsave)[-2] ## from Baptiste ggsave("gt.pdf", plot

[R] R match - could be improved ?

2015-03-15 Thread Jeremy Clark
​Dear All, The following gives a very unpleasant experience with apparently random NAs - probably it's my bad formatting of the coding - but the effect is unexpected and if undetected can lead to considerable problems: myvector1 = NULL myvector3 = NULL myvector4 = NULL myvector5 = NULL myve

[R] mice - undefined columns selected

2014-09-11 Thread Jeremy Miles
data, , jj) : undefined columns selected I hope I'm doing something foolish, thanks, Jeremy [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting gu

[R] Difference betweeen cor.test() and formula everyone says to use

2014-10-16 Thread Jeremy Miles
2] > r.z <- fisherz(r) > se <- se <- 1/sqrt(10 - 3) > z <- r.z / se > (1 - pnorm(z))*2 [1] 0.04237039 My p-value is different. The help file for cor.test doesn't (seem to) have any reference to this, and I can see in the source code that it is doing somet

[R] simplifying output of mapply

2017-02-08 Thread jeremy adler
ggplot(p,aes(v2))+geom_density(aes(x=v2,fill=v1))+geom_histogram(aes(y=..density..),alpha=.5)+ theme(legend.position="none") g<-g+xlab(x) return(g) } m<-mapply(FUN=plt,x=c("spot_001"),y=c("Cell.Median.CD3")) So I just want the graphs (g) to be

[R] attach package

2009-08-26 Thread Jeremy MAZET
Hello, Is there a solution to attach a package without run the hook function .onAttach() Thanks Jérémy Mazet [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do rea

Re: [R] R ANOVA gives diferent results than SPSS

2010-02-11 Thread Jeremy Miles
.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > -- Jeremy Miles Psychology Research Methods Wiki: www.researchmethodsinpsychology.com __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/

Re: [R] Nonparametric generalization of ANOVA

2010-03-05 Thread Jeremy Miles
Two links for you which will get your answer much quicker than a mailing list: http://lmgtfy.com/?q=non-parametric+anova+R or http://www.justfuckinggoogleit.com/search.pl?query=non+parametric+anova+R Jeremy On 5 March 2010 05:19, blue sky wrote: > My interpretation of the relation betwee

[R] installing R on Solaris 10

2009-08-06 Thread Jeremy Willis
exist unable to fix attributes" The initial install appears to be performed and when I choose to display R project info it displays: "ld.so.1: R: fatal: libreadline.so.5: open failed: No such file or directory Killed" Any ideas as to what I am missing or forgetting? Thanks in a

Re: [R] Simple 2-Way Anova issue in R

2009-11-08 Thread Jeremy Miles
If I've understood correctly, you have cell sizes of 1. This is not enough. ANOVA compares within group variance to between group variance, and your within group variances are zero. You need more data, or to collapse some cells. Jeremy 2009/11/8 znd : > > Hello, I'm new to

Re: [R] Structural Equation Models(SEM)

2009-12-02 Thread Jeremy Miles
iance matrix at each iteration). However, the fact that it's not hard to make the change, and that no one has made the change, is another argument that it's not a change that needs to be made. Jeremy 2009/12/2 Ralf Finne : > Hi R-colleagues. > > I have been using the se

Re: [R] Bar Plots: Error Bars

2009-12-03 Thread Jeremy Baxter
) max <- apply (marks, 2, max) min <- apply (marks, 2, min) arrows(thegraph, min, thegraph, max, code=3, angle=90, length=0.125) HTH, Jeremy > Hey Everyone, > > I'm pretty new at R and wanted to try and mak

Re: [R] Non-linear regression analysis in R

2012-12-19 Thread Jeremy Miles
Could you provide the code that you're running, so we can see what you're trying to do? Even better would be a repeatable example. Jeremy On 19 December 2012 09:42, Yann Labou wrote: > Hey all, > > I'm trying to fit a non-linear model y ~ a * constant ^ b * x ^ c and &g

Re: [R] Question about Linear Regression

2012-12-28 Thread Jeremy Miles
You can run that as it is. The term to search for on Google is 'dummy coding'. Jeremy On 28 December 2012 07:45, Lorenzo Isella wrote: > > where x3 is a dichotomous variable assuming only 0 and 1 values (x1 and x2 > are continuous variables). > Is there any particular ca

[R] Rcmdr, RODBC and XLConnect conflict cause R to crash

2013-02-14 Thread Jeremy MAZET
Dear all, Since I upgraded R to the version 2.15.2, I have a strange problem which implies XLConnect, RODBC and Rcmdr packages. - If the three packages are loaded in the same R session, the use of RodbcConnect functions cause R to crash. - This crash occur only if Rcmdr is loaded. - If only

Re: [R] Interpret R-squared and cor in R

2013-02-15 Thread Jeremy Miles
ese values while > writing a report ? > > I can suggest a number of books that do this much better than I could in an email. But you probably have a favorite of your own. Jeremy [[alternative HTML version deleted]] __ R-help@r-projec

Re: [R] MIMIC latent variable with PLS Path Modelling with R ?

2013-02-16 Thread Jeremy Miles
By MIMIC do you mean multiple indicator/multiple cause? Something like this: http://www.jeremymiles.co.uk/misc/fun/img059.gif If so, you can use sem, Lavaan, or openMx. Jeremy On 13 February 2013 05:11, Hervé Guyon wrote: > I want estimate MIMIC latent variable with R in a Monte Ca

[R] Multidimensional interpolation

2013-02-25 Thread Jeremy Beaulieu
27;ve looked into several packages and none seem to interpolate across more than 3-dimensions. All the best, Jeremy Beaulieu __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://

Re: [R] Converting code to R Question

2013-02-25 Thread Jeremy Miles
2 == 1) , (item3 == 1) , (item4 == 1), na.rm=TRUE) Jeremy On 25 February 2013 17:02, Craig J wrote: > I'm learning R and am converting some code from SPSS into R. My background > is in SAS/SPSS so the vectorization is new to me and I'm trying to learn > how to NOT use loops.

[R] Loading an .RData file and assigning the loaded objects within a loop

2013-06-01 Thread Jeremy Ng
workspace object name. Is there anyway for each individually read in Rdata object to be assigned a new name? Thanks! JEremy [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help

[R] Replacing strings to numbers

2013-07-02 Thread Jeremy Ng
not necessarily AA,AT, or TT. Any ideas? Thanks! Jeremy [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting

[R] loglogistic survreg

2012-09-17 Thread Jeremy Brown
Hi, I'm trying to graph the hazard function using the survreg function with the distributional assumptions to be loglogistic. If h(t)=[lambda*alpha*(lambda*t)^(alpha-1)]/[1+(lambda*t)^alpha], what output from R is alpha? Thanks [[alternative HTML version deleted]]

Re: [R] Error: object 'CO2' not found

2012-10-22 Thread Jeremy Miles
You need to load the dataset. First, run data(CO2) Then it should work. Jeremy [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http

[R] Searching up a list of values

2012-10-26 Thread Jeremy Ng
1.06653 1.43876 2.15272 0.69042 0.66962 2.02502 0.7646 And this is how file A looks like: 2620456 2830090 2575215 2849041 How do I actually extract and export the corresponding values for A in B? Thanks in advanced! Jeremy [[alternative HTML version deleted

Re: [R] Lavaan Model Specification

2014-04-30 Thread Jeremy Miles
lCallBehav ~~ congressmenPerceptConstiuentAttitudes rollCallBehav ~~ congressmanAttitudes And your model runs, with 0 df. Your latent variable does nothing, becuase you only only have one variable which relates to it. Jeremy P.S. There's a lavaan group on google groups. On 30 April 2014 08:02, Patzelt

Re: [R] R for Android

2014-05-08 Thread Jeremy Miles
It exists: https://play.google.com/store/apps/details?id=com.appsopensource.R No graphics. Jeremy On 8 May 2014 05:44, Kevin E. Thorpe wrote: > This is a question asked purely out of idle curiosity (and may also be in > wrong list). Are there plans for porting R to Android devi

Re: [R] metafor package: changing decimal in forest plot to midline decimal

2014-07-07 Thread Jeremy Miles
I've found that if you want really fine control over an issue like this in a chart, the easiest thing to do is to export it as PDF, and then directly edit the chart in Illustrator (not free) or Inkscape (free). On 7 July 2014 10:21, Viechtbauer Wolfgang (STAT) < wolfgang.viechtba...@maastrichtu

Re: [R] R and SPSS

2012-11-06 Thread Jeremy Miles
ables - so check that the same variables have been removed. Jeremy On 6 November 2012 13:39, Hui Du wrote: > Hi group: > > > I have a data set, which has severe colinearity problem. While running > linear regression in R and SPSS, I got different models. I am wondering if > som

Re: [R] Replacing string in matrix with zero

2012-11-14 Thread Jeremy Miles
You can use ifelse() #Create data for example x <- matrix(data=c(Inf, 2, 3, 4, Inf, 6, 7, 8, Inf), nrow=3) #Turn Inf into zero. x <- ifelse(x == Inf, 0, x) Jeremy On 14 November 2012 14:13, Nick Duncan wrote: > Dear All, > > I have a matrix in which the diagonal has the str

Re: [R] Help for a function

2012-12-04 Thread Jeremy Miles
What are you expecting? What do you get? What is the problem? J On 4 December 2012 06:01, anoumou wrote: > Hello all, > I need a help. > I am modeling a disease and a create a R function like that: > > Lambda<-function (x,date1,r,h,a){ > ndate1 <- as.Date(date1, "%d/%m/%Y") > t1 <- as.nume

[R] Help with manipulation of matrix object

2012-12-06 Thread Jeremy Ng
viation: >sd<-apply(sample,1, sd) With both the median and the sd in hand, I want to write the probability of observing the value reported at sample[2,2] I can do this manually, but as the dataframe gets larger and larger, this becomes more time consuming; and furthermore, I wish to wri

[R] Marginal effects of ZINB models

2012-12-10 Thread Jeremy Goss
ith R code to compute overall marginal effects of each variable? My model is specified as follows: ZINB <- zeroinfl(Tot.Anglers ~ Location + Season + Daytype + Holiday.not + CPUE + ShoreType + Access + Source.pop + WindSpeed + offset(beat_length), dist="negbin", data=anglers) Man

[R] Beta-coefficients for ZINB model

2012-12-14 Thread Jeremy Goss
Dear users, Does anyone have any idea how to generate standardised beta coefficients for a ZINB model in R to compare which explanatory variables are having the greatest impact on the dependent variable? Thanks, Jeremy [[alternative HTML version deleted

[R] Passing vectors through a dataframe

2014-02-06 Thread Jeremy Clark
Dear All, I would like to be able to associate a list of vectors (one vector of which is to be called later) with some other character and numeric data. I've tried two methods: 1) I can put the vector names in quotes into the dataframe, and then extract the vector name - but this is just a charac

Re: [R] Passing vectors through a dataframe

2014-02-07 Thread Jeremy Clark
ng ?? maxtrundx maxtrundx <- mylist[[maxr[[1 ## incorrect - gives wrong vector maxtrundx ## The question is - how can I select the correct vector from the list (ie.F4287) using an object extracted from the dataframe (eg. maxr or maxr2) ?? On Thu, Feb 6, 2014 at 6:20 PM, Dunc

Re: [R] lavaan fit indices & Chronbach's alphas

2014-03-26 Thread Jeremy Miles
nt models present? > > No. Cronbach's alpha is tangentially related to SEM. Do you mean composite reliability? That's not automatic either, but it can be programmed. Jeremy [[alternative HTML version deleted]] __ R-help@r-project.o

[R] Functions in formulae ??

2013-11-21 Thread Jeremy Clark
Dear All, In the following simple case I can't seem to get an improved fit, despite trying all of the control possibilities. As there seem to be no examples anywhere which show use of functions such as "dnorm" within a formula, and as I am not confident at all that my formula is correctly configur

Re: [R] Functions in formulae ??

2013-11-26 Thread Jeremy Clark
values lines(gg, fitted(modLM4), col = 2, lwd = 2) On Thu, Nov 21, 2013 at 11:57 AM, Jeremy Clark wrote: > Dear All, > > In the following simple case I can't seem to get an improved fit, > despite trying all of the control possibilities. As there seem to be > no examples any

Re: [R] Functions in formulae ??

2013-11-26 Thread Jeremy Clark
t data plot(gg, dd10, main = "modLM4") ## plot fitted values lines(gg, fitted(modLM4), col = 2, lwd = 2) On Thu, Nov 21, 2013 at 11:57 AM, Jeremy Clark wrote: > Dear All, > > In the following simple case I can't seem to get an improved fit, > despite trying all of the

Re: [R] Is there a non-parametric repeated-measures Anova in R ?

2010-06-16 Thread Jeremy Miles
It's possible to use the ordinal regression model if your data are ordered categories. The standard non-parametric test is the Friedman test. ?friedman.test Jeremy On 16 June 2010 10:22, Tal Galili wrote: > Hello Prof. Harrell and dear R-help mailing list, > > I wish to

Re: [R] Popularity of R, SAS, SPSS, Stata...

2010-06-24 Thread Jeremy Miles
I think you need speech marks though: http://www.google.com/insights/search/#q=%22r%20code%20for%22%2C%22sas%20code%20for%22%2C%22spss%20code%20for%22&cmpt=q (There's not a lot of people looking for SPSS code ...) Jeremy On 24 June 2010 16:56, Joris Meys wrote: > Nice ide

Re: [R] Logistic regression with multiple imputation

2010-06-29 Thread Jeremy Miles
then you analyze each dataset in the conventional way, then you combine the results. There are two (that I know of) packages for imputaton - these are mi and mice. rseek.org will find them for you. Hope that helps, Jeremy On 29 June 2010 22:14, Daniel Chen wrote: > Hi, > > I am a

Re: [R] Note on PCA (not directly with R)

2010-06-30 Thread Jeremy Miles
be similar enough to start off with) found that they were three dimensional. Jeremy On 28 June 2010 02:27, Christofer Bogaso wrote: > Dear all, I am looking for some interactive study materials on Principal > component analysis. Basically I would like to know what we are actually > doing

Re: [R] R Founding

2010-09-16 Thread Jeremy Miles
any open source projects have a 'donate with paypal' button. Jeremy -- Jeremy Miles Psychology Research Methods Wiki: www.researchmethodsinpsychology.com __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE

Re: [R] can I add line breaks to the paste() function?

2010-09-30 Thread Jeremy Miles
Try using cat instead. Then "\n" is the new line character. E.g. cat("1st line\n2nd line\n") Jeremy On 30 September 2010 13:30, David LeBauer wrote: > Can I add a line break to the paste() function to return the following: > > 'this is the firs

[R] barplots with 2 different scales

2010-09-30 Thread Jeremy Claisse
Is there a way to create barplots with pairs of bars plotted on 2 different scales (i.e some bars would be plotted according to the scale on the y-axis on the left and other bars plotted according to a different scale on the right axis)? Thank you, Jeremy [[alternative HTML version

Re: [R] FDR

2010-10-07 Thread Jeremy Miles
This is correct. Wikipedia is not bad, and provides some references. Another web page: http://courses.ttu.edu/isqs6348-westfall/images/6348/BonHolmBenHoch.htm <http://courses.ttu.edu/isqs6348-westfall/images/6348/BonHolmBenHoch.htm> Jeremy On 7 October 2010 10:37, wrote: > Dea

[R] overlaying multiple contour plots

2010-10-13 Thread Jeremy Olson
element occupies on this map. Is there a way to do this in 'R'? I am fairly new to this software, so any help would be much appreciated. Thank you in advance, Jeremy [[alternative HTML version deleted]] __ R-help@r-project.org mailing

Re: [R] how do I make a correlation matrix positive definite?

2010-10-21 Thread Jeremy Miles
You could use cov2cor() to convert from covariance matrix to correlation matrix. If the correlation is >1, the matrix won't be positive definite, so you can restandardize the matrix to get a pos def correlation matrix. Jeremy On 21 October 2010 15:50, HAKAN DEMIRTAS wrote: > H

Re: [R] how do I make a correlation matrix positive definite?

2010-10-21 Thread Jeremy Miles
omeone who has not misunderstood. :) Jeremy On 21 October 2010 16:14, HAKAN DEMIRTAS wrote: > > I know. > > Let me re-phrase the question: How do I convert a non-positive definite > correlation matrix to a positive-definite correlation matrix in R? I don't > think cov2cor i

[R] R crash

2010-11-15 Thread Jeremy MAZET
We distribute several R applications using the tcltk package on different servers or PC (Windows XP). On some machines and in a not reproducible way, all the R windows disappear when using functions like tkgetSaveFile or tkchooseDirectory. The R application remains open (the Rgui.exe processus

[R] Merge() error

2010-12-13 Thread Jeremy Miles
frames does not bt <- merge( bt, np, by=("caseid"), all=TRUE) # Changed from np, bt to bt,np. The code always worked fine before, until someone 'helpfully' duplicated some of the variables across the data frames, so in addition to caseid, each also contains Autho

[R] Function to return variable name

2010-07-28 Thread Jeremy Miles
I'd like a function that returns the variable name. As in: MyData$Var1 Would return: Var1 There should be a straightforward way to do this, but I can't see it. Thanks, Jeremy -- Jeremy Miles Psychology Research Methods Wiki: www.researchmethodsinpsyc

Re: [R] A %nin% operator?

2010-08-05 Thread Jeremy Miles
Ken Williams > > > David Winsemius, MD > West Hartford, CT > > __ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html >

[R] Stopping precision using 'optim'

2010-08-05 Thread Jeremy Beaulieu
Hi all~ I am wondering if it is possible to alter the stopping precision for parameters estimated using the 'optim'? If it helps, I am minimizing the log-likelihood of a function using constraints (i.e. L-BFG-S). -Jeremy __ R-help@r-p

Re: [R] meta-analysis in R

2010-08-19 Thread Jeremy Miles
> books. Can anyone > kindly help? Thank you in advance. > We can try, but tell us what you want to do. Jeremy -- Jeremy Miles Psychology Research Methods Wiki: www.researchmethodsinpsychology.com __ R-help@r-project.org mailing list h

Re: [R] which one give clear picture-pdf, jpg or tiff?

2010-08-19 Thread Jeremy Miles
> R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible cod

Re: [R] calculations with vectors of unequal length

2011-04-27 Thread Jeremy Hetzel
See ?merge. df.1 <- data.frame(year=factor(rep(1:3,3)), level=rep(letters[1:3],3), number=c(11:19)) df.2 <- data.frame(year=factor(c(1:5)), number=c(21:25)) df.3 <- merge(df.1, df.2, by = "year") df.3$new <- with(df.3, number.x + number.y) Jeremy On Wednesday, April 2

Re: [R] setting options only inside functions

2011-04-27 Thread Jeremy Hetzel
See ?on.exit Jeremy On Wednesday, April 27, 2011 9:16:13 AM UTC-4, Jannis wrote: > > Dear list members, > > > is it possible to set some options only inside a function so that the > original options are restored once the function is finished or aborted due > to an e

Re: [R] R forum for only Statistics

2011-04-28 Thread Jeremy Hetzel
n Google Groups ( https://groups.google.com/forum/#!forumsearch/sci.stat.*). Perhaps others have a better feel for which forums are of higher quality. The sci.stat.* groups look a bit overrun with spam these days. Jeremy On Thursday, April 28, 2011 7:26:06 AM UTC-4, Vincy Pyne wrote: > > Hi!

Re: [R] Speed up code with for() loop

2011-04-28 Thread Jeremy Hetzel
ndles set.seed() randomization all.equal(Delta_ln, Delta_ln3) time.one time.two time.three as.numeric(time.three) / as.numeric(time.one) Combining parallel() with the .Internal calls reduces the elapsed time by about 70% on Ubuntu Natty. Multicore is not available for Win

Re: [R] fisher exact for > 2x2 table

2011-04-29 Thread Jeremy Miles
x27;s exact test was extended to general R×C tables by Freeman and Halton (1951), and this test is *also* known as the Freeman-Halton test." Emphasis mine. Jeremy -- Jeremy Miles Psychology Research Methods Wiki: www.researchmethodsinpsychology.com __

Re: [R] best subset regression in R

2011-05-04 Thread Jeremy Miles
ion+R , and sends me to this page: http://www.statmethods.net/stats/regression.html Jeremy -- Jeremy Miles Support Dan and Alex's school: Vote for Goethe Charter School to receive a grant from Pepsi to help build a library: http://www.refreshe

Re: [R] Results of CFA with Lavaan

2011-06-08 Thread Jeremy Miles
What do you mean by latent estimate? The table of variances has variances for each factors. Is there something different in the sem output that you don't see here? Yes, this looks normal. Jeremy On 8 June 2011 13:14, R Help wrote: > I've just found the lavaan package,

[R] Dataframe to word, using R2wd

2010-05-14 Thread Jeremy Miles
ayout. (I can't work out what the table is - it seems to be nested tables. Converting to text gives one long column.) Using wdBody(MyDataFrame) or wdNormal(MyDataFrame) Is there another way to use R2wd to send the dataframe to word? Thanks (in advance) Jeremy -- Jeremy Miles Psyc

Re: [R] HLM Model

2011-01-27 Thread Jeremy Miles
been lost. However, it appears that in R you did not dummy code them. It also appears you haven't given use all of the SAS output. Jeremy On 27 January 2011 15:52, Belle wrote: > > Hi Harold: > > I know the outputs are different between SAS and R, but the results that I > got ha

[R] Generate data from correlation matrix

2011-02-07 Thread Jeremy Miles
Hi All, I was wondering if anyone knew of a function which would generate data from a pre-specified correlation matrix (as in the Stata command r2corr) or sampled from a population with a specific covariance/correlation. (I thought I'd check before I wrote something inelegant and slow.) J

Re: [R] Revolution Analytics reading SAS datasets

2011-02-10 Thread Jeremy Miles
guess if they release it as open source, that could be construed as publishing the algorithm. (SPSS and WPS both can open SAS files, and I'd be surprised if SAS licensed to them. [Esp WPS, who SAS are (or were) suing for all kinds of things in court in London.) Jeremy __

Re: [R] sem problem - did not converge

2011-02-14 Thread Jeremy Miles
oining the structural equation modeling list - semnet. This isn't really a sem (the package) or R problem, it's a more general SEM (the approach) problem. Jeremy Chen, F., Bollen, K., Paxton, P., Curran, P.J., & Kirby, J. (2001). Improper solutions in structural equation models: C

[R] uninstall R

2011-02-16 Thread Jeremy MAZET
Dear all, I build a customized version of R-2.12.1 from source (under windows XP). I work as explain in the R Installation and Adminstration manual and all seems to be good... But When I try to uninstall this version I have the error message "cannot find utCompiledCode record for this version o

[R] building R from source

2011-02-17 Thread Jeremy MAZET
Dear all, I post again my question with a new title ... please, help me! I build a customized version of R-2.12.1 from source (under windows XP). I work as explain in the R Installation and Adminstration manual and all seems to be good... But When I try to uninstall this version I have the err

Re: [R] testing power of correlation

2011-03-05 Thread Jeremy Miles
Can you clarify what you mean? The strength of the correlation is the correlation. One (somewhat) useful definition is Cohen's, who said 0.1 is small, 0.3 is medium and 0.5 is large. Or do you (as your subject says) want to get the power for a correlation? This is a different thing. J

Re: [R] Structural equation modeling in R(lavaan,sem)

2011-03-27 Thread Jeremy Miles
Again, I should reiterate that you have a hard road in front of you, and it will be made much easier if you read a couple of introductory SEM texts, which will answer this sort of question. Jeremy -- Jeremy Miles Psychology Research Methods Wiki: www.researchmethodsinpsychology.com

Re: [R] Structural equation modeling in R(lavaan,sem)

2011-03-28 Thread Jeremy Miles
4,NA > x7 <->x7 ,sigmma5,NA > x6 <->x6 ,sigmma6,NA > > It's a somewhat unusual looking model. What are you trying to do? Jeremy -- Jeremy Miles Psychology Research Methods Wiki: www.researchmethodsinpsychology.com [[alternative HTML version deleted]]

Re: [R] Structural equation modeling in R(lavaan,sem)

2011-03-29 Thread Jeremy Miles
which will help. http://www.biomedcentral.com/1756-0500/3/267 Might I also suggest you take a look at the semnet list, which is populated by practitioners of SEM. Jeremy On 29 March 2011 12:25, jouba wrote: > Dear all, > There is some where documentation to understand all  indices in

[R] Italicized title from index

2011-03-30 Thread Jeremy Newman
c(.(spp)))* I get: "*Yield for 1*" While *spp=Gadus morhua* I'm at wit's end, I tried to read about substitute, expression, and eval functions in the hopes I can figure it out, but I am lost! Thanks for any help! Cheers, -Jeremy N Undergraduate Researcher in Macroecology U

Re: [R] Italicized title from index

2011-03-31 Thread Jeremy Newman
Hi, Thank you *very* much. I'll remember that in the future! Cheers, -Jeremy N Undergraduate Researcher in Macroecology University of Ottawa Department of Biology Ad astra per alia porci! On Thu, Mar 31, 2011 at 8:01 AM, Henrique Dallazuanna wrote: > Better: > > plot(1,

Re: [R] Structural equation modeling in R(lavaan,sem)

2011-04-03 Thread Jeremy Miles
mnet. You can join it here: http://www2.gsu.edu/~mkteer/semnet.html#Joining. Jeremy -- Jeremy Miles Psychology Research Methods Wiki: www.researchmethodsinpsychology.com __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo

Re: [R] Correlation Matrix

2011-04-07 Thread Jeremy Miles
omething I > have to construct manually? > You can use cbind(). cor(cbind(MyDataFrame$variable1, MyDataFrame$variable2,MyDataFrame$variable3) ) Jeremy __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do re

Re: [R] xyplot, groups and colors

2011-04-08 Thread Jeremy Hetzel
= circumference, group=Tree)) # Specify the geom_point and geom_line colour aesthetics as group g1 + geom_point(aes(colour = group)) + geom_line(aes(colour = group)) Is this what you are after? Jeremy Jeremy Hetzel Boston University [[alternative HTML version deleted]]

Re: [R] Removing not duplicated rows

2011-04-08 Thread Jeremy Hetzel
As I understand it, you are trying to subset the data frame to include only rows with a non-unique id. Try this: x <- data.frame(cbind(id=c(1,2,2,2,3,3,4,5,6,6), value=1:10)) id.table <- table(x$id) x_new <- subset(x, id %in% id.table[id.table >

Re: [R] Removing not duplicated rows

2011-04-08 Thread Jeremy Hetzel
Sorry, I left out the names() function in the last step. Try this instead: x <- data.frame(cbind(id=c(1,2,2,2,3,3,4,5,6,6), value=1:10)) id.table <- table(x$id) x_new <- subset(x, id %in% names(id.table[id.table > 1])) Jeremy __ R-help@r

Re: [R] Multinomial Logit Model with lots of Dummy Variables

2011-04-10 Thread Jeremy Hetzel
rn(A.value) }) B <- apply(dat, 1, function(x) { B <- x[7:11] B.names <- names(x[7:11]) B.names B.value <- B.names[B==1] return(B.value) }) # Combine into new data frame dat.new <- data.frame(dat$outcome, A, B) head(dat.new) Jeremy __ R-help

Re: [R] Converting a categorical variable to multiple dichotemousvariables

2011-04-12 Thread Jeremy Hetzel
imtest$eth, unique(simtest$eth), "==") + 0 # Combine simtest.combined <- cbind(simtest, simtest.dichotomous) head(simtest.combined) Jeremy Jeremy Hetzel Boston University __ R-help@r-project.org mailing list https://stat.ethz.ch/mail

Re: [R] R plots pdf() does not allow spotcolors?

2011-04-13 Thread Jeremy Hetzel
Scribus claims to be able to convert RGB/CMYK colors to spot colors: http://documentation.scribus.net/index.php/Spot_Colors I've never used Scribus, but it's floss. Jeremy __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/

Re: [R] R plots pdf() does not allow spotcolors?

2011-04-13 Thread Jeremy Hetzel
e PDF, convert to spot color in Scribus, then break the PDF apart again for Latex. Jeremy __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and pr

Re: [R] Monte Carlo Simulation

2011-04-15 Thread Jeremy Miles
to know about write.table() for the saving the files, or is the problem with splitting a large file, or generating the 1000 names ... Jeremy -- Jeremy Miles Psychology Research Methods Wiki: www.researchmethodsinpsychology.com __ R-help@r-project.o

Re: [R] Random Relabelling

2011-04-20 Thread Jeremy Hetzel
Kevin, The following follows John's suggestion, but without the loop. It's quick for me. Jeremy Jeremy T. Hetzel Boston University ## Generate sample data n <- 4000 rep <- 1000 rate <- rnorm(n, mean = 15, sd = 2) / 10 # Mortality rates around 15/100k ## Create a

Re: [R] Rcmdr vs SPSS

2011-04-20 Thread Jeremy Miles
tudentized residuals (because they follow the distribution). John Fox's regression book <http://socserv.mcmaster.ca/jfox/Books/Companion/> explains all of this nicely. Jeremy On 20 April 2011 14:36, Tamas Barjak wrote: > Hy all! > > Excuse me for the inaccurate composition, but

Re: [R] Rcmdr vs SPSS in hungarian

2011-04-21 Thread Jeremy Miles
should use the studentized (which SPSS calls studentized-deleted). Jeremy 2011/4/21 Tamas Barjak : > Remélem valaki ezt is elolvassa, megérti, és válaszol a problémámra. > > A gondom a következő: > > Kiszámoltattam a maradékokat az R commanderrel, és az SPSS -el is. És itt >

Re: [R] Automatic creation of binary logistic models

2011-08-04 Thread Jeremy Miles
Sounds like you want a best subsets regression, the bestglm() function, found in the bestglm() package will do the trick. Jeremy On 4 August 2011 12:23, Paul Smith wrote: > Dear All, > > Suppose that you are trying to create a binary logistic model by > trying different com

Re: [R] questions about "metafor" package

2011-08-17 Thread Jeremy Miles
ximate) the pooled SD? jeremy __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.

Re: [R] Differences in SAS and R defaults

2011-08-29 Thread Jeremy Miles
Do you mean things like treatment of categorical variables in regression procedures (which have different defaults in different procedures in SAS), and different default as to the reference category in logistic regression? Jeremy On 29 August 2011 04:46, n wrote: > Hello all, >

Re: [R] help in interpreting paired t-test

2011-09-21 Thread Jeremy Miles
> cor(A, B) [1] 0.9986861 The data are very, very highly correlated. The higher the correlation, the greater the power of the t-test to detect the same difference between the means. Jeremy On 20 September 2011 10:46, Pedro Mardones wrote: > Dear all; > > A very basic question

[R] Package 'MASS' (polr): Error in svd(X) : infinite or missing values in 'x'

2012-07-09 Thread Jeremy Little
st_dist + Stream_dist, > data=Jdata) > > summary(Global) Error in svd(X) : infinite or missing values in 'x' > ##Try with omit NA command > Global <- polr(JVeg5 ~ Elevation + Lat_Y_pos + Coast_dist + Stream_dist, > data=Jdata, na.action = na.omit, Hess = TRUE) > > s

Re: [R] Package 'MASS' (polr): Error in svd(X) : infinite or missing values in 'x'

2012-07-09 Thread Jeremy Little
Hi Jessica, thank you for your prompt response. Yes I had deduced it had to do with the Hessian. However, I am not clear what "all columns having range the order of one" actually means and what this means for my data. Does this mean removing decimals (ie by shifting the decimal place)? I would h

  1   2   >