~l3on/ubuntu/precise/rkward/rebuild1

« back to all changes in this revision

Viewing changes to tests/analysis_plugins/RKTestStandard.box_test.rkcommands.R

  • Committer: Bazaar Package Importer
  • Author(s): Thomas Friedrichsmeier
  • Date: 2009-10-26 14:30:00 UTC
  • mfrom: (1.1.13 upstream) (6.1.4 sid)
  • Revision ID: james.westby@ubuntu.com-20091026143000-wzwt6cryjnwce23k
Tags: 0.5.2-1
* new upstream release
  closes: #551306 (added support for the new dynamic help system)
* Add "DM-Upload-Allowed: yes" in control
* bump standards version to 3.8.3 (no changes needed)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
local({
 
2
## Prepare
 
3
## Compute
 
4
objects <- list (substitute (test50x), substitute (test10y))
 
5
results <- data.frame ('Variable Name'=rep (NA, length (objects)), check.names=FALSE)
 
6
for (i in 1:length (objects)) {
 
7
        results[i, 'Variable Name'] <- rk.get.description (objects[[i]], is.substitute=TRUE)
 
8
        var <- eval (objects[[i]], envir=globalenv ())
 
9
        results[i, 'Length'] <- length (var)
 
10
        results[i, 'NAs'] <- sum (is.na(var))
 
11
 
 
12
        try ({
 
13
                test <- Box.test (var, lag = 1, type = "Box-Pierce")
 
14
                results[i, 'X-squared'] <- test$statistic
 
15
                results[i, 'degrees of freedom'] <- test$parameter
 
16
                results[i, 'p-value'] <- test$p.value
 
17
        })
 
18
}
 
19
## Print result
 
20
rk.header ("Box-Pierce Test",
 
21
        parameters=list ("lag", "1", "type", "Box-Pierce"))
 
22
 
 
23
rk.results (results)
 
24
})
 
25
.rk.rerun.plugin.link(plugin="rkward::Box_test", settings="lag.real=1.00\nlength.state=1\nnarm.state=0\ntype.string=Box-Pierce\nx.available=test50x\\ntest10y", label="Run again")
 
26
.rk.make.hr()