similar to: OT: data from Harvey's book

Displaying 20 results from an estimated 2000 matches similar to: "OT: data from Harvey's book"

2009 Sep 11
3
State Space models in R
Hello everybody, I am writing a review paper about State Space models in R, and I would like to cover as many packages as I reasonably can. So far I am familiar with the following tools to deal with SS models: * StructTS, Kalman* (in stats) * packages dse[1-2] * package sspir * package dlm I would like to have some input from users who work with SS models: are there any other packages for SS
2007 Nov 28
0
Package dlm version 0.8-1
I uploaded a new version of package dlm to CRAN. dlm provides functions for maximum likelihood, Kalman filtering and smoothing, and Bayesian analysis of Gaussian linear state space models, also known as Dynamic Linear Models. The most important visible changes from the previous version are the following. 1) Missing values are now allowed in the observations. 2) Extractor and replacement
2007 Nov 28
0
Package dlm version 0.8-1
I uploaded a new version of package dlm to CRAN. dlm provides functions for maximum likelihood, Kalman filtering and smoothing, and Bayesian analysis of Gaussian linear state space models, also known as Dynamic Linear Models. The most important visible changes from the previous version are the following. 1) Missing values are now allowed in the observations. 2) Extractor and replacement
2012 May 09
1
Sweave, beamer and alert within code chunks
Hi all, Using Beamer, in order to highlight a piece of R code I do something like this - note the "\structure" and "\alert" commands: \begin{semiverbatim} > mleOut <- \structure{dlmMLE}(Nile, + parm = c(0.2, 120), # initial values for optimizer + lower = c(1e-7, 0)) \alert<2>{# V must be positive} > mleOut$convergence
2003 Oct 29
1
restarting split.screen
Is there a way of `restarting' split.screen? This is what I am getting: > close.screen() [1] 10 11 12 13 > close.screen(all=TRUE) Error in par(args) : parameter "i" in "mfg" is out of range > graphics.off() > x11() > close.screen() [1] 10 11 12 13 > close.screen(all=TRUE) Error in par(args) : parameter "i" in "mfg" is out of range As
2008 Oct 09
2
Two math expressions in plot
Hello! I am trying to put two math expressions in the title of a plot. As you can see below, I can place correctly one expression at a time, but not both. Ideally I would like to have them separated by a comma. Any suggestions? > k <- 1 > n.eff <- c(20, 30) > ### this works > plot(0,0, main = substitute(n == k, list(k = k))) > ### this works > plot(0,0, main =
2003 Oct 16
1
Improving efficiency in "outer"-like calculation
Hello, I am doing mcmc=10000 simulations from a posterior distribution of the parameters of a mixture of K=6 normal densities. I have mcmc by K matrices simMeans, simVars and simWeights containing the simulation output: one row for each simulation, one column for each normal component of the mixture. One thing I would like to do is a plot of the posterior predictive density. In order to do that
2003 Apr 03
2
Printing zero as dot
I'm pretty sure I've seen some examples of a function printing zero entries in a matrix as dots, but I'm not able to find it now... Any suggestions...? Thanks in advance. (Of course, I might have dreamt of such a function...) Best, Giovanni -- __________________________________________________ [ ] [ Giovanni Petris
2008 Apr 15
1
SVD of a variance matrix
Hello! I suppose this is more a matrix theory question than a question on R, but I will give it a try... I am using La.svd to compute the singular value decomposition (SVD) of a variance matrix, i.e., a symmetric nonnegative definite square matrix. Let S be my variance matrix, and S = U D V' be its SVD. In my numerical experiments I always got U = V. Is this necessarily the case? Or I might
2012 May 25
1
knitr customization
I am trying to transition from Sweave to knitr, but there are a few things about customization of the appearence of R input and output that I did not get yet. Maybe somebody on the list can help me. In my Sweave presentations I used a slanted font for the R input and a normal font for the output, both in a small font. I also indented everything by an extra 2em. All this was achieved by the
2008 May 02
1
GLMM and data manipulation (2nd try)
Hello, I posted a question yesterday but I got no replies, so I'll try to reformulate it in a more concise way. I have the following data, summarizing approval ratings on two different surveys for a random sample of 1600 individuals: > ## Example: Ratings of prime minister (Agresti, Table 12.1, p.494) > rating <- matrix(c(794, 86, 150, 570), 2, 2) > dimnames(rating) <-
2001 Sep 25
1
paste
Just a quick question: I tried > paste(sort(x),collapse="\; ") [1] "1; 1; 3; 4; 4; 7; 12; 19; 23" > paste(sort(x),collapse="\\; ") [1] "1\\; 1\\; 3\\; 4\\; 4\\; 7\\; 12\\; 19\\; 23" How can I get the following? [1] "1\; 1\; 3\; 4\; 4\; 7\; 12\; 19\; 23" Thank you, Giovanni -- __________________________________________________ [
2003 Oct 22
1
comments and Sweave
I am using Sweave to produce handouts for teaching. Is there a way of making Sweave keep the comments following the `#' in the code chuncks? Thanks, Giovanni -- __________________________________________________ [ ] [ Giovanni Petris GPetris at uark.edu ] [ Department of Mathematical Sciences ] [ University of
2005 Mar 22
1
Package vignette and build
Hello, I am writing a package called 'DLM' containing a vignette. The vignette contains a chunck with the function call 'library(DLM)'. This worked fine with 'R CMD check DLM', but when it comes to building the package with 'R CMD build DLM' I get the following error message: * creating vignettes ... ERROR Error: chunk 1 Error in library(DLM) : There is no
2002 May 14
2
tapply and empty subsets
I am using tapply to compute means by group, as in > tapply(y, z, mean) 1 2 3 21.00757 20.50031 NA where y is a vector and z a factor with levels 1:3. I would like to get a zero instead of the NA I get when a subset is empty. The problem is that FUN is not applied to empty cells of the ragged array. (Of course I am willing to define a function my.mean that returns
2002 Aug 02
1
Means of Monte Carlo simulated lists
Hello, I am doing simulations, and I generate a list at each iteration (with three component matrices in the example below), saving the results in a list. For example, after two iterations, I have something like > str(sim.theta) List of 2 $ :List of 3 ..$ : num [1:6, 1:4] -3.67 -1.07 -2.99 -18.38 -3.26 ... ..$ : num [1:6, 1:6] -7.56 -3.14 -4.99 1.03 2.79 ... ..$ : num [1:6, 1:4]
2003 Feb 07
0
confint.lm in MASS
I don't know if this has already come up in the list or elsewhere - a quick search did't show anything relevant - but I think it's worth of mention. The confint.lm function in package MASS doesn't work correctly when called on a subset of parameters. The bug, easy to fix, is that confidence intervals are computed for all parameters anyway, and then assigned to a matrix which is too
2004 May 11
0
Question about predict.multinom()
Hello, This is the fitted model: > fit Call: multinom(formula = resp ~ pred$cls + pred$smoke) Coefficients: (Intercept) pred$cls2 pred$cls3 pred$cls4 pred$cls5 pred$smoke2 pred$smoke3 Proteinuria -1.140520 0.1616644 0.05554898 -0.01584927 0.02574805 -0.4057245 -0.2898425 Hypertension -2.691215 -0.3699690 -0.22582107 0.01615898 0.26318005 0.1239051 0.2413282
2007 Sep 21
2
getAnywhere
Hello, How can I see a function called "+.dlm"? > methods("+") [1] +.Date +.dlm* +.POSIXt Non-visible functions are asterisked > getAnywhere("+.dlm") Error in grep(pattern, x, ignore.case, extended, value, fixed, useBytes) : invalid regular expression '+\.dlm' Thanks in advance, Giovanni -- Giovanni Petris <GPetris at uark.edu>
2010 Aug 18
3
libreadline problem
Hello, Recently updated Ubuntu to 10.04, I have installed the r-base and r-base-dev packages from CRAN with sudo apt-get install r-base But now when I want to start R I get the following error: gpetris at definetti:~$ R /usr/lib/R/bin/exec/R: symbol lookup error: /usr/local/lib/libreadline.so.6: undefined symbol: PC Any clue??? Has anybody seen that before? I have tried to reinstall the