https www edureka co community 183864 mean-of-categorical-variables-from-plyr-package

0 votes
I'm modelling with the fpp2 package's data set uschange and the vars package's Augmented Dickey-Fuller unit root test (ADF test). I have five series with the designations "Consumption," "Income," "Production," "Savings," and "Unemployment" in this example. The following is the code:

#CODE

library(fpp2)

library(vars)

#CODE

library(fpp2)

library(vars)

MY DATA<-data.frame(uschange)

MY ADF TESTS=apply(MY DATA,2,function(x){

return(

list(

#Constant

summary(ur.df(x, type = "drift", selectlags = c("BIC")), summary(ur.df(x, type = "drift"), summary(ur.df(x, type = "drift"), summary(ur.df(x

summary(ur.df(diff(x), type = "drift", selectlags = c("BIC")), summary(ur.df(diff(x), type = "drift"), summary(ur.df(diff(x), type = "drift"), summary(ur.d

#Trend

#Constant

summary(ur.df(x, type = "trend", selectlags = c("BIC")), summary(ur.df(x, type = "trend"), summary(ur.df(x, type = "trend"), summary(ur.df(x,

summary(ur.df(diff(x), type = "trend", selectlags = c("BIC"))) summary(ur.df(diff(x), type = "trend", selectlags = c("BIC")) summary(ur.df(diff(x),

#summary(ur.df(x, type = "none",selectlags = c("BIC")) ur.df(x, type = "none",selectlags = c("BIC")) ur.df(x, type = "none

)

)

})

The following is the list's structure:

fill in the blanks with the image's description

fill in the blanks with the image's description

As a result, the next step is to extract test statistics and critical values from each series in this list and enter them into a table. This is where you may find test statistics and crucial values.
Jun 17 in Data Analytics by Avinash
• 1,260 points
8 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In Data Analytics

0 votes
1 answer

Mean of categorical variables from plyr package

df<-data.frame(risk= rep(c("ADV","HHM","POV"),10), ...READ MORE

answered 4 days ago in Data Analytics by Sohail
• 2,280 points
5 views
0 votes
1 answer

How to create dummy variables based on a categorical variable of lists in R?

You can use mtabulate in the following way: library(qdapTools) cbind(data[1], ...READ MORE

answered Apr 13, 2018 in Data Analytics by CodingByHeart77
• 3,720 points
1,638 views
0 votes
1 answer

How to Share the files from local system Mac Book to Edureka VM

Hey Satya, Hope you're doing great. Would you please ...READ MORE

answered Dec 18, 2017 in Data Analytics by Sudhir
• 1,610 points
298 views
+1 vote
2 answers

Custom Function to replace missing values in a vector with the mean of values

Try this. lapply(a,function(x){ifelse(is.na(x),mean(a,na.rm = TRUE ...READ MORE

answered Aug 14, 2019 in Data Analytics by anonymous
957 views
+1 vote
2 answers

Finding number of missing values and removing those missing values from a data-frame

To find number of missing values for ...READ MORE

answered Aug 14, 2019 in Data Analytics by anonymous
458 views
0 votes
1 answer

By using dpylr package sum of multiple columns

Basically here we are making an equation ...READ MORE

answered Apr 5, 2018 in Data Analytics by DeepCoder786
• 1,720 points
1,555 views
0 votes
1 answer

How to find out the sum/mean for multiple variables per group in R?

You can use the reshape2 package for ...READ MORE

answered Apr 12, 2018 in Data Analytics by DataKing99
• 8,240 points
2,581 views
0 votes
1 answer

How to install an R package from source?

If you have your file located locally ...READ MORE

answered Apr 14, 2018 in Data Analytics by CodingByHeart77
• 3,720 points
270 views
0 votes
1 answer

How can I install older version of R package ?

Supposedly you want to install some old ...READ MORE

answered May 14, 2018 in Data Analytics by zombie
• 3,790 points
1,118 views
0 votes
1 answer

Assigning global variables from inside a function - R

You can assign global variables from inside ...READ MORE

answered May 15, 2018 in Data Analytics by Bharani
• 4,660 points
5,575 views
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP