Hey all,
I'm trying to get a significance score along with the pearson correlation I'm running. I couldn't find a way to do it.
Any help is appreciated!
@NeilR has created a macro that parses the report output and brings the data back into lt Alteryx; the original post can be found at this link: http://community.alteryx.com/t5/Advanced-Analytics/Pulling-data-from-Linear-Regression-report-output/m-p/608#U608
I have attached the macro here for ease of use - hope it helps!
The p-values are given in the report output of the associtation analysis tool - for example:
Hey Sean, Thanks for that. I did see the association analysis but it produces a report rather than something I can use within my workflow. (Unless there's a workaround)
If I were to take your example, I want to create a table correlating one variable to multiple variables
Trans
Trans Correlation (pvalue)
MPG Correlation (pvalue)
Cyl Correlation (pvalue)
Disp Correlation (pvalue)
And then use that table to summarize etc further.
Think I could do that with the association analysis? or maybe somehow at least pull the results from the table
Hello SeanL,
I tried using both the R Tool and the suggested macro to extract objects from the Association Analysis tool. Tried several R syntaxes in the R Tool but all fail to identify the input object as a table, same for the macro on the link you posted. I think this is due to the fact that when this macro or the R tool are used they are based on inputs from tools designed to operate based on the previous R object inside the macro, not sure, if you can clarify I would be gratefull.
Thanks!
If I am understanding your question correctly there are two things going on:
1) Serialized R Objects
The R Tool reads in Alteryx data as either a data frame or a list. Usually the data is numeric, text, factors, etc; but we can also pass serialized R objects. For example, this is how we pass model objects from the linear regression tool to the score tool or the stepwise tool.
For example:
We could create a model in the first R Tool and write it out to the Alteryx data stream (Typically, we write out model obects as a record with two columns: Name and Object):
# Create a list with the model object and its name and write it out via# the third outputmodel.name <- validName('%Question.model.name%')the.obj <- vector(mode="list", length=2)the.obj[[1]] <- c(model.name)the.obj[[2]] <- list(the.model)names(the.obj) <- c("Name", "Object")write.Alteryx(the.obj, nOutput = 3)
And then in another R Tool we could read in the model object:
# Read in the model object from the first input streammod.obj <- read.Alteryx("#1")orig.model <- unserializeObject(as.character(mod.obj$Object))
2) Report Objects
The reports generated by the predictive tools are the same as any of the reports generated using the reporting tools. The macro created by @NeilR expects a report as an input, which will be a record that looks like this:
Let me know if this helps answer your question!