search for: dist2

Displaying 18 results from an estimated 18 matches for "dist2".

Did you mean: dist
2005 Oct 06
1
Compare two distance matrices
Hi all, I am trying to compare two distance matrices with R. I would like to create a XY plot of these matrices and do some linear regression on it. But, I am a bit new to R, so i have a few questions (I searched in the documentation with no success). The first problem is loading a distance matrix into R. This matrix is the output of a the Phylip program Protdist and lookes like this: 5
2009 Oct 14
1
TFTP prefix in pxelinux.0 ?
Hello, I wonder if it is possible to change pxelinux.0's tftp prefix... I want to setup a repository like that: |-- dist1 | |-- pxelinux.cfg | | `-- default | `-- pxelinux.0 |-- dist2 | |-- pxelinux.cfg | | `-- default | `-- pxelinux.0 |-- pxelinux.cfg | |-- default | `-- menu.c32 `-- pxelinux.0 The file /pxelinux.cfg/default would contain something like that: > LABEL dist1 > MENU LABEL dist1 > KERNEL dist1/pxelinux.0 > LABEL dist2 >...
2008 Nov 20
1
Math Expression in 3D Plots
...ce "delta_yrsed" with what "\Delta \widehat{yrsed}" represents in TeX, but the [xyz]lab parameters of title3d appear to only accept character strings. require("rgl") fn.delta.yrsed <- function(dist, delta.dist, beta.dist=-0.1376463, beta.dist2=0.0088698) { delta.yrsed <- (beta.dist + 2*beta.dist2*dist)*delta.dist + beta.dist2*delta.dist^2 return(delta.yrsed) } plot.deeffect <- function(scolor="blue") { delta.dist <- dist <- seq(0, 16, .5) delta.yrsed <- outer(dist, delta.dist, fn.delta.yrsed) rgl.open...
2006 Mar 08
1
function gdist, dist and vegdist in mvpart
...abandon+land_use+ca_old, data=ba12, xv="p") Error in model.frame(formula, rownames, variables, varnames, extras, extranames, : Variable lengths differ When computing the matrices directly... ba12.dist1 <- gdist (ba12[,18:29], method="maximum", full=T, sq=F) ba12.dist2 <- vegdist (ba12[,18:29], method="jaccard", diag=T, upper=T) ba12.dist3 <- dist (ba12[,18:29], method="minkowski", p=1, diag=T, upper=T) and looking at them, there appears to be no difference though only ba12.dist1 works with mvpart. With the other two I get the same err...
2012 Oct 01
6
nlme: spatial autocorrelation on a sphere
I have spatial data on a sphere (the Earth) for which I would like to run an gls model assuming that the errors are autcorrelated, i.e. including a corSpatial correlation in the model specification. In this case the distance metric should be calculated on the sphere, therefore metric = "euclidean" in (for example) corSpher would be incorrect. I would be grateful for help on how to
2004 Oct 01
3
Reading multiple files into R
I want to read data from a number of files into R. Reading individual files one by one requires writing enormous amount of code that will look something like the following. **************** maptools:::dbf.read("wb-01vc.dbf")->dist1 maptools:::dbf.read("wb-02vc.dbf")->dist2 maptools:::dbf.read("wb-03vc.dbf")->dist3 maptools:::dbf.read("wb-04vc.dbf")->dist4 maptools:::dbf.read("wb-05vc.dbf")->dist5 maptools:::dbf.read("wb-06vc.dbf")->dist6 maptools:::dbf.read("wb-07vc.dbf")->dist7 maptools:::dbf.read(&quo...
2005 Sep 30
0
p-value for non-linear variable in overdispersed glm()
Dear all, I am fitting an nonlinear glm() using optim() by first minimising glm(resp~ var1 + var2, family=binomial, data=data)$deviance where var1= exp(-a1*dist1), and var2= exp(-a2*dist2), where a1 and a2 are parameters and dist1 and dist2 are independent variables. Next, I calculate the value of var1 (and var2) by plugging in the value of al1 (and al2) that minimises deviance, and fit glm(resp~ var1+var2 , family=binomial, data=data) Var1 in this model thus includes two paramet...
2013 Mar 10
1
Error with grad() for numerical differential of a function
...e programmed some simulated studies. I have testes with 72,576 different combinations of the initial values and now I got an error in only 4 situations. The error comes from the function grad() and I don't understand why. This is the output: Error in grad.default(Sstar, x = t, dist1 = T1pdist, dist2 = T2pdist, : function returns NA at 3.90625e-071.01927622979798e-087.7105723770202e-075.27096223871154e-087.28540377612885e-071.25230637383194e-076.56019362616806e-072.21329924168263e-075.59920075831737e-073.324709613353e-074.487790386647e-070.0001000016964206937.79553579306956e-072.72822299391...
2006 Oct 11
1
Bug in stepAIC?
...e discovered a bug. It seems that, when I use weights during an initial least-squares regression fit, and later try to add terms using stepAIC(), it uses the weights when looking to remove terms, but not when looking to add them: hills.lm <- lm(time ~ dist + climb, data = hills, weights = 1/dist2) small.hills.lm <- stepAIC(hills.lm) stepAIC(small.hills.lm, time ~ dist + climb) In the first stepAIC(), it says that the AIC for the full "time ~ dist + climb" is 94.41. Yet, during the second stepAIC, it says adding climb would produce an AIC of 212.1 (and an RSS of 12633.3). I...
2001 Oct 22
2
OT: compare several graphs
Hi all, this is OT, but maybe someone can give me a clue. I've got data from eye tracker experiments (750 data points). These figures show how the data lock like |** * ***** |*** ****** | ** **** | * * | | * * | | * |-------------- |--------------- Y axes display velocity, x axes display time, * are the data points.
2013 Jun 22
1
metaMDS Error, Nan similar or negative values
...1.000000000 1.000000000 1.000000000 1.000000000 NaN 1.000000000 1.000000000 NaN I searched all the details of metaMDS where it is suggested to avail the argument 'zerodist' So I tried both X.dist1 <- metaMDSdist(X, method="bray",zerodist = "ignore") X.dist2 <- metaMDSdist(X, method="bray",zerodist = "add") But for both the cases I still have those NaN values in some distances. I have read, one of the discussion says modify zero dissimilarities as: If there is a good reason, and you want to include all samples, then you'll n...
2010 May 11
2
question about R
Hi, At each iteration in my program,I need to generate tree vectors,X1,X2,X3, from exponential distribution with parameters a1,a2,a3. Can you help me please how can I do it such that it take a little time? thank you khazaei
2004 Feb 23
2
plot(my.procrustes.model) from library {vegan}
Dear All, I would like to ask how to customize the graph corresponding to a procrustes analysis. I have to distance matrices, that I transform to two set of coordinates by means of muti dimensional scaling: library(mva) c1<-cmdscale(mat.dist1) c2<-cmdscale(mat.dist2) I vant to rotate c2 on c1, and I use the "procrustes" analysis from the {vegan} library. library(vegan) mod.pro<-procrustes(c1,c2) plot(mod.pro) My problem is that I need to change the graphical output of plot(mod.pro). The standard output gives empty circles for the rotated c2...
2003 Nov 27
2
Getting rid of loops?
I wrote a function to calculate cosine distances between rows of a matrix. It uses two loops and is slow. Any suggestions to speed this up? Thanks in advance. theta.dist <- function(x){ res <- matrix(NA, nrow(x), nrow(x)) for (i in 1:nrow(x)){ for(j in 1:nrow(x)){ if (i > j) res[i, j] <- res[j, i] else { v1 <- x[i,] v2 <- x[j,]
2006 Nov 30
3
newbie: new_data_frame <- selected set of rows
Hello, this is probably trivial but I failed to find this particular snippet of code. What I got: my_dataframe (contains say a 40k rows and 4 columns) distances (vector with euclidean distances between a query vector and each of the rows of my_dataframe) What I do: after scaling data my_dataframe I calculate distances. order them then extract top five hits my_dataframe <-
2007 Feb 23
4
How to plot two graphs on one single plot?
Hi, I am trying to plot two distribution graph on one plot. But I dont know how. I set them to the same x, y limit, even same x, y labels. Code: x1=rnorm(25, mean=0, sd=1) y1=dnorm(x1, mean=0, sd=1) x2=rnorm(25, mean=0, sd=1) y2=dnorm(x2, mean=0, sd=1) plot(x1, y1, type='p', xlim=range(x1,x2), ylim=range(y1, y2), xlab='x', ylab='y') plot(x2, y2, type='p',
2012 Apr 30
5
[PATCH 0/4 v1] Remove gettextify, implement OCaml gettext.
Version 1 of the patch, for discussion, but not to be applied. It does work, but needs a lot more testing. This removes all the psychopathic gettextify cruft, and replaces it with a 99 line Makefile.am. A large win, I think. The third patch implements gettext support in the OCaml tools. The fourth patch is just for illustration. It shows the consequent changes to libguestfs.pot and the po
2010 Aug 24
0
mlm for within subject design
...8 1.5224318 1.4444836 1.3682047 1.0048085 2.8425813 1.8464349 2.7853605 9 4.5321276 4.5859822 3.8178836 5.4277885 5.7703245 3.7731505 5.6657106 10 4.0389095 1.6702235 2.7327563 3.5495557 5.4279792 2.3611163 0.5540045 8 9 2 3 4 5 6 7 8 9 5.1082493 10 2.5924107 6.0248981 > dist2 1 2 3 4 5 6 7 2 0.9364828 3 1.4333876 1.9160376 4 0.2523886 1.1884864 1.3697080 5 2.3753105 2.5185909 3.7830808 2.4140423 6 1.7928748 1.6959363 1.0841587 1.8848077 4.0827074 7 2.5117723 1.6858232 2.7455418 2.7406021 4.0115957 1.81400...