similar to: Seasonal ARIMA question - stat package (formerly ts)

Displaying 20 results from an estimated 1000 matches similar to: "Seasonal ARIMA question - stat package (formerly ts)"

2010 Nov 30
1
StructTS with 2 seasons
Dear All, I am trying to fit a structural time series model using the StructTS function (package stats) with only 2 seasons (summer and winter). More than 2 seasons work fine but with 2 seasons I get this error: > fit <- StructTS(y.ts, type="BSM") Error in T[cbind(ind + 1L, ind)] <- 1 : subscript out of bounds I have looked at Prof. Ripley's 2002 RNews article but cannot
2005 Jul 19
1
deriv - accessing numeric output listed under gradient attribute
Hi, I am interested in using the numeric output from the "gradient" attribute of deriv's output in subsequent analyses. But, I have so far been unable to determine how to do so. I will use the example from the deriv help to illustrate. > ## function with defaulted arguments: > (fx <- deriv(y ~ b0 + b1 * 2^(-x/th), c("b0", "b1", "th"),
2008 Sep 11
0
Loop for the convergence of shape parameter
Hello, The likelihood includes two parameters to be estimated: lambda (=beta0+beta1*x) and alpha. The algorithm for the estimation is as following: 1) with alpha=0, estimate lambda (estimate beta0 and beta1 via GLM) 2) with lambda, estimate alpha via ML estimation 3) with updataed alpha, replicate 1) and 2) until alpha is converged to a value I coded 1) and 2) (it works), but faced some
2005 Dec 01
2
Minimizing a Function with three Parameters
Hi, I'm trying to get maximum likelihood estimates of \alpha, \beta_0 and \beta_1, this can be achieved by solving the following three equations: n / \alpha + \sum\limits_{i=1}^{n} ln(\psihat(i)) - \sum\limits_{i=1}^{n} ( ln(x_i + \psihat(i)) ) = 0 \alpha \sum\limits_{i=1}^{n} 1/(psihat(i)) - (\alpha+1) \sum\limits_{i=1}^{n} ( 1 / (x_i + \psihat(i)) ) = 0 \alpha \sum\limits_{i=1}^{n} (
2010 Mar 25
0
help with breaking loops used to fit covariates in nlme model building procedure
Dear All I'm attempting to speed up my model building procedure, but need some help with the loops I've created...please bear with me through the explanation! My basic model call is something like: m0sulf.nlme<-nlme(conc~beta0*exp(-beta1*day)+beta2*exp(-beta3*day), data=m0sulf, fixed=(beta0+beta1+beta2+beta3~1),
2008 Sep 25
0
solving for beta0 in a logsitic regression
Hi all, I am trying to create simulated data for exploring reclassfication measures in a logistic setting with two continuous predictors and I would like to set the average population probability of outcome rather than the logistic beta0. Is there a way to find a beta0 that will generate the desired average population probability of outcome given x,y and their odds ratios? #Here is an
2008 Sep 12
1
Error in "[<-"(`*tmp*`, i, value = numeric(0)) :
I use "while" loop but it produces an errro. I have no idea about this. Error in "[<-"(`*tmp*`, i, value = numeric(0)) : nothing to replace with The problem description is The likelihood includes two parameters to be estimated: lambda (=beta0+beta1*x) and alpha. The algorithm for the estimation is as following: 1) with alpha=0, estimate lambda (estimate beta0
2011 May 04
1
hurdle, simulated power
Hi all-- We are planning an intervention study for adolescent alcohol use, and I am planning to use simulations based on a hurdle model (using the hurdle() function in package pscl) for sample size estimation. The simulation code and power code are below -- note that at the moment the "power" code is just returning the coefficients, as something isn't working quite right. The
2005 May 19
1
R 2.1.0 RH Linux Built from Source Segmentation Fault
Background: I administer a cluster of RedHat EWS 3U4 Linux workstations at a university. I built R 2.1.0 from source: ./configure \ --prefix=/sscc/opt/R-2.1.0 \ --with-blas=no \ 2>&1 \ | tee NUInstall.configure R is now configured for i686-pc-linux-gnu Source directory: . Installation directory: /sscc/opt/R-2.1.0 C compiler:
2008 Aug 22
2
WinBUGS with R
Dear Users, I am new to both of things, so do not blame me too much... I am busy with semiparametric regression and use WinBUGS to sample posteriors. The code to call Winbugs is as follows: data <- list("y","X","n","m") #My variables inits.beta <- rep(0,K) inits.beta0 <- 0 inits <-
2007 Dec 04
1
Metropolis-Hastings within Gibbs coding error
Dear list, After running for a while, it crashes and gives the following error message: can anybody suggest how to deal with this? Error in if (ratio0[i] < log(runif(1))) { : missing value where TRUE/FALSE needed ################### original program ######## p2 <- function (Nsim=1000){ x<- c(0.301,0,-0.301,-0.602,-0.903,-1.208, -1.309,-1.807,-2.108,-2.71) # logdose
2007 Jun 21
0
use ts objects within the "seas" package for seasonal stats ; to compare years with each other for change detection
Hi all, Does anyone know how ts objects ts(base) can be used within the 'seas' package? I would like to obtain seasonal statistics of regular time-series and for example look at the result of the plot.seas.var() function or use the change function() to look at change between periods or time-series. The nottem time-series are similar to the time-series we are analyzing (but with
2006 Aug 26
1
problems with loop
Dear all, I am trying to evaluate the optimisation behaviour of a function. Originally I have optimised a model with real data and got a set of parameters. Now I am creating simulated data sets based on these estimates. With these simulations I am estimating the parameters again to see how variable the estimation is. To this end I have written a loop which should generate a new simulated data
2013 Jan 18
0
problem that arises after using the new version of "BRugs"
Respected Sir, With reference to my mail to you and the reply mail by you dated 9th and 16th January, 2013, I am sending the reproducible code in the attached document named " MODIFIED ANS ". I am also attaching the txt file named "hazModel", which is required to save in my documents folder to run the program. The file also contains the error message
2012 Jul 02
1
How to get prediction for a variable in WinBUGS?
Dear all,I am a new user of WinBUGS and need your help. After running the following code, I got parameters of beta0 through beta4 (stats, density), but I don't know how to get the prediction of the last value of h, the variable I set to NA and want to model it using the following code.Does anyone can given me a hint? Any advice would be greatly appreciated.Best
2012 Dec 04
1
Winbugs from R
Hi, I am trying to covert a Winbugs code into R code. Here is the winbugs code model{# model’s likelihoodfor (i in 1:n){time[i] ~ dnorm( mu[i], tau ) # stochastic componenent# link and linear predictormu[i] <- beta0 + beta1 * cases[i] + beta2 * distance[i]}# prior distributionstau ~ dgamma( 0.01, 0.01 )beta0 ~ dnorm( 0.0, 1.0E-4)beta1 ~ dnorm( 0.0, 1.0E-4)beta2 ~ dnorm( 0.0, 1.0E-4)#
2011 Nov 14
0
Enquiry about 2nd-order interactions survival analysis
David's answers were correct. You are looking deep into the code when there is no reason to to so. 1. h(t|(X=x,Z=z)) = exp(Beta0 + XZBeta1) Most statisticians will tell you that this is an unwise model. The reason is that if you replace X with "X+1" the fit changes, which is almost never desirable. What if someone coded your dummy variable as 1/0 instead of 0/1 -- wouldn't
2020 Oct 29
1
R: sim1000G
Hi, I am using the sim1000G R package to simulate data for case/control study. I can not figure out how to manipulate this code to be able to generate 10% or 50% causal SNPs in R. This is whole code provided as example on GitHub: library(sim1000G) vcf_file = "region-chr4-357-ANK2.vcf.gz" #nvariants = 442, ss=1000 vcf = readVCF( vcf_file, maxNumberOfVariants = 442 ,min_maf =
2010 Apr 11
1
Matrix is not symmetric under lme4
Dear all, My code is presented as the following. library(MASS) library(rmutil) library(repeated) library(lme4) library(arm) #install.packages("Zelig", repos = "http://gking.harvard.edu") library(Zelig) rm(list = ls()) beta0<-2.5 beta1<--0.3 sigs2<-0.5 I<-4 #numberpatients<-c(40,100,160,200,400,600) numberpatients<-c(1000) #numberpatients<-3 times<-1
2012 May 27
7
Customized R Regression Output?
Hello R-Experts, I am facing the problem that I have to estimate several parameters for a lot of different dependent variables. One single regression looks something like this: y = beta0 + beta1 * x1 + beta2 * x2 + beta3 * x1 * x2 + beta4 * x4 + beta5 * lag(x4,-1) where y is the dependent variable and xi are the independent ones. Important to me are the different estimates of betai and their