[R] convergence

Doran, Harold HDoran at air.org
Thu Apr 19 14:31:37 CEST 2007


No, use a while loop. Something like

change <- 1
while(abs(change) > .001 ){
	do stuff
	change <- updated change
}

> -----Original Message-----
> From: r-help-bounces at stat.math.ethz.ch 
> [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of rach.s
> Sent: Thursday, April 19, 2007 8:00 AM
> To: r-help at stat.math.ethz.ch
> Subject: [R] convergence
> 
> 
> hie..
> how can i write a loop that makes algorithm keeps repeating 
> until a solution is converged?do i use a for loop? i know 
> that we can use for loop to ask for a number of repetitions, 
> but how to use it to ask the algorithm to keep repeating 
> until a solution is converged?
> Thanks
> --
> View this message in context: 
> http://www.nabble.com/convergence-tf3606834.html#a10076822
> Sent from the R help mailing list archive at Nabble.com.
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide 
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



More information about the R-help mailing list