[R] R won't recognize the order

petals25 renashasmall at gmail.com
Mon Jul 6 21:19:55 CEST 2009


Dear R experts,

I was just wondering why R is not picking up the order that I am putting in. 
Total ordering is the first argument of the sinDAG function from the package
'SIN'.

Description of sinDAG
This function computes the matrix of simultaneous p-values for SIN model
selection for acyclic
directed graphs (DAGs). SIN assumes that a total ordering of the variables
is available (e.g., as a
time-order).

Usage
sinDAG(order,S,n,holm=TRUE)

Arguments
order -  a list of pairwise different integers amongst 1, . . . , p where p
is the number of
variables. This list specifies a total ordering of the variables by the
convention
that a list element is smaller than succeeding list elements.
S - a covariance or correlation matrix.
n - the sample size.
holm - Boolean variable indicating whether Holm’s p-value adjustment should
be used
(holm=TRUE) or not (holm=FALSE).

Value
A matrix of simultaneous p-values with NA on the diagonal.

library(SIN)
data(pubprod)
pvals <-
sinDAG(order=list(5,1,2,3,4,7,6),S=pubprod$corr,n=pubprod$n,holm=TRUE)
plotDAGpvalues(pvals, legend=TRUE, legendpos=NULL)
alpha <- 0.06
amat <- getgraph(pvals, alpha, type="DAG")
library(ggm)
drawGraph(amat)

 I’m using sample data called pubprod from the SIN package, and I was
wondering: Shouldn’t the order specified show up when “pvals” is typed in? 
Further functions that depend on the ordering do not work such as
plotDAGpvalues, and drawGraph from the ggm package.  What to do?  Any help
would be greatly appreciated.



-- 
View this message in context: http://www.nabble.com/R-won%27t-recognize-the-order-tp24361306p24361306.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list