similar to: generating a matrix after a for loop..

Displaying 20 results from an estimated 800 matches similar to: "generating a matrix after a for loop.."

2009 Jul 15
1
RODBC results from stored procedure
Short of uploading a SQL server database, I don't think I can make this example reproducible, but I hope it's not so complicated as to require reproducibility.... I'm using RODBC to get data from Microsoft SQL Server. I can call a parametrized stored procedure without a problem and the proc does indeed execute successfully. However, even though the proc returns the results I found
2007 Dec 20
3
ActiveRecords Eager Loading
Hi, I am doing an eager loading in ruby on rails using below statement ------------------------ Article.find(:all, :include => [:asset, :vote], :conditions=>"assets.parent_id is null", :order=>"stat_final_ranking desc", :limit=>20) --------------------------------------- the above statement resulted in this expensive query.
2011 Dec 07
1
Output table from for loop
Hi, this might be basic but can't get it to work and it is hampering my R usage: #the loop is checking variance of rows, and cutting out rows with var>numVec[i] #I define outMat as object names I want to output to (does this make sense? how else #can I define sequential numbered output?) #numVec is numbers I use in the loop head(Counts) AN1 AN2 AN3 AN4 var GENE1
2011 Sep 02
1
Using capture.output within a function
Dear R-users I'm running a maximum likelihood procedure using the spg package. I'd like to save some output produced in each iteration to a file, but if I put the capture.output() within the function I get the following message; Error in spg(par = startval, fn = loglik, gr = NULL, method = 3, lower = lo, : Failure in initial function evaluation!Error in -fn(par, ...) : invalid argument
2011 Apr 28
1
DLSODA error
Dear R-users, I'm running an MLE procedure where some ODEs are solved for each iteration in the maximization process. I use mle2 for the Maximum likelihood and deSolve for the ODEs. The problem is that somewhere along the way the ODE solver crashes and I get the following error message: DLSODA- Warning..Internal T (=R1) and H (=R2) are such that in the machine, T + H = T on the next
2011 Aug 05
2
Which is more efficient?
Greetings all, I am curious to know if either of these two sets of code is more efficient? Example1: ## t-test ## colA <- temp [ , j ] colB <- temp [ , k ] ttr <- t.test ( colA, colB, var.equal=TRUE) tt_pvalue [ i ] <- ttr$p.value or Example2: tt_pvalue [ i ] <- t.test ( temp[ , j ], temp[ , k ], var.equal=TRUE) ------------- I have three loops, i, j, k. One to test the all of
2011 Sep 04
2
mclust: modelName="E" vs modelName="V"
Hi, I'm trying to use the library mclust for gaussian mixture on a numeric vector. The function Mclust(data,G=3) is working fine but the fitting is not optimal and is using modelNames="E". When I'm trying Mclust(data,G=3,modelName="V") I have the following message: Error in if (Sumry$G > 1) ans[c(orderedNames, "z")] else ans[orderedNames] : argument is
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
2004 Jun 14
2
A Few MCLUST Questions
Hello everyone. I have a few MCLUST questions and I was hoping someone could help me out. If you’re an MCLUST user, they will likely be pretty easy to answer. Thanks in advance for any help. Ken What are the pros/cons of starting a finite mixture model at the “m” step versus the “e” step (where “m” is the maximization step and “e” is the expectation step of the EM algorithm)? In
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
2011 Sep 03
2
mclust: modelNames("E") vs modelNames=("V")
Hi, I'm trying to use the library mclust for gaussian mixture on a numeric vector. The function Mclust(data,G=3) is working fine but the fitting is not optimal and is using modelNames="E". When I'm trying Mclust(data,G=3,modelName="V") I have the following message: Error in if (Sumry$G > 1) ans[c(orderedNames, "z")] else ans[orderedNames] : argument is
2004 Sep 21
3
how to take this experiment with R?
How about: x <- data.frame(matrix(rnorm(1550),c(50,31))) model <- step(lm(x[,1] ~ as.matrix(x[,2:31]))) --Matt -----Original Message----- From: r-help-bounces at stat.math.ethz.ch [mailto:r-help-bounces at stat.math.ethz.ch]On Behalf Of rongguiwong Sent: Monday, September 20, 2004 20:52 PM To: r-help at stat.math.ethz.ch Subject: [R] how to take this experiment with R? This message uses
2010 Apr 19
1
What is mclust up to? Different clusters found if x and y interchanged
Hello All... I gave a task to my students that involved using mclust to look for clusters in some bivariate data of isotopes vs various mining locations. They discovered something I didn?t expect; the data (called tur) is appended below. p <- qplot(x = dD, y = dCu65, data = tur, color = mine) print(p) # simple bivariate plot of the data; looks fine mod1 <- Mclust(tur[,2:3]) mod1$G mod2
2011 Dec 09
2
Error using function MVN in package MCLUST: Fortran symbol name not in DLL for package
Hi All, I need to fit a mutlivariate normal model to a dataset in order to obtain the mean and covariance parameters. I see that the MVN function in the MCLUST package can do this, however when I try to run even the simplest example provided in the documentation, as below, I get the following error: n <- 1000 set.seed(0) x <- rnorm(n, mean = -1, sd = 2) mvn(modelName = "X", x)
2010 Mar 22
0
superfluous distribution found with mclust
Dear R users, I use mclust to fit a mixture of normal distributions to many datasets. Usually the Mclust function finds 1 or two normal distributions, rarely, 3. But I hit a strange case today. my.data <- c(57.96920, 51.79415, 51.20538, 55.53637, 51.64291, 56.61476, 51.28855, 55.56169, 51.85113, 54.03330, 51.37370, 49.48561, 52.41580, 53.51176, 60.49293, 55.77012, 51.59270, 56.29660,
2009 Feb 25
1
leaps question
Colleagues, please help me with the simple question. How can I find R2 and p while doing best subsets regression? Also how can I see B and p for coefficients? Maybe you can advice me detailed manual, because in manual for the package this is not described. Thank you
2007 Aug 08
1
Regsubsets statistics
Dear R-help, I have used the regsubsets function from the leaps package to do subset selection of a logistic regression model with 6 independent variables and all possible ^2 interactions. As I want to get information about the statistics behind the selection output, I?ve intensively searched the mailing list to find answers to following questions: 1. What should I do to get the statistics
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 Jun 28
0
prior covariance in Mclust
Hello, I'm trying to use Mclust to fit a Gaussian Mixture Model to a mulitdimensional data set. Because of the specific source of my data, I know that all components have the same variance and that the covariance between dimensions is zero (modelname=VII). Furthermore, I have a reliable estimate of the variance of the components. I want to to use this estimate as a prior in mclust, hoping
2004 May 26
1
Need help on Mclus output
Dear useRs, I have fitted a mixture with 4 normal components on a univariate distribution using the Mclust package. Now, I would like to get a variable with the cluster membership of each class, or in alternative a variable with the posterior probabilities for each component. Also I cannot find where are the paramenters estimates for each component ,i.e. means and variances. I've read the