similar to: Tracking progress during iterations

Displaying 20 results from an estimated 10000 matches similar to: "Tracking progress during iterations"

2006 Mar 16
3
Did I use "step" function correctly? (Is R's step() function reliable?)
Hi all, I put up an exhaustive model to use R's "step" function: ------------------------ mygam=gam(col1 ~ 1 + col2 + col3 + col4 + col2 ^ 2 + col3 ^ 2 + col4 ^ 2 + col2 ^ 3 + col3 ^ 3 + col4 ^ 3 + s(col2, 1) + s(col3, 1) + s(col4, 1) + s(col2, 2) + s(col3, 2) + s(col4, 2) + s(col2, 3) + s(col3, 3) + s(col4, 3) + s(col2, 4) + s(col3, 4) + s(col4, 4) + s(col2, 5) + s(col3,
2005 May 24
0
AW: Tracking progress during iterations
Dear Lin, One bad solution: You can only (???) display it, when you click on another Window (eg. the explorer) and then once again on the R window or by clicking on the menu bar in R and second on the R window. In this way you can "refresh" the display and you can see in which iteration step you are. You can check this on the dummy example below: k <- rnorm(4000000) for (i in
2005 Sep 09
1
Off-topic: Comparing standard errors from simulation and analytical model
Dear list: I'm hoping to tap in to the statistical expertise in the group, especially those familiar with simulation techniques. I'm finalizing a study where I obtain standard errors from two sources. The first source is a monte carlo simulation and the other source is an analytical model I have developed that appears to recover the standard errors from the simulation. All analysis are
2007 May 11
1
Create an AR(1) covariance matrix
Hi All. I need to create a first-order autoregressive covariance matrix (AR(1)) for a longitudinal mixed-model simulation. I can do this using nested "for" loops but I'm trying to improve my R coding proficiency and am curious how it might be done in a more elegant manner. To be clear, if there are 5 time points then the AR(1) matrix is 5x5 where the diagonal is a constant
2005 Apr 11
4
How to suppress the printing of warnings (Windows)?
Dear all, I'm a newbie in R. I am running simulations using a fixed bandwidth in nonparametric regressions, sending all the output to a file myoutput.txt using sink("myoutput.txt"), & R is printing all warnings by the end of the simulation on the file. I know the source of the problem & can take care of it. However, finding a 50 MB file (where all the output is printed, e.g.
2008 Jul 16
4
Likelihood ratio test between glm and glmer fits
Dear list, I am fitting a logistic multi-level regression model and need to test the difference between the ordinary logistic regression from a glm() fit and the mixed effects fit from glmer(), basically I want to do a likelihood ratio test between the two fits. The data are like this: My outcome is a (1,0) for health status, I have several (1,0) dummy variables RURAL, SMOKE, DRINK, EMPLOYED,
2004 Sep 21
1
lme RE variance computation
As I understand it lme (in R v1.9.x) estimates random effect variances on a log scale, constraining them to be positive. Whilst this seems sensible, it does lead to apparently biased estimates if the variance is actually zero - which makes our simulation results look strange. Whilst we need to think a bit deeper about it - I still haven't got my head around what a negative variance could
2007 May 01
3
simulation
Hello I would like to simulate datasets in the following way: x <- rpois(999, 2000) y <- sum(exp(rgamma(x, scale=2, shape=0.5))) The problem is, that by calling "y" I just get 1 value back and not 999 values. Can anyone help me? Thanks! Brigitte [[alternative HTML version deleted]]
2005 Mar 04
11
R: simulation
hi all a simple question i want to run simulations in r. i however want the experiments to be repeated at a later time with exactly the same numbers by other users. can i set the random number seed for rnorm in some way? e.g. is there some arguement that goes with rnorm? please supply an example regards Allan
2006 Aug 31
3
what's wrong with my simulation programs on logistic regression
Dear friends, I'm doing a simulation on logistic regression model, but the programs can't work well,please help me to correct it and give some suggestions. My programs: data<-matrix(rnorm(400),ncol=8) #sample size is 50 data<-data.frame(data) names(data)<-c(paste("x",1:8,sep="")) #8 independent variables,x1-x8; #logistic regression model is
2006 Oct 19
1
Writing a script for multiplying a progressively larger lists of items
Hi, I would like to get guidance as to how to write code in R that can deal with the following situation: v1 is a vector containing a sequence of numbers (Ex. 1:10) I want to store the sequence of numbers resulting from multiplying the first and the second element in the vector, then the product of the 1st, 2nd and 3rd, then 1st,2nd,3rd and 4th and so forth until all the elements in the
2008 Feb 18
3
mean and variance of ratio
Hi all! I try to estimate a statistic of the form: (x1-x2)/(y1-y2), where x1,x2,y1,y2 represent variable means, so each has an estimate and standard error associated with it. How is it possible to estimate the mean and the variance of this ratio? Thank you! [[alternative HTML version deleted]]
2005 Nov 04
2
Simplify iterative programming
Dear, I am looking for the simplification of a formula to improve the calculation speed of my program. Therefore I want to simplify the following formula: H = sum{i=0..n-1 , [ sum {j=0..m-1 , sqrt ( (Ai - Bj)^2 + (Ci - Dj)^2) } ] } where: A, C = two vectors (with numerical data) of length n B, D = two vectors (with numerical data) of length m sqrt = square root Ai = element of A with index
2008 Apr 09
4
apply lm() for all the columns of a matrix
Hi all, My question is not really urgent. I can write a loop and solve the problem. But I know that I'll be in a similar situation many more times so it would be useful to find out the answer Is there a fast way to perform linear fit to all the columns of a matrix? (or in the one dimension of a multi-dimensional array.) I'm talking about many single linear fits, not about a multiple fit.
2004 Jun 15
2
symbolic iteration
Dear all, I have 122 vectors named from L1 to L122. Now I hope to take log to each of the series, say L1 <- log(L1) ... L122<-log(L122) Can anyone show me a iterative way to make the job simple. I mean the way something like for(i in 1:122){ ... } or other similar methods. Many thanks. Jin
2006 May 12
3
Maximum likelihood estimate of bivariate vonmises-weibulldistribution
Thanks Dimitris!!! That's much clearer now. Still have a lot of work to do this weekend to understand every bit but your code will prove very useful. Cheers, Aziz -----Original Message----- From: Dimitrios Rizopoulos [mailto:Dimitris.Rizopoulos at med.kuleuven.be] Sent: May 12, 2006 4:35 PM To: Chaouch, Aziz Subject: RE: [R] Maximum likelihood estimate of bivariate
2005 May 19
2
plot question
hi all: xlim and ylim are used to define the interval limits of a plot. I'm interested in the scale of values between this limits. suppose xlim=c(0,10) we can have e.g. 0 5 10 0 2 4 6 8 10 0 1 2 3 4 5 6 7 8 9 10 which is the parameter that allows me to modify this? thanks in advance alexandre
2006 Mar 02
2
'...' passed to both plot() and legend()
Dear R-devels, I'd like to create a plot method for a class of objects that passes the '...' argument to both plot() and legend(), e.g., x <- list(data = rnorm(1000)) class(x) <- "foo" plot.foo <- function(x, legend = FALSE, cx = "topright", cy = NULL, ...){ dx <- sort(x$data) plot(dx, dnorm(dx), type = "l", ...) if (legend)
2006 Jun 16
3
Vector Manipulation
I have a vector that has 1,974 elements and each element is one of the following (B, F, N, Y). How do I recreate that vector accept in the place of N put 0 and in the place of B, F or Y put a 1? Thanks, Jacob [[alternative HTML version deleted]]
2007 May 20
2
Number of NA's in every second column
Hi R-users, How do I calculate a number of NA's in a row of every second column in my data frame? As a starting point: dfr <- data.frame(sapply(x, function(x) sample(0:x, 6, replace = TRUE))) dfr[dfr==0] <- NA So, I would like to count the number of NA in row one, two, three etc. of columns X1, X3, X5 etc. Thanks in advance Lauri [[alternative HTML version deleted]]