Browse code

modifed man files

git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/Rtreemix@41283 bc3139a8-67e5-0310-9ffc-ced21a209358

Jasmina Bogojeska authored on 21/08/2009 20:38:31
Showing 8 changed files

... ...
@@ -13,34 +13,34 @@ analyzes its variance with the bootstrap method. The \code{data} and
13 13
 the number of trees \code{K} have to be specified. 
14 14
 }
15 15
 \usage{
16
-\S4method{bootstrap}{RtreemixData,numeric}(data, K, ...)
16
+bootstrap(data, K, no.start.sol = 100, eps = 0, weighing = FALSE, 
17
+          equal.edgeweights = TRUE, seed = (-1), B = 1000, 
18
+          conf.interval = 0.05)
17 19
 }
18 20
 
19 21
 \arguments{
20 22
   \item{data}{An \code{RtreemixData} object giving the dataset used for
21 23
     learning the trees mixture model. }
22 24
   \item{K}{An \code{integer} larger than 0 specifying the number of
23
-    branchings in the mixture model.}
24
-  \item{...}{  
25
-    \code{no.start.sol} is an \code{integer} larger than 0 specifying the number of starting solutions for the k-means
26
-    algorithm. The default value is 100.
27
-    \code{eps} is a \code{numeric} giving the minimum conditional probability to include edge. The
28
-    default value is 0.
29
-    \code{weighing} is a \code{logical} specifying whether to use special
30
-      weights log(Pr(v)) for the edges (root, v). The default value is \code{FALSE}.
31
-    \code{equal.edgeweights} is a \code{logical} specifying whether to use
25
+    branchings in the mixture model.} 
26
+  \item{no.start.sol}{An \code{integer} larger than 0 specifying the number of starting solutions for the k-means
27
+    algorithm. The default value is 100.}
28
+  \item{eps}{A \code{numeric} giving the minimum conditional probability to include edge. The
29
+    default value is 0.}
30
+  \item{weighing}{A \code{logical} specifying whether to use special
31
+      weights log(Pr(v)) for the edges (root, v). The default value is \code{FALSE}.}
32
+  \item{equal.edgeweights}{A \code{logical} specifying whether to use
32 33
       equal edge weights in the noise component. The default value is
33 34
       \code{TRUE}. When you have few data samples always use its default value 
34 35
       (\code{TRUE}) to ensure nonzero probabilities for all possible 
35
-      patterns (sets of events).
36
-    \code{seed} is a positive \code{integer} specifying the random generator
36
+      patterns (sets of events).}
37
+  \item{seed}{A positive \code{integer} specifying the random generator
37 38
       seed. The default value is (-1) and then the time is used as a
38
-      random generator.
39
-    \code{B} is an \code{integer} larger than 0 specifying the number of
40
-      bootstrap samples. Its default value is 1000.
41
-    \code{conf.interval} is a \code{numeric} specifying the Confidence level
42
-      for the intervals. Its default value is 0.05.
43
-  }
39
+      random generator.}
40
+  \item{B}{An \code{integer} larger than 0 specifying the number of
41
+      bootstrap samples. Its default value is 1000.}
42
+  \item{conf.interval}{A \code{numeric} specifying the Confidence level
43
+      for the intervals. Its default value is 0.05.}
44 44
 }
45 45
 
46 46
 \value{
... ...
@@ -18,7 +18,8 @@
18 18
 }
19 19
 
20 20
 \usage{
21
-\S4method{confIntGPS}{RtreemixData,numeric}(data, K, ...)
21
+confIntGPS(data, K, sampling.mode = "exponential", sampling.param = 1, 
22
+           no.sim = 10000, B = 1000, equal.star = TRUE)
22 23
 }
23 24
 
24 25
 \arguments{
... ...
@@ -28,25 +29,23 @@
28 29
     of genetic events should NOT be greater than 20.}
29 30
   \item{K}{An \code{integer} larger than 0 specifying the number of
30 31
     branchings in the mixture model.}
31
-  \item{...}{
32
-    \code{sampling.mode} is a \code{character} that specifies the
32
+  \item{sampling.mode}{A \code{character} that specifies the
33 33
       sampling mode ("constant" or "exponential") used in the waiting time
34
-      simulations. Its default value is "exponential".
35
-    \code{sampling.param} is a \code{numeric} that specifies the
34
+      simulations. Its default value is "exponential".}
35
+  \item{sampling.param}{A \code{numeric} that specifies the
36 36
       sampling parameter corresponding to the sampling mode given by
37
-      \code{sampling.mode}. Its default value is 1.
38
-    \code{no.sim} is an \code{integer} larger than 0 giving the number of
37
+      \code{sampling.mode}. Its default value is 1.}
38
+  \item{no.sim}{An \code{integer} larger than 0 giving the number of
39 39
       iterations for the waiting time simulation. Its default values is
40
-      10000.
41
-    \code{B} is an \code{integer} larger than 0 specifying the number of
40
+      10000.}
41
+  \item{B}{An \code{integer} larger than 0 specifying the number of
42 42
       bootstrap samples used in the bootstrap analysis. Its default value
43
-      is 1000.
44
-    \code{equal.star} is a \code{logical} specifying whether to use
43
+      is 1000.}
44
+  \item{equal.star}{A \code{logical} specifying whether to use
45 45
       equal edge weights in the noise component. The default value is
46 46
       \code{TRUE}. When you have few data samples always use its default value 
47 47
       (\code{TRUE}) to ensure nonzero probabilities for all possible 
48
-      patterns (sets of events).
49
-  }
48
+      patterns (sets of events).}
50 49
 }
51 50
 
52 51
 \value{
... ...
@@ -64,7 +63,7 @@
64 63
     confidence intervals are to be calculated should not have more 
65 64
     than 20 genetic events. The reason for this is that the number of all possible patterns 
66 65
     for which the GPS values are calculated during a computationally intensive simulations 
67
-    is in this case \eqn{2^{20}}. This demands too much memory.
66
+    is in this case $2^{20}$. This demands too much memory.
68 67
     The GPS examples are time consuming. They are commented out because of the time restrictions of the check of the package.
69 68
     For trying out the code please copy it and uncomment it.
70 69
 }
... ...
@@ -19,9 +19,12 @@
19 19
  events in the \code{model} cannot exceed 30.
20 20
 }
21 21
 \usage{
22
-\S4method{distribution}{RtreemixModel,missing,missing,missing}(model, sampling.mode, sampling.param, output.param)
23
-\S4method{distribution}{RtreemixModel,character,numeric,numeric}(model, sampling.mode,
24
-sampling.param, output.param)
22
+distribution(model, ...)
23
+
24
+\method{distribution}{model}(model)
25
+
26
+\method{distribution}{model, sampling.mode, sampling.param, output.param}(model, 
27
+                                    sampling.mode, sampling.param, output.param)
25 28
 }
26 29
 \arguments{
27 30
   \item{model}{An \code{RtreemixModel} object that encodes a
... ...
@@ -24,7 +24,8 @@
24 24
 }
25 25
  
26 26
 \usage{
27
-\S4method{fit}{RtreemixData,numeric}(data, K, ...)
27
+fit(data, K, no.start.sol = 100, eps = 0.01, weighing = FALSE, 
28
+    equal.edgeweights = TRUE, seed = (-1), noise = TRUE)
28 29
 }
29 30
 
30 31
 \arguments{
... ...
@@ -32,26 +33,25 @@
32 33
     learning the trees mixture model.}
33 34
   \item{K}{An \code{integer} larger than 0 specifying the number of
34 35
     branchings in the mixture model.}
35
-  \item{...}{
36
-    \code{no.start.sol} is an \code{integer} larger than 0 specifying the number of starting solutions for the k-means
37
-    algorithm. The default value is 100.
38
-    \code{eps} is a \code{numeric} giving the minimum conditional probability to include edge. The
39
-    default value is 0.01.
40
-    \code{weighing} is a \code{logical} specifying whether to use special
41
-    weights log(Pr(v)) for the edges (root, v). The default value is \code{FALSE}.
42
-    \code{equal.edgeweights} is a \code{logical} specifying whether to use
36
+  \item{no.start.sol}{An \code{integer} larger than 0 specifying the number of starting solutions for the k-means
37
+    algorithm. The default value is 100.}
38
+  \item{eps}{A \code{numeric} giving the minimum conditional probability to include edge. The
39
+    default value is 0.01.}
40
+  \item{weighing}{A \code{logical} specifying whether to use special
41
+    weights log(Pr(v)) for the edges (root, v). The default value is \code{FALSE}.}
42
+  \item{equal.edgeweights}{A \code{logical} specifying whether to use
43 43
     equal edge weights in the noise component. The default value is
44 44
     \code{TRUE}. When you have few data samples always use its default value (\code{TRUE}) 
45
-    to ensure nonzero probabilities for all possible patterns (sets of events).
46
-    \code{seed} is a positive \code{integer} specifying the random generator
45
+    to ensure nonzero probabilities for all possible patterns (sets of events).}
46
+  \item{seed}{A positive \code{integer} specifying the random generator
47 47
     seed. The default value is (-1) and then the time is used as a
48
-    random generator.
49
-    \code{noise} is a \code{logical} indicating the presence of a noise
48
+    random generator.}
49
+  \item{noise}{A \code{logical} indicating the presence of a noise
50 50
     (star) component in the fitted mixture model. It is mostly relevant
51 51
     for models with a single tree component, since it is assumed that mixture models with
52
-    at least two components always have the noise as a first component.
53
-  }
52
+    at least two components always have the noise as a first component.}
54 53
 }
54
+
55 55
 \value{
56 56
   The method returns an \code{RtreemixModel} object that represents the
57 57
   K-trees mixture model learned from the given dataset.
... ...
@@ -14,29 +14,28 @@
14 14
   have to be specified.
15 15
 }
16 16
 \usage{
17
-\S4method{generate}{numeric,numeric}(K, no.events, ...)
17
+generate(K, no.events, noise.tree = TRUE, equal.edgeweights = TRUE, 
18
+         prob = c(0, 1), seed = (-1))
18 19
 }
19 20
 \arguments{
20 21
   \item{K}{An \code{integer} larger than 0 specifying the number of
21 22
     branchings in the mixture model.}
22 23
   \item{no.events}{An \code{integer} larger than 0 specifying the number of
23 24
     genetic events in the mixture model.}
24
-  \item{...}{
25
-    \code{noise.tree} is a \code{logical} indicating the presence of a noise
25
+  \item{noise.tree}{A \code{logical} indicating the presence of a noise
26 26
     (star) component in the random mixture model. The default value is
27
-    \code{TRUE}.
28
-    \code{equal.edgeweights} is a \code{logical} specifying whether to use
27
+    \code{TRUE}.}
28
+  \item{equal.edgeweights}{A \code{logical} specifying whether to use
29 29
     equal edge weights in the noise component. The default value is
30
-    \code{TRUE}.
31
-    \code{prob} is a \code{numeric} vector of length 2 specifying the
30
+    \code{TRUE}.}
31
+  \item{prob}{A \code{numeric} vector of length 2 specifying the
32 32
     boundaries for the edge weights of the randomly generated trees. The
33 33
     first component of the vector (the lower boundary) must be smaller
34 34
     than the second component (the upper boundary). The default value
35
-    is (0.0, 1.0).
36
-    \code{seed} is a positive \code{integer} specifying the random generator
35
+    is (0.0, 1.0).}
36
+  \item{seed}{A positive \code{integer} specifying the random generator
37 37
     seed. The default value is (-1) and then the time is used as a
38
-    random generator.
39
-  }
38
+    random generator.}
40 39
 }
41 40
 \value{
42 41
   The method returns an \code{RtreemixModel} object that represents the
... ...
@@ -22,9 +22,13 @@
22 22
 }
23 23
 
24 24
 \usage{
25
-\S4method{gps}{RtreemixModel,RtreemixData}(model, data, ...)
26
-\S4method{gps}{RtreemixModel,matrix}(model, data, ...)
27
-\S4method{gps}{RtreemixModel,missing}(model, data, ...)
25
+gps(model, ...)
26
+
27
+\method{gps}{model, data}(model, data, sampling.mode = "exponential",
28
+                         sampling.param = 1, no.sim = 10, seed = (-1))
29
+
30
+\method{gps}{model}(model, sampling.mode = "exponential",
31
+                    sampling.param = 1, no.sim = 10, seed = (-1))                         
28 32
 }
29 33
 
30 34
 \section{Methods}{\describe{
... ...
@@ -44,19 +48,17 @@
44 48
     containing the samples (patterns of genetic events) for which the GPS values
45 49
     are to be calculated. The length of each of them has to be equal
46 50
     to the number of genetic events in the \code{model}.}
47
-  \item{...}{ 
48
-    \code{sampling.mode} is a \code{character} that specifies the
51
+  \item{sampling.mode}{A \code{character} that specifies the
49 52
     sampling mode ("constant" or "exponential") used in the waiting time
50
-    simulations. Its default value is "exponential".
51
-    \code{sampling.param} is a \code{numeric} that specifies the
53
+    simulations. Its default value is "exponential".}
54
+  \item{sampling.param}{A \code{numeric} that specifies the
52 55
     sampling parameter corresponding to the sampling mode given by
53
-    \code{sampling.mode}. Its default value is 1.
54
-    \code{no.sim} is an \code{integer} larger than 0 giving the number of
55
-    iterations for the waiting time simulations. Its default value is 10.
56
-    \code{seed} is a positive \code{integer} specifying the random generator
56
+    \code{sampling.mode}. Its default value is 1.}
57
+  \item{no.sim}{An \code{integer} larger than 0 giving the number of
58
+    iterations for the waiting time simulations. Its default value is 10.}
59
+  \item{seed}{A positive \code{integer} specifying the random generator
57 60
     seed. Its default value is (-1) and then the time is used as a
58
-    random generator.
59
-  }
61
+    random generator.}
60 62
 }
61 63
 
62 64
 \value{
... ...
@@ -74,7 +76,7 @@
74 76
     The mixture model used for deriving the GPS values should not have more than 
75 77
     20 genetic events. The reason for this is that the number of all possible patterns 
76 78
     for which the GPS values are calculated during a computationally intensive simulations 
77
-    is in this case $2^20$. This demands too much memory.
79
+    is in this case $2^{20}$. This demands too much memory.
78 80
     The GPS examples are time consuming. They are commented out because of the time restrictions of the check of the package.
79 81
     For trying out the code please copy it and uncomment it.
80 82
 } 
... ...
@@ -19,17 +19,14 @@
19 19
 }
20 20
  
21 21
 \usage{
22
-\S4method{plot}{RtreemixModel,missing}(x, y, ...)
22
+plot(x, k, fontSize = 8)
23 23
 }
24 24
 
25 25
 \arguments{
26 26
   \item{x}{An \code{RtreemixModel} object giving the mixture model that should be visualized.}
27
-  \item{y}{Not specified.}
28
-  \item{...}{
29
-    \code{fontSize} is the size of the text labels of the nodes and the edges of the tree components. The default value is 8.
30
-    \code{k} is a \code{numeric} giving the specific tree component from the given mixture model that should be plotted. Its value 
31
-    can be from one to the number of tree components in the given model.
32
-  }
27
+  \item{fontSize}{The size of the text labels of the nodes and the edges of the tree components. The default value is 8.}
28
+  \item{k}{A \code{numeric} giving the specific tree component from the given mixture model that should be plotted. Its value 
29
+    can be from one to the number of tree components in the given model.}
33 30
 }
34 31
 \value{
35 32
   The method returns a plot of the mixture model model.
... ...
@@ -14,10 +14,13 @@
14 14
   patterns together with their waiting and sampling times from the respective model.
15 15
 }
16 16
 \usage{
17
-\S4method{sim}{RtreemixModel,missing,missing}(model, sampling.mode,
18
-sampling.param, ...)
19
-\S4method{sim}{RtreemixModel,character,numeric}(model, sampling.mode,
20
-                            sampling.param, ...)
17
+sim(model, ...)
18
+
19
+\method{sim}{model}(model, no.draws = 10, seed = (-1))
20
+
21
+\method{sim}{model, sampling.mode, sampling.param}(model, sampling.mode, 
22
+                                                   sampling.param, no.sim = 10,
23
+                                                   seed = (-1))
21 24
 }
22 25
 
23 26
 \arguments{
... ...
@@ -29,16 +32,14 @@ sampling.param, ...)
29 32
   \item{sampling.param}{A \code{numeric} that specifies the
30 33
     sampling parameter corresponding to the sampling mode given by
31 34
     \code{sampling.mode}.}
32
-  \item{...}{
33
-    \code{no.draws} is an \code{integer} larger than zero specifying the
34
-    number of patterns that should be drawn from the given mixture model.
35
-    \code{no.sim} is an \code{integer} larger than 0 giving the number of
35
+  \item{no.draws}{An \code{integer} larger than zero specifying the
36
+    number of patterns that should be drawn from the given mixture model.}
37
+  \item{no.sim}{An \code{integer} larger than 0 giving the number of
36 38
     iterations for the waiting time simulations. Its default value is
37
-    10.
38
-    \code{seed} is a positive \code{integer} specifying the random generator
39
+    10.}
40
+  \item{seed}{A positive \code{integer} specifying the random generator
39 41
     seed. Its default value is (-1) and then the time is used as a
40
-    random generator.
41
-  }
42
+    random generator.}
42 43
 }
43 44
 
44 45
 \value{