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, 2022 in Data Analytics by Avinash
• 1,260 points
165 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 Jun 24, 2022 in Data Analytics by Sohail
• 3,040 points
319 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,740 points
2,328 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
639 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
1,653 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
876 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
2,023 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
3,399 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,740 points
619 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,595 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
10,229 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP