search for: marg2

Displaying 11 results from an estimated 11 matches for "marg2".

Did you mean: arg2
2024 Aug 09
3
If loop
...tion() { > v <<- v+1 > } > > funC() > cat (v) > #2 > > On Fri, 9 Aug 2024, 09:03 Steven Yen, <styen at ntu.edu.tw> wrote: > > > Thanks. Hmm. The loop is doing what it is supposed to do. > > > > > try1<-function(joint12=FALSE,marg1=FALSE,marg2=FALSE, > > + cond12=FALSE,cond21=FALSE){ > > + # *************************************************** > > + # Testing if loop > > + # *************************************************** > > + if(joint12){ > > + {print ("joint12"); cat(jo...
2024 Aug 09
1
If loop
Thanks. Hmm. The loop is doing what it is supposed to do. > try1<-function(joint12=FALSE,marg1=FALSE,marg2=FALSE, +??????????????? cond12=FALSE,cond21=FALSE){ + # *************************************************** + # Testing if loop + # *************************************************** + if(joint12){ +?? {print ("joint12"); cat(joint12,"\n")} +?? {print ("marg1"); cat(m...
2024 Aug 09
2
If loop
...d I think you want two or more v <- 1 funC <- function() { v <<- v+1 } funC() cat (v) #2 On Fri, 9 Aug 2024, 09:03 Steven Yen, <styen at ntu.edu.tw> wrote: > Thanks. Hmm. The loop is doing what it is supposed to do. > > > try1<-function(joint12=FALSE,marg1=FALSE,marg2=FALSE, > + cond12=FALSE,cond21=FALSE){ > + # *************************************************** > + # Testing if loop > + # *************************************************** > + if(joint12){ > + {print ("joint12"); cat(joint12,"\n")} > +...
2024 Aug 09
3
If loop
Can someone help me with the if loop below? In the subroutine, I initialize all of (joint12,marg1,marg2,cond12,cond21) as FALSE, and call with only one of them being TRUE: ,...,joint12=FALSE,marg1=FALSE,marg2=FALSE,cond12=FALSE,cond21=FALSE,,,, joint12 seems to always kick in, even though I call with, e.g., marg1 being TRUE and everything else being FALSE. My attempts with if... else if were not...
2024 Aug 09
1
If loop
...cat (joint12) } if (marg1) { print("marg 1") cat(marg1) } Would probably be my diagnostic approach On Fri, 9 Aug 2024, 04:45 Steven Yen, <styen at ntu.edu.tw> wrote: > Can someone help me with the if loop below? In the subroutine, I > initialize all of (joint12,marg1,marg2,cond12,cond21) as FALSE, and call > with only one of them being TRUE: > > ,...,joint12=FALSE,marg1=FALSE,marg2=FALSE,cond12=FALSE,cond21=FALSE,,,, > > joint12 seems to always kick in, even though I call with, e.g., marg1 > being TRUE and everything else being FALSE. My attempts wi...
2024 Aug 09
1
If loop
The following (using if else) did not help. Seemed like joint12 always kicked in. ??? me1<-me0<-NULL. ??? if(joint12){ ????? {me1<-cbind(me1,v1$p12);? me0<-cbind(me0,v0$p12)} ??? } else if(marg1) { ????? {me1<-cbind(me1,v1$p1);?? me0<-cbind(me0,v0$p1)} ??? } else if(marg2) { ????? {me1<-cbind(me1,v1$p2);?? me0<-cbind(me0,v0$p2)} ??? } else if(cond12){ ????? {me1<-cbind(me1,v1$pc12); me0<-cbind(me0,v0$pc12)} ??? } else { ????? {me1<-cbind(me1,v1$pc21); me0<-cbind(me0,v0$pc21)} ??? } ... ? labels<-NULL ? if(joint12){ ??? labels<-c(la...
2010 Jan 28
0
using function boot
...ble from the two variables, divides each cell by the sum of the column to obtain percentage, does the median polish, and computes the median of some of the cells: >juste.polish<-function(data,w=rep(1,nrow(data))/nrow(data)) >{tableR<-table(data[,1],data[,2]) > tableP<-tableR > marg2<-apply(tableR,2,sum) > for (i in 1:nrow(tableP)) > {tableP[i,]<-100*(tableR[i,]/marg2)} >juste.medp<-medpolish(tableP) >median(c(juste.medp$residuals[dimnames(juste.medp$residuals)[[1]]=="e<60",1], > juste.medp$residuals[dimnames(juste.medp$residuals...
2024 Aug 11
1
Printing
...bivariate ordered probit probabilities", ??? "\nWritten by Steven T. Yen (Last update: 08.11.24)", ??? "\ny1.level=",???? y1.level, ??? "? y2.level=",???? y2.level, ??? "\njoint12 =",???? joint12, ??? "\nmarg1 =",?????? marg1, ??? "\nmarg2 =",?????? marg2, ??? "\ncond12 =",????? cond12, ??? "\ncond21 =",????? cond21, ??? "\nCovariance matrix:",vb.method, ??? "\nWeighted =",??????? weighted, ??? "\nAt means =",??????? mean, ??? "\nProb x 100 =",????? times100, ???...
2024 Aug 11
1
Printing
...bilities", > ??? "\nWritten by Steven T. Yen (Last update: 08.11.24)", > ??? "\ny1.level=",???? y1.level, > ??? "? y2.level=",???? y2.level, > ??? "\njoint12 =",???? joint12, > ??? "\nmarg1 =",?????? marg1, > ??? "\nmarg2 =",?????? marg2, > ??? "\ncond12 =",????? cond12, > ??? "\ncond21 =",????? cond21, > ??? "\nCovariance matrix:",vb.method, > ??? "\nWeighted =",??????? weighted, > ??? "\nAt means =",??????? mean, > ??? "\nProb x 10...
2024 Aug 11
3
Printing
...???? "\nWritten by Steven T. Yen (Last update: 08.11.24)", >> ???? "\ny1.level=",???? y1.level, >> ???? "? y2.level=",???? y2.level, >> ???? "\njoint12 =",???? joint12, >> ???? "\nmarg1 =",?????? marg1, >> ???? "\nmarg2 =",?????? marg2, >> ???? "\ncond12 =",????? cond12, >> ???? "\ncond21 =",????? cond21, >> ???? "\nCovariance matrix:",vb.method, >> ???? "\nWeighted =",??????? weighted, >> ???? "\nAt means =",??????? mean, >&gt...
2007 Apr 27
4
Randomising matrices
I would like to be able to randomise presence-absence (i.e. binary) matrices whilst keeping both the row and column totals constant. Is there a function in R that would allow me to do this? I'm working with vegetation presence-absence matrices based on field observations. The matrices are formatted to have sites as rows and species as columns. The presence of a species on a site is