@@ -46,10 +46,10 @@ Read in a `nexml` file into the `ape::phylo` format:
46
46
f <- system.file(" examples" , " comp_analysis.xml" , package = " RNeXML" )
47
47
nexml <- nexml_read(f)
48
48
tr <- get_trees(nexml) # or: as(nexml, " phylo" )
49
- plot(tr[[1]] )
49
+ plot(tr)
50
50
```
51
51
52
- 
52
+ 
53
53
54
54
55
55
Write an `ape::phylo` tree into the `nexml` format:
@@ -256,19 +256,60 @@ We can then fire up `geiger` and fit, say, a Brownian motion model the continuou
256
256
257
257
```coffee
258
258
library(geiger)
259
- fitContinuous(tree, traits[[1]])
260
- ```
261
-
262
- ```
263
- ## Error: names for ' data' must be supplied
259
+ fitContinuous(tree, traits[1])
260
+ ```
261
+
262
+ ```
263
+ ## GEIGER-fitted comparative model of continuous data
264
+ ## fitted ' BM' model parameters:
265
+ ## sigsq = 1.166011
266
+ ## z0 = 0.255591
267
+ ##
268
+ ## model summary:
269
+ ## log-likelihood = -20.501183
270
+ ## AIC = 45.002367
271
+ ## AICc = 46.716652
272
+ ## free parameters = 2
273
+ ##
274
+ ## Convergence diagnostics:
275
+ ## optimization iterations = 100
276
+ ## failed iterations = 0
277
+ ## frequency of best fit = 1.00
278
+ ##
279
+ ## object summary:
280
+ ## ' lik' -- likelihood function
281
+ ## ' bnd' -- bounds for likelihood search
282
+ ## ' res' -- optimization iteration summary
283
+ ## ' opt' -- maximum likelihood parameter estimates
264
284
```
265
285
266
286
```coffee
267
- fitDiscrete(tree, traits[[2]])
268
- ```
269
-
270
- ```
271
- ## Error: names for ' data' must be supplied
287
+ fitDiscrete(tree, traits[2])
288
+ ```
289
+
290
+ ```
291
+ ## GEIGER-fitted comparative model of discrete data
292
+ ## fitted Q matrix:
293
+ ## 0 1
294
+ ## 0 -0.07308 0.07308
295
+ ## 1 0.07308 -0.07308
296
+ ##
297
+ ## model summary:
298
+ ## log-likelihood = -4.574133
299
+ ## AIC = 11.148266
300
+ ## AICc = 11.648266
301
+ ## free parameters = 1
302
+ ##
303
+ ## Convergence diagnostics:
304
+ ## optimization iterations = 100
305
+ ## failed iterations = 0
306
+ ## frequency of best fit = 1.00
307
+ ##
308
+ ## object summary:
309
+ ## ' lik' -- likelihood function
310
+ ## ' bnd' -- bounds for likelihood search
311
+ ## ' res' -- optimization iteration summary
312
+ ## ' opt' -- maximum likelihood parameter estimates
272
313
```
273
314
274
315
0 commit comments