Displaying 10 results from an estimated 10 matches for "marg1".
Did you mean:
arg1
2024 Aug 09
3
If loop
...C <- 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&qu...
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&q...
2024 Aug 09
2
If loop
...ne object and 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&quo...
2024 Aug 09
1
If loop
Is something wrong in the initialisation part that we don't see?
joint12 <- marg1 <-F
marg1 <-T
if (joint12) {
print ("joint 12")
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 lo...
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 we...
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<-cb...
2024 Aug 11
1
Printing
...ut)),]
if(printing){
cat("\nAPPs of 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,
??? "...
2024 Aug 11
1
Printing
..."\nAPPs of 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 =&q...
2024 Aug 11
3
Printing
...riate 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,
>> ?...
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