similar to: problem applying a conditional formula to each element of a matrix

Displaying 20 results from an estimated 2000 matches similar to: "problem applying a conditional formula to each element of a matrix"

2005 Mar 07
3
R crashes using the em function of package mclust (PR#7719)
Hi, I got the same problem like http://tolstoy.newcastle.edu.au/R/devel/04/11/1204.html R crashes when I use the em function from the mclust package on univariate data and on a special case on bivariate data (when the matrix is not provided as written in the manual). It seems as if the problem is the format of the data to be analyzed. Operating System: Windows XP (SP2) R version: R-2.0.1 The
2008 Sep 16
1
Car.proper C[] matrix
I am hoping someone can help translate some WinBUGS code into R code. I would like to use R to create the C[] matrix required for a car.proper model in WinBUGS, but I am having a difficult time negotiating the coding. The C matrix provides normalized weights for each pair of spatial areas. So the WinBUGS example is as follows: # of the weight matrix with elements Cij. The first J1 elements
2012 Oct 04
1
geoRglm with factor variable as covariable
Dear R users. I'm trying to fit a generalised linear spatial mode using the geoRglm package. To do so, I'm preparing my data (geodata) as follow: geoData9093 = as.geodata(data9093, coords.col= 17:18, data.col=15,* covar.col=16*) where covar.col is a factor variable (years in this case 90-91-92-93)). Then I run the model as follow: / model.5 = list(cov.pars=c(1,1),
2005 Oct 21
1
finite mixture model (2-component gaussian): plotting component gaussian components?
Dear Knowledgeable R Community Members, Please excuse my ignorance, I apologize in advance if this is an easy question, but I am a bit stumped and could use a little guidance. I have a finite mixture modeling problem -- for example, a 2-component gaussian mixture -- where the components have a large overlap, and I am trying to use the "mclust" package to solve this problem. I need
2007 Mar 07
2
Power calculation for detecting linear trend
Dear people, I've a problem in doing a power calculation. In Fryer and Nicholson (1993), ICES J. mar. Sci. 50: 161-168 page 164 an example is given with the following characteristics T=5, points in time R=5, replicates Var.within=0.1 q=10, a 10% increase per year The degrees of freedom for the test are calculated as Vl=T*R-2=23 and the non-centrality parameter Dl=4.54. Using this they get a
1999 Jun 09
1
smbtar cannot recognize space character in filename
Hi. My friend has a problem that smbtar cannot recognize space character in specified filenames. He tried to execute following command line to back file "long file name" up: $ smbtar -s SERVER -p PASSWORD -x SHARE -u username -t /tmp/backup.tar \ "long file name" but smbtar tried to include three files as 'long', 'file' and 'name'. :-( Here is the
2007 Apr 03
1
which points within an ellipsoid? Sorting data in 3d
Hello, in a three dimensional coordinate system, I'd like to find all my experimental data points that fall within an ellipsoid around a fixed coordinate. The fixed point is defined by (x.coord.point, y.coord.point, z.coord.point). The coordinates of the ellipsoid are given by the three vectors x,y,z. In a previous version of my code, I simply used a box instead of an ellipsoid to sort
1999 Aug 05
1
pairwise scatterplot matrix
Dear Friends: I like so much to work with R program. Congratulations for your work. I need R for work with multivariate data. My question is: With the pairs(X) command my output is a pairwise scatterplot symmetric matrix. Like: | X1 |X1 vs X2|X1 vs X3|X1 vs X4| |X2 vs X1| X2 |X2 vs X3|X2 vs X4| |X3 vs X1|X3 vs X2| X3 |X3 vs X4| |X4 vs X1|X4 vs X2|X4 vs X3| X4 | It is
2009 Oct 08
3
foreach loop - rejection method
Hi Everybody, Thanks in advance for your help. This is my first time using the foreach statement and I cant get it to work properly so here is what i have test<-function(){ repeat { cand2[l-1]<-rinvgamma(1,phi,lambda[l-1]) q2<-dinvgamma(cand2[l-1],phi,lambda[l-1]) p2<-cand2[l-1]^-1.5*exp(-y[l]^2/(2*cand2[l-1]))*exp(-((log(cand2[l-1])-mu_t_cand[l-1])^2)/2*sigmasq)
2007 Oct 26
1
Help needed on calculation of Moran's I
Hi, I am trying to calculate Moran's I test for the residuals for a regression equation, but I have trouble converting my coordinates into nb format. I have used the dnearneigh() funtion now with an arbitrarily high upper distance to make it include all plots. However, when I do the lm.morantest() I get a Moran's I value which is the same as the expected value and a P-value of 1. I
2012 Nov 04
1
Struggeling with nlminb...
Hallo together, I am trying to estimate parameters by means of QMLE using the nlminb optimizer for a tree-structured GARCH model. I face two problems. First, the optimizer returns error[8] false convergence if I estimate the functions below. I have estimated the model at first with nlm without any problems, but then I needed to add some constraints so i choose nlminb.
2004 Oct 19
1
Error message in mclust
I keep on receiving the message below after submitting the following line using the mclust package. m2 is a 99 X 1 column vector. * em(modelName = "E", m2, mu = c(25, 50), sigmasq=10, pro = c(0.4, 0.6)) Error in as.double.default(data) : (list) object cannot be coerced to double. Why do I receive this error? Thank, Brian C. Newquist Research Statistician
2004 Oct 19
1
Windows XP crashes when running the EM algorithm in MCLUST
Whenever I submit the following command >result <- em("E", m1, mu=c(25, 50), sigmasq=10, pro=c(0.49,0.51)) in MCLUST , I experience a problem with my Windows XP. Has anyone had this type of problem? I receive the general "send report" dialogue box and my program is no longer able to run. Should I change any of my system settings? Let me know if you think of anything
2009 Feb 16
1
Help with rgl
Hi, I don't know much about the RGL package, and I have read the documentation and tried some parameters, with no luck... I would like to generate a movie from a 3D object (code below), where the vortex A is closer to the observer, and then the object rotates and the B vortex gets closer. I would like to capture this movie to a file. By the way, I am not being able to insert unicode text
2004 Oct 19
2
Changing the Y graph scale Maximum value.
Hello, I am new to R and have read the documents related to graphics but have not come across a description of how to change the maximum scale on a graph. Below is sample code that sets up a plot window with a 0 Minimum to 10 Maximum, X and Y coordinate system: x <- c(1,2,3,4,5,6,7,8,9,10) y <- c(1,1.5,2,2.5,3,3.5,4,4.5,5,5.5) plot(0:10, 0:10, type = "n" )# setting up coord.
2009 Mar 10
1
North Arrow (.png file) on a Map
Hi list. I would like to know how do I insert a North arrow, stored as a png file in my computer, in a map? I found lots of post asking similar things, one of them mentioned the pixmap package. The map was done using map() and shapefiles (the code is below). I’m using the pixmap () and addlogo() functions. Well I can import the png with pixmap() function (I guess, once there’s no error message),
2012 Mar 14
1
How to extend a slot of a class?
Hej hej, is there a way to extend the SpatialPointsDataFrame data slot?This is the structure of an object of it:> str(coord) Formal class 'SpatialPointsDataFrame' [package "sp"] with 5 slots ..@ data :'data.frame': 214 obs. of 2 variables: .. ..$ location.long: num [1:214] -79.8 -79.8 -79.8 -79.8 -79.8 ... .. ..$ location.lat : num [1:214] 9.16 9.16 9.16
2006 Jan 25
1
How to use rfm.test ? (Package MarkedPointProcess)
I would like to compute the MC test (rfm.test) available in the package MarkedPointProcess (for the data BITOEK for example) in order to test the dependence between the marks and their locations. Why the syntax of rfm.test is false here? I have the message : ****************************** ML WARNING! Forbidden values! -- if there are too many warnings try narrower lower and upper bounds for the
2011 Mar 03
2
lattice custom axis function -- right side margins
Dear R help list, I have a plot with two different vertical scales that I want to display on either side of the plot. It's quite similar to the Fahrenheit-Centigrade example in the examples section of the documentation for axis.default. The right-side axis is clipped off, though, and I haven't been able to figure out anything with viewport() and clipping or trellis.par.set to fix
2016 Oct 24
2
RFC: (Co-)Convergent functions and uniform function parameters
Hi all, Some brain-storming on an issue with SPMD/SIMT backend support where I think some additional IR attributes would be useful. Sorry for the somewhat long mail; the short version of my current thinking is that I would like to have the following: 1) convergent: a call to a function with this attribute cannot be moved to have additional control dependencies; i.e., moving it from A to B is