[R]

david.whiting@ncl.ac.uk david.whiting at ncl.ac.uk
Tue Mar 25 16:47:15 CET 2003


Try the following function:

student.exercise <- function (i.think.so = TRUE) {
 if (i.think.so) {
 	cat("Hmmm...how many marks do I get for answering this?\n")
	}
	else
	{
	cat("Sorry, my mistake\n")
	}
}


On Tue, Mar 25, 2003 at 12:50:11PM +0100, Cesar Ortega wrote:
> Hi there,
> 
> Thank you in advance for your help.
> 
> I need to do the following:
> 
> 1. Take one file from excell and one from SPSS and with the data 
> calculate:
> 
> ESTIMATED N= SUM {1/PI(i)};  PI is the proportion
> ESTIMATED T(Y)= SUM {Yi/PI(i)};  i belongs to the sample.
> 
> GINMi=[SUMi{(Yi/PI(i))*[1/PI(i)+SUMj(2/PI(j)]}]/[(2*ESTIMATED 
> N*ESTIMATED T)].     i belongs to  M (1000,etc.) times, WHERE j=i+1
> 
> WE HAVE ONLY ONE VARIABLE Y, BUT WITH THE FIRST POSITION i AND THE
> NEXT j, IN THE ASCENDING ORDER.
> 
> And last to get the errors as:
> 
> E1=  [SUMi {|GINP-GINMi |}]/[M] ; i belongs M
> 
> E2= SQRT[SUMi {|GINP-GINMi |}]/[M]; i belongs TO M
> 
> Thanks,
> 
> Cesar Ortega
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help

-- 
Dave Whiting
Dar es Salaam, Tanzania



More information about the R-help mailing list