plotting of graph in R - AnalyticBridge2019-08-21T07:01:15Zhttps://www.analyticbridge.datasciencecentral.com/forum/topics/plotting-of-graph-in-r?groupUrl=miningterabytesofdata&commentId=2004291%3AComment%3A204133&groupId=2004291%3AGroup%3A11659&feed=yes&xn_auth=noHi again!
I wanted to find t…tag:www.analyticbridge.datasciencecentral.com,2012-07-31:2004291:Comment:2046272012-07-31T03:03:46.411Zjadelimhttps://www.analyticbridge.datasciencecentral.com/profile/jadelim
<p>Hi again! </p>
<p>I wanted to find the correlation between RateA and RateB. I've tried the method using regression. Is there any other method that I can use to find the correlation?</p>
<p></p>
<p>Another scenario here. The above one was RateA and RateB, both are number.</p>
<p>If i would like to plot a graph with RateA, another is with it's name. How can it be done. because i tried but with error.</p>
<p>Error: unexpected ')' in "plot</p>
<p></p>
<p>Hi again! </p>
<p>I wanted to find the correlation between RateA and RateB. I've tried the method using regression. Is there any other method that I can use to find the correlation?</p>
<p></p>
<p>Another scenario here. The above one was RateA and RateB, both are number.</p>
<p>If i would like to plot a graph with RateA, another is with it's name. How can it be done. because i tried but with error.</p>
<p>Error: unexpected ')' in "plot</p>
<p></p> You can use more conditions i…tag:www.analyticbridge.datasciencecentral.com,2012-07-27:2004291:Comment:2043532012-07-27T06:15:21.748ZBalázs Bárányhttps://www.analyticbridge.datasciencecentral.com/profile/BalazsBarany
<p>You can use more conditions in the subsetting.</p>
<p></p>
<p>e.g. RateA[<span>RateA >40 & RateA < 50 & RateB > 40 & RateB<50</span>]</p>
<p></p>
<p>You didn't tell us anything about your problem. What is the target variable?</p>
<p></p>
<p>Regression methods are for numeric prediction: Which numeric value will the target variable get, given the input variables?</p>
<p></p>
<p>Classification is for separating test cases into two or more groups. Will it rain tomorrow?…</p>
<p>You can use more conditions in the subsetting.</p>
<p></p>
<p>e.g. RateA[<span>RateA >40 & RateA < 50 & RateB > 40 & RateB<50</span>]</p>
<p></p>
<p>You didn't tell us anything about your problem. What is the target variable?</p>
<p></p>
<p>Regression methods are for numeric prediction: Which numeric value will the target variable get, given the input variables?</p>
<p></p>
<p>Classification is for separating test cases into two or more groups. Will it rain tomorrow? Which species is an iris flower?</p>
<p></p>
<p>Association methods predict the value of some variables in a data set using other variables. The classical example is the market basket: Given "sausage" and "cheese", will the customer also buy "bread" and "milk"?</p> Hi. What if for now i would l…tag:www.analyticbridge.datasciencecentral.com,2012-07-27:2004291:Comment:2043512012-07-27T03:16:28.853Zjadelimhttps://www.analyticbridge.datasciencecentral.com/profile/jadelim
<p>Hi. What if for now i would like to plot the Rate between 40 to 50. How do I type the command.</p>
<p>I'm a little confused by the operators to use for between. </p>
<p>Also, other than linear regression. I can also use association or classification method to find the relationship between Rate A and Rate B right?</p>
<p>Hi. What if for now i would like to plot the Rate between 40 to 50. How do I type the command.</p>
<p>I'm a little confused by the operators to use for between. </p>
<p>Also, other than linear regression. I can also use association or classification method to find the relationship between Rate A and Rate B right?</p> I think that the following co…tag:www.analyticbridge.datasciencecentral.com,2012-07-25:2004291:Comment:2041332012-07-25T15:49:43.713ZMargot Tollefsonhttps://www.analyticbridge.datasciencecentral.com/profile/MargotTollefson
<p>I think that the following command that will do the plot,</p>
<p> </p>
<p>plot(RateA[RateA<150 & RateB<150], RateB[RateA<150 & RateB<150], data=data.table) .</p>
<p> </p>
<p>I am not sure if you can use the data=data.table in plot the same way the association is used in regression functions. If not, you will have to use the full variable names.</p>
<p> </p>
<p>Hope this is helpful.</p>
<p>Margot</p>
<p>I think that the following command that will do the plot,</p>
<p> </p>
<p>plot(RateA[RateA<150 & RateB<150], RateB[RateA<150 & RateB<150], data=data.table) .</p>
<p> </p>
<p>I am not sure if you can use the data=data.table in plot the same way the association is used in regression functions. If not, you will have to use the full variable names.</p>
<p> </p>
<p>Hope this is helpful.</p>
<p>Margot</p> Hi!
Yes, this is exactly how…tag:www.analyticbridge.datasciencecentral.com,2012-07-25:2004291:Comment:2039652012-07-25T12:25:44.917ZBalázs Bárányhttps://www.analyticbridge.datasciencecentral.com/profile/BalazsBarany
<p>Hi!</p>
<p></p>
<p>Yes, this is exactly how you use linear regression to analyse the (linear) relationship between two variables. </p>
<p></p>
<p>The most interesting output from summary() is the (Intercept) line and the one below that, starting with RateB. The Estimate column shows the slope of the regression line and the Pr(>|t|) column the confidence of the metric.</p>
<p></p>
<p>Please read one of the multiple R introductions online or in a book about what the summary output from lm…</p>
<p>Hi!</p>
<p></p>
<p>Yes, this is exactly how you use linear regression to analyse the (linear) relationship between two variables. </p>
<p></p>
<p>The most interesting output from summary() is the (Intercept) line and the one below that, starting with RateB. The Estimate column shows the slope of the regression line and the Pr(>|t|) column the confidence of the metric.</p>
<p></p>
<p>Please read one of the multiple R introductions online or in a book about what the summary output from lm models means and about regression diagnostics.</p>
<p></p>
<p>It is very hard to google for R specific information. There is a specific search engine on <a href="http://www.r-project.org" target="_blank">www.r-project.org</a>, and also FAQs and manuals.</p> i have one command here doing…tag:www.analyticbridge.datasciencecentral.com,2012-07-25:2004291:Comment:2039552012-07-25T06:30:03.861Zjadelimhttps://www.analyticbridge.datasciencecentral.com/profile/jadelim
<p>i have one command here doing with lm.</p>
<p>>attach(data.table)</p>
<p>>plot(RateA, RateB)</p>
<p>>ahmetrics = lm(RateA~RateB)</p>
<p>>summary(ahmetrics) </p>
<p>>abline(ahmetrics)</p>
<p></p>
<p>the above command can find the relationship between RateA and RateB? this is using the linear regression method.</p>
<p>i have one command here doing with lm.</p>
<p>>attach(data.table)</p>
<p>>plot(RateA, RateB)</p>
<p>>ahmetrics = lm(RateA~RateB)</p>
<p>>summary(ahmetrics) </p>
<p>>abline(ahmetrics)</p>
<p></p>
<p>the above command can find the relationship between RateA and RateB? this is using the linear regression method.</p> rnorm(50) gives you 50 random…tag:www.analyticbridge.datasciencecentral.com,2012-07-24:2004291:Comment:2038542012-07-24T10:35:49.702ZBalázs Bárányhttps://www.analyticbridge.datasciencecentral.com/profile/BalazsBarany
<p>rnorm(50) gives you 50 random numbers.</p>
<p></p>
<p>It was an attempt to create a dataset that has the same structure as your dataset.</p>
<p></p>
<p>You can't plot vectors with differing lengths. This is why the plot(ra, rb) command fails. Your original attempt, if it worked, would fail in the same way.</p>
<p></p>
<p>Use the subset method with your original data.table for the plot.</p>
<p>rnorm(50) gives you 50 random numbers.</p>
<p></p>
<p>It was an attempt to create a dataset that has the same structure as your dataset.</p>
<p></p>
<p>You can't plot vectors with differing lengths. This is why the plot(ra, rb) command fails. Your original attempt, if it worked, would fail in the same way.</p>
<p></p>
<p>Use the subset method with your original data.table for the plot.</p> Hi, you can use the cor() fun…tag:www.analyticbridge.datasciencecentral.com,2012-07-24:2004291:Comment:2039332012-07-24T10:33:29.303ZBalázs Bárányhttps://www.analyticbridge.datasciencecentral.com/profile/BalazsBarany
<p>Hi, you can use the cor() function for determining if a linear correlation exists. Or you try to model the relationship with a linear model (lm), a generalized linear model (glm) etc.</p>
<p>Hi, you can use the cor() function for determining if a linear correlation exists. Or you try to model the relationship with a linear model (lm), a generalized linear model (glm) etc.</p> Hi again. I'm sorry because I…tag:www.analyticbridge.datasciencecentral.com,2012-07-24:2004291:Comment:2036292012-07-24T09:55:39.195Zjadelimhttps://www.analyticbridge.datasciencecentral.com/profile/jadelim
<p>Hi again. I'm sorry because I am still very new to R and is unfamiliar with the scripting.</p>
<p>May I know what does the below command means? i have thousands of data in my dataset but as i follow the command you gave me. the graph came out with only less than a hundred i guess?</p>
<p><span>RateA <- (rnorm(50) + 2) * 100</span><br></br><span>RateB <- (rnorm(50) + 2) * 100</span></p>
<p><span> </span></p>
<p><span>for the last command</span></p>
<p><span>plot (ra, rb). it does give an…</span></p>
<p>Hi again. I'm sorry because I am still very new to R and is unfamiliar with the scripting.</p>
<p>May I know what does the below command means? i have thousands of data in my dataset but as i follow the command you gave me. the graph came out with only less than a hundred i guess?</p>
<p><span>RateA <- (rnorm(50) + 2) * 100</span><br/><span>RateB <- (rnorm(50) + 2) * 100</span></p>
<p><span> </span></p>
<p><span>for the last command</span></p>
<p><span>plot (ra, rb). it does give an error. any idea how to solve the error in order to plot?</span></p>
<p><span> </span></p>
<p><span>thanks in advance! </span></p>
<p><span> </span></p> Hi. May I know which method i…tag:www.analyticbridge.datasciencecentral.com,2012-07-24:2004291:Comment:2036902012-07-24T09:13:04.380Zjadelimhttps://www.analyticbridge.datasciencecentral.com/profile/jadelim
<p>Hi. May I know which method is this?</p>
<p>I want to identify RateA and Rate B relationship. like what is their link. so which method would be more suitable in this case.</p>
<p>Anyway, thanks for the help.</p>
<p>Hi. May I know which method is this?</p>
<p>I want to identify RateA and Rate B relationship. like what is their link. so which method would be more suitable in this case.</p>
<p>Anyway, thanks for the help.</p>