search for: distance2

Displaying 6 results from an estimated 6 matches for "distance2".

Did you mean: distance
2008 Jan 31
3
fastest way to compute the squared Euclidean distance between two vectors in R
I have a program which needs to compute squared Euclidean distance between two vectors million of times, which the Rprof shows is the bottleneck. I wondered if there is any faster way than my own simple function distance2 = function(x1, x2) { temp = x1-x2 sum(temp*temp) } I have searched the R-help archives and can not find anything except when the arguments are matrices. Thanks for any lead. Jason Jason Liao, http://www.geocities.com/jg_liao Associate Professor of Biostatistics Drexel University School...
2008 Mar 24
1
Great difference for piecewise linear function between R and SAS
...8 1.836 - 3.719 0.000200 *** bs(y, degree = 1, knots = c(-0.4357, -0.3202))2 -4.426 1.614 - 2.742 0.006105 ** bs(y, degree = 1, knots = c(-0.4357, -0.3202))3 -11.216 2.861 - 3.920 8.86e-05 *** #SAS codes data b; set a; if distance > 16.13 then d1=1; else d1=0; distance2=d1*(distance - 16.13); if distance > 24 then d2=1; else d2=0; distance3=d2*(distance - 24); if y>-0.4357 then dd1=1; else dd1=0; y2=dd1*(y+0.4357); if y>-0.3202 then dd2=1; else dd2=0; y3=dd2*(y+0.3202); run; proc logistic descending data=b; model mark =x elevation elevation*elevat...
2006 Mar 21
1
Scaling behavior ov bVar from lmer models
...100, the CIs do not scale accordingly. Recall that the variance, SE, and CI scale with the magnitude of the variable at hand. I.e., x<-c(1,2,3,4,5) var(x) >2.5 x2<-x*10 var(x2) >250 So, to rerun the above example with "distance" scaled up by a factor of 100: OrthFem$distance2<-OrthoFen$distance*100 fm1OrthF. <- lmer(distance2~age+(age|Subject), data=OrthoFem) fm1.s <- coef(fm1OrthF.)$Subject fm1.s.var <- fm1OrthF. at bVar$Subject fm1.s0.s <- sqrt(fm1.s.var[1,1,]) fm1.s0.a <- sqrt(fm1.s.var[2,2,]) fm1.s[,1]+outer(fm1.s0.s, c(-2,0,2)) fm1.s[,2]+outer(fm...
2011 Mar 26
0
rebuilding vignettes in 2.13-0-alpha fails if name of source dir is not package name
...empty section \details * checking Rd metadata ... OK * checking Rd cross-references ... OK * checking for missing documentation entries ... WARNING Undocumented code objects: OOB ageModel ageModel.coreData ageModel.default dates dates.coreData dates.default depths depths.coreData depths.default distance2 distance2.default gradientDist gradientDist.cca gradientDist.default gradientDist.prcurve intervals intervals.coreData intervals.default lines.gradientDist metadata metadata.coreData plot.gradientDist points.gradientDist randomWA randomWA.default rbind.coreData varExpl varExpl.cca varExpl...
2008 Mar 24
0
What is the correct model formula for the results of piecewise linear function?
...iecewise linear functions. Now i hope to write the model formua for the above results, but not very sure about how to write the correct results for *distance* and *y,* because they have three parts . Logitp=12.104 + 5.815*x + 6.654*elevation - 6.755*elevation^2 -1.291*distance1 - 10.348*distance2 - 3.53*distance3 -6.828*y1 - 4.426*y2 - 11.216*y3 In the above formula, distance1-3 denotes the three linear functions for*distance *, my problem is how to replace distace1-3 using original variable *distance *? The same question is for *y*. Could anybody please show me the correct mod...
2004 Jan 15
1
WANTED: Toll-Free gateways in Europe/Asia/Africa/South America
The freenum.org project wants to use your trunks! The freenum.org project is an ENUM parallel tree, which has as an eventual goal the distribution of ENUM numbering in nations or areas which due to political or other issues are not able to get secure, inexpensive, or functional ENUM capabilities. As a preliminary round, we're putting toll-free gateways into the system for various nations.