similar to: Newbie syntax question

Displaying 20 results from an estimated 10000 matches similar to: "Newbie syntax question"

2008 Sep 04
3
table and colnames
I have a table statement that returns the following: [10.839,10.841] (10.841,10.843] (10.843,10.846] (10.846,10.848] (10.848,10.85] 0 0 0 0 1 (10.85,10.852] (10.852,10.854] (10.854,10.857] (10.857,10.859] (10.859,10.861] 0 0 0 0 0 What I want to do is get the upper bound
2009 Nov 24
1
Scatter plot with margin distributions
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20091124/39eccb61/attachment-0001.pl>
2006 Jul 24
2
Correlations by group
I'm aware that S N Krishna asked the same question. However, I have failed to implement the posted solution for running rank order correlations on multiple subsets of data using the by() function. Here is my problem: Take a set of data from two subjects, who provided numerical infant mortality (IM) estimates for five countries: sub <- c(1, 1, 1, 1, 1, 2, 2, 2, 2, 2)
2008 Apr 19
3
R question for Stata users
Hi... In Stata, there is the ability to display scatter plots with data points at the same (x,y) location, using the 'jitter' command of the twoway scatter stata command. Anyone know of a way that I can do the equivalent thing in R? For non-Stata readers, if jitter is enabled in stata, and n-points would be at the same (x,y) location, the points are offset a bit (according to
2008 Jan 20
2
Newbie question on subsets
Hi... I'm working through the book, A Handbook of Statistical Analyses using R by Everitt, and I'm trying to do the following (p. 19 of his book): boxplot(log(marketvalue)~country, data = subset(Forbes2000, country %in% c("United Kingdom","Germany","India","Turkey")), ylab="log(marketvalue",
2018 Feb 27
1
Help
Dear I hope you are wery well when read this e-mail.My name is Firas ALSHAWY and I am a Phd student in the high Institute of marine research - tishreen university- Syria I would like to want some help my in my research, I have data ( length - weight - gonad weight - fishing mortality - natural mortality - the number of fish-temperature of water, maximum age ) , I would like to use the package (
2008 Feb 13
6
Creating a data.frame
OK...newbie question here. Either I'm reading the docs wrong, or I'm totally confused. Given the following: x<-c("aaa","bbb","ccc") y<-rep(0,3) z<-rep(0,3) is.character(x) [1] TRUE is.numeric(y) [1] TRUE Now...I want to create a data frame, but keep the data types. In reading the docs, I assume you do it this way:
2008 Jan 02
2
strange behavior of cor() with pairwise.complete.obs
Hi all, I'm not quite sure if this is a feature or a bug or if I just fail to understand the documentation: If I use cor() with pairwise.complete.obs and method=pearson, the result is a scalar: ->cor(c(1,2,3),c(3,4,6),use="pairwise.complete.obs",method="pearson") [1] 0.9819805 The documentation says that " '"pairwise.complete.obs"' only
2012 Jun 16
2
A basic design question for R
Hello R Community, I have the following design question. I have a data set that looks like this (shortened for the sake of example). Gender Age M 70 F 65 M 70 Each row represents a person with an age/gender combination. We could put this data into a data frame. Now, I would like to do some actuarial analysis on this data set. To do so, I need to create and store
2012 Apr 07
6
Drawing a line in xyplot
i am trying to replicate the following graph using xyplot : attach(x) plot ( jitter(type), mortality, pch=16, xlim = c(0.25, 3.75)) lines ( c(1-0.375,1.375) , c ( median(mortality[type==1]), median(mortality[type==1])), lwd=5,col=2) lines ( c(2-0.375,2.375) , c ( median(mortality[type==2]), median(mortality[type==2])), lwd=5,col=2) lines ( c(3-0.375,3.375) , c ( median(mortality[type==3]),
2013 Nov 17
1
FactoMineR
Hola. Como te dijo Carlos, el problema está en los nombres de las columnas y en los nombres de las filas. Cuando hice la importación (con dd<-read.csv('mortality.csv'), tuve problemas con las filas de nombre: - Malignant tumour of the larynx trachea bronchus and lungs - Malignant tumour of the lip pharynx and mouth - Other endocrinological metabolic and nutritional conditions
2012 May 29
2
a question about "by" and "ddply"
Hi all, I have a data set (df, n=10 for the sake of simplicity here) where I have two continuous variables (age and weight) and I also have a grouping variable (group, with two levels). I want to run correlations for each group separately (kind of similar to "split file" in SPSS). I've been experimenting with different functions, and I was able to do this correctly using ddply
2004 Apr 10
1
confidential interval of correlation coefficient using bootstrap
I tried 2 methods to estimate C.I. of correlation coefficient of variables x and y: > x <- c(44.4, 45.9, 41.9, 53.3, 44.7, 44.1, 50.7, 45.2, 60.1) > y <- c( 2.6, 3.1, 2.5, 5.0, 3.6, 4.0, 5.2, 2.8, 3.8) #METHOD 1: Pearson's ********************************************************** > cor.test(x, y, method = "pearson", conf.level = 0.95) Pearson's
2013 Nov 17
4
FactoMineR
Estimados Queremos con el paquete FactoMineR hacer este tipo de tabla de mortalidad que lea los datos desde de una tabla csv Realizamos lo que viene en la ayuda y es muy interesante, sin embargo cuando mandamos a leer desde la tabla csv original de los autores no hace el análisis porque algo falta y no nos percatamos de que es. Adjunto tabla original Saludos cordiales #ESTO ES LO QUE
2004 Oct 14
1
correlating between two vectors of numbers
Hi, R! Question1: I am trying to correlate two vectors of numbers (two columns of microarray signal values) by using the non-parametric Spearman's rank correlation coefficient rho: > cor.test(V2.Signal,V3.Signal,method="spearman") but I get the error message: Error in if (q > (n^3 - n)/6) pspearman(q - 1, n, lower.tail = FALSE) else pspearman(q, : missing value
2008 Apr 05
2
pearson's correlation
Hello, I used the function cor to calculate the pearson correlation coefficient between variables. However, the resulting values do not correspond to the outcome of my excel-calculations, for which I used the formula Cor(x,y)=Cov(x,y)/(SD(x)*SD(y)) So my question is: How does the function "cor" compute the pearson correlation coefficient? Thank you in advance, Ake Nauta
2012 Jul 01
1
significant difference between Gompertz hazard parameters?
Hello, all. I have co-opted a number of functions that can be used to plot the hazard/survival functions and associated density distribution for a Gompertz mortality model, given known parameters. The Gompertz hazard model has been shown to fit relatively well to the human adult lifespan. For example, if I wanted to plot the hazard (i.e., mortality) functions: pop1 <- function (t) {
2013 Mar 26
2
GAM model with interactions between continuous variables and factors
Hi all, I am not sure how to handle interactions with categorical predictors in the GAM models. For example what is the different between these bellow two models. Tests are indicating that they are different but their predictions are essentially the same. Thanks a bunch, > gam.1 <- gam(mortality.under.2~ maternal_age_c+ I(maternal_age_c^2)+ + s(birth_year,by=wealth) + +
2010 Mar 30
3
use logical in cor.test
Hi, I've got 4 variables that I want to effectively 'stack' so that I have a grand R variable and a grand L variable. This works to achieve that goal: Twin1cor<-with(twin.wide,cbind(ACDepthR.1,ACDepthL.1)) Twin2cor<-with(twin.wide,cbind(ACDepthR.2,ACDepthL.2)) Both<-rbind(Twin1cor,Twin2cor) > str(Both) num [1:1858, 1:2] 3.36 NA NA NA NA NA NA 3.92 3.5 NA ... - attr(*,
2003 Sep 13
2
what does this error mean?
Dear R-users: I am runing R 1.6.2 with Windows XP. I try to calculate Pearson correlation and Spearman correlation of any pairwise columns of 8000 x 80 data matrix with missing values and randomize the matix 1000 times and calculate this two correlations again. The code bellow for Pearson is working fine but for Spearman got the error bellow for randomized data matrix and R console is stop