Find Jobs
Hire Freelancers

arima x12 help - repost

£10-15 GBP / hour

Awarded
Posted over 10 years ago

£10-15 GBP / hour

I am trying to run the Arima x12 from the census bureau. [login to view URL] to seasonally adjust historical economics data. Can someone help to resolve this? I have written the sript and it worked before fine, now its throwing up errors. R version 3.0.2 (2013-09-25) -- "Frisbee Sailing" Copyright (C) 2013 The R Foundation for Statistical Computing Platform: i386-w64-mingw32/i386 (32-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or '[login to view URL]()' for an HTML browser interface to help. Type 'q()' to quit R. > rm(list=ls()) > [login to view URL](TZ='GMT') > .libPaths("P:\Rlibs") > library(RODBC) > library(zoo) Attaching package: ‘zoo’ The following objects are masked from ‘package:base’: [login to view URL], [login to view URL] > library(x12) x12 is ready to use. Load the package x12GUI for a Graphical User Interface. It is advised to set the path to the X12 or X13 executables with x12path(validpath) or x13path(validpath)! > > # load data from spreadsheet > [login to view URL] <- "R:\ECONOMICRESEARCH\EM\Emerging Markets - Monthly\Trade\trade script EX [login to view URL]" > channel <- odbcConnectExcel([login to view URL]) > [login to view URL] <- sqlFetch(channel, "Sheet1") > [login to view URL][sh.regressors=="#N/A"] <- NA > close(channel) > > a=[login to view URL]([login to view URL][18,2:ncol([login to view URL])]) > a = a[![login to view URL](a)] > a = ts(a,start = c(2000, 1), frequency = 12) > [login to view URL] <- [login to view URL](a) > > for (currentrow in 2:nrow([login to view URL])) { + setwd("P:\Arima\") + + # look for start date of data series + ok <- [login to view URL](![login to view URL]([login to view URL][currentrow,2:ncol([login to view URL])])) + test = [login to view URL](ts(ok, start = 2000, frequency = 12)) + [login to view URL] = zoo(ts(ok, start = 2000, frequency = 12)) + [login to view URL] <- [login to view URL][test.logic==TRUE] + + # construct a time series with the correct start date + a = [login to view URL]([login to view URL][currentrow,2:ncol([login to view URL])]) + startdate <- substr(time([login to view URL][1]),1,4) + a = ts(a,start = c([login to view URL](startdate), 1), frequency = 12) + + # seasonal adjustment + x12out <- x12(a,x12path="P:\Arima\WinX12\x12a\[login to view URL]",transform="auto", + arima=c(0,1,1),sarima=c(0,1,1),regvariables="lpyear", + sigmalim=c(2.0,3.0),outlier="all") + + # collect results into [login to view URL] + [login to view URL] <- [login to view URL]([login to view URL],[login to view URL](x12out$d11)) + } Error in .local(object, x12Parameter, x12BaseInfo, ...) : unused arguments (x12path = "P:\Arima\WinX12\x12a\[login to view URL]", transform = "auto", arima = c(0, 1, 1), sarima = c(0, 1, 1), regvariables = "lpyear", sigmalim = c(2, 3), outlier = "all") > colnames([login to view URL]) <- [login to view URL]([login to view URL][,1]) Error in `colnames<-`(`*tmp*`, value = c("Albania", "Algeria", "Argentina", : attempt to set 'colnames' on an object with less than two dimensions > > aa# convert time to yearmon Error: object 'aa' not found > [login to view URL] <- zoo([login to view URL],yearmon(time([login to view URL]))) > > # write output to a new spreadsheet > > fileName <- "R:\ECONOMICRESEARCH\EM\Emerging Markets - Monthly\Trade\trade script EX [login to view URL]" > if ([login to view URL](fileName)) {[login to view URL](fileName)} > channel <- odbcConnectExcel(fileName,readOnly=FALSE) > varTypes <- c(date="datetime") > sqlSave(channel=channel, dat=[login to view URL](date=[login to view URL](time([login to view URL])),[login to view URL]),tablename="output",rownames=1,varTypes=varTypes) > close(channel)
Project ID: 5151353

About the project

2 proposals
Remote project
Active 10 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
2 freelancers are bidding on average £15 GBP/hour for this job
User Avatar
As discussed. Sorry for the delay, but I have now placed the bid....................................
£13 GBP in 4 days
5.0 (13 reviews)
4.5
4.5
User Avatar
A proposal has not yet been provided
£13 GBP in 10 days
0.0 (0 reviews)
0.0
0.0
User Avatar
Guaranteed solution provided by an experienced statistical programmer with a PhD degree. The R script will be rewritten and tested by this weekend. Cheers!
£16 GBP in 2 days
0.0 (0 reviews)
0.0
0.0

About the client

Flag of UNITED KINGDOM
United Kingdom
0.0
0
Payment method verified
Member since Nov 20, 2013

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.