tag:blogger.com,1999:blog-7958828565254404797.post4167168036893462925..comments2024-03-28T07:44:59.527-07:00Comments on ListenData: Logistic Regression with RDeepanshu Bhallahttp://www.blogger.com/profile/09802839558125192674noreply@blogger.comBlogger28125tag:blogger.com,1999:blog-7958828565254404797.post-51286130936789759732021-05-23T08:28:11.568-07:002021-05-23T08:28:11.568-07:00In the line "sx <- sapply(regmodel$model[-...In the line "sx <- sapply(regmodel$model[-1], sd)" change [-1] to [1] and the problem "Error in var(if (is.vector(x) || is.factor(x)) x else as.double(x), na.rm = na.rm) : Calling var(x) on a factor x is defunct.<br /> Use something like 'all(duplicated(x)[-1L])' to test for a constant vector." was gone. Ulisses Oliveirahttps://www.blogger.com/profile/04710071153653029524noreply@blogger.comtag:blogger.com,1999:blog-7958828565254404797.post-72734142115080517532021-05-23T08:27:27.864-07:002021-05-23T08:27:27.864-07:00In the line "sx <- sapply(regmodel$model[-...In the line "sx <- sapply(regmodel$model[-1], sd)" change [-1] to [1]. I did this and followed along. Ulisses Oliveirahttps://www.blogger.com/profile/04710071153653029524noreply@blogger.comtag:blogger.com,1999:blog-7958828565254404797.post-80085411767617448692021-05-23T08:26:36.053-07:002021-05-23T08:26:36.053-07:00This comment has been removed by the author.Ulisses Oliveirahttps://www.blogger.com/profile/04710071153653029524noreply@blogger.comtag:blogger.com,1999:blog-7958828565254404797.post-15741145075312457542020-11-15T06:49:18.387-08:002020-11-15T06:49:18.387-08:00Hello!
i am getting an error:
> std.Coeff = da...Hello!<br />i am getting an error:<br /><br />> std.Coeff = data.frame(Standardized.Coeff = stdz.coff(mylogit))<br />Error in var(if (is.vector(x) || is.factor(x)) x else as.double(x), na.rm = na.rm) :<br />Calling var(x) on a factor x is defunct.<br />Use something like 'all(duplicated(x)[-1L])' to test for a constant vector.<br /><br />can u help what it's mean?<br />norahttps://www.blogger.com/profile/12379578564726703560noreply@blogger.comtag:blogger.com,1999:blog-7958828565254404797.post-59273152793510973672020-05-23T23:33:23.420-07:002020-05-23T23:33:23.420-07:00I am getting an error for these line of codes...
s...I am getting an error for these line of codes...<br />std.Coeff<-data.frame(Standardized.Coeff = stdz.coff(mylogit))<br />std.Coeff<-cbind(Variable = row.names(std.Coeff), std.Coeff)<br />row.names(std.Coeff) = NULL<br /><br />the error message is:<br /> <br />std.Coeff<-data.frame(Standardized.Coeff = stdz.coff(mylogit))<br /> Error in var(if (is.vector(x) || is.factor(x)) x else as.double(x), na.rm = na.rm) : <br /> Calling var(x) on a factor x is defunct.<br /> Use something like 'all(duplicated(x)[-1L])' to test for a constant vector. > std.Coeff<-cbind(Variable = row.names(std.Coeff), std.Coeff)<br />Error in row.names(std.Coeff) : object 'std.Coeff' not found<br />> row.names(std.Coeff) = NULL<br />Error in row.names(std.Coeff) = NULL : object 'std.Coeff' not foundAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-7958828565254404797.post-80357812747635781272020-04-22T13:40:03.284-07:002020-04-22T13:40:03.284-07:00I am getting an error:
> std.Coeff = data.fram...I am getting an error:<br /><br />> std.Coeff = data.frame(Standardized.Coeff = stdz.coff(mylogit))<br /> Error in var(if (is.vector(x) || is.factor(x)) x else as.double(x), na.rm = na.rm) : <br /> Calling var(x) on a factor x is defunct.<br /> Use something like 'all(duplicated(x)[-1L])' to test for a constant vector. Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-7958828565254404797.post-32271873715213689622020-04-22T13:38:48.514-07:002020-04-22T13:38:48.514-07:00oops copy/pasted the old address. The new address...oops copy/pasted the old address. The new address is:<br /><br />mydata <- read.csv("https://stats.idre.ucla.edu/stat/data/binary.csv")Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-7958828565254404797.post-17155474722586395562020-04-22T13:37:14.123-07:002020-04-22T13:37:14.123-07:00data has been moved to:
mydata <- read.csv(&q...data has been moved to:<br /><br /> mydata <- read.csv("http://www.ats.ucla.edu/stat/data/binary.csv")Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-7958828565254404797.post-86594248479449568092018-02-09T08:30:03.583-08:002018-02-09T08:30:03.583-08:00Hello. Thank you for this great work.
I am receiv...Hello. Thank you for this great work. <br />I am receiving aN ERROR:<br /><br />> xtabs(~admit + rank, data = mydata)<br />Error in eval(expr, envir, enclos) : object 'admit' not found<br /><br />Any input is welcome!Anonymoushttps://www.blogger.com/profile/11430018759091342078noreply@blogger.comtag:blogger.com,1999:blog-7958828565254404797.post-6819750518208301182017-10-06T09:47:31.153-07:002017-10-06T09:47:31.153-07:00Thanks a lot for clearing my doubt. I have used Li...Thanks a lot for clearing my doubt. I have used Listen data many times. It has summarized a lot of information at one place. Thanks for creating such a wonderful platform. Anonymoushttps://www.blogger.com/profile/01365249412508891931noreply@blogger.comtag:blogger.com,1999:blog-7958828565254404797.post-46087415094974518062017-10-05T13:28:14.117-07:002017-10-05T13:28:14.117-07:00The function that you posted holds for linear regr...The function that you posted holds for linear regression. The calculation of standardized coefficient is different for logistic regression. Check out this SAS article - https://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/viewer.htm#statug_logistic_sect010.htm<br /><br />Look for STB section to know about the calculation.<br /><br />Hope it helps!<br />Deepanshu Bhallahttps://www.blogger.com/profile/09802839558125192674noreply@blogger.comtag:blogger.com,1999:blog-7958828565254404797.post-77565882779277034122017-10-05T09:52:31.374-07:002017-10-05T09:52:31.374-07:00This comment has been removed by the author.Anonymoushttps://www.blogger.com/profile/01365249412508891931noreply@blogger.comtag:blogger.com,1999:blog-7958828565254404797.post-53025360665553550512017-10-05T09:49:15.163-07:002017-10-05T09:49:15.163-07:00This comment has been removed by the author.Anonymoushttps://www.blogger.com/profile/01365249412508891931noreply@blogger.comtag:blogger.com,1999:blog-7958828565254404797.post-17423698980345019492017-09-03T22:05:58.168-07:002017-09-03T22:05:58.168-07:00Hello Sir,
Thank you for this amazing post.
I a...Hello Sir,<br /><br />Thank you for this amazing post. <br /><br />I am facing with problem while running a particular code :<br /><br />print(c(accuracy= acc, cutoff= cutoff))<br /><br />Error in print(c(accuracy = acc, cutoff = cutoff)) : <br /> object 'acc' not found<br /><br /><br />can you please advise regarding this , the performance function "acc.perf" executed perfectly. Anonymoushttps://www.blogger.com/profile/18328016686463963505noreply@blogger.comtag:blogger.com,1999:blog-7958828565254404797.post-91797639270077379162017-08-30T03:59:10.561-07:002017-08-30T03:59:10.561-07:00Hi, While doing Dimension Reduction...Would you co...Hi, While doing Dimension Reduction...Would you consider it doing it on the data before training/Validation split? Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-7958828565254404797.post-69745507502588601952017-07-31T03:53:53.095-07:002017-07-31T03:53:53.095-07:00Hi Deepanshu, Can You please explain what is the f...Hi Deepanshu, Can You please explain what is the functionality of Predict and predition function logit regression and what is process of calculating performance of modelSajal Agarwalhttps://www.blogger.com/profile/16909523657463289572noreply@blogger.comtag:blogger.com,1999:blog-7958828565254404797.post-84642299769694429452016-11-29T03:32:19.394-08:002016-11-29T03:32:19.394-08:00i'm getting an error
Error in fix.by(by.x, x) ...i'm getting an error<br />Error in fix.by(by.x, x) : 'by' must specify a uniquely valid column<br />on executing<br />final = merge(summary.coeff,std.Coeff,by = "Variable", all.x = TRUE)<br />please help!Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-7958828565254404797.post-21898575566328040922016-08-02T16:06:52.253-07:002016-08-02T16:06:52.253-07:00I would appreciate if you can demonstrate sas code...I would appreciate if you can demonstrate sas codes for logistic regression. many thanks for for your help so farAnonymoushttps://www.blogger.com/profile/12561220465530724720noreply@blogger.comtag:blogger.com,1999:blog-7958828565254404797.post-28311037969561530162016-06-02T03:52:09.167-07:002016-06-02T03:52:09.167-07:00niceniceAnnahttps://www.blogger.com/profile/05734220215058808818noreply@blogger.comtag:blogger.com,1999:blog-7958828565254404797.post-6022782480889219582016-05-08T11:05:32.087-07:002016-05-08T11:05:32.087-07:00great explanation of what can be a tricky concept ...great explanation of what can be a tricky concept to grasp at firstB J Larsonhttps://www.blogger.com/profile/06406969837257685334noreply@blogger.comtag:blogger.com,1999:blog-7958828565254404797.post-30869856382972529602016-04-26T23:52:12.327-07:002016-04-26T23:52:12.327-07:00This comment has been removed by the author.Deepanshu Bhallahttps://www.blogger.com/profile/04301769767832902721noreply@blogger.comtag:blogger.com,1999:blog-7958828565254404797.post-54464730253786047172016-04-26T23:52:06.738-07:002016-04-26T23:52:06.738-07:00It is the same thing. Sensitivity is True Positive...It is the same thing. Sensitivity is True Positive Rate. (1-Specificity) is False Positive Rate. Deepanshu Bhallahttps://www.blogger.com/profile/04301769767832902721noreply@blogger.comtag:blogger.com,1999:blog-7958828565254404797.post-39293540268030535582016-04-26T23:46:21.545-07:002016-04-26T23:46:21.545-07:00Hi Deepanshu,
ROC is the graph between sensitivity...Hi Deepanshu,<br />ROC is the graph between sensitivity and 1- specificity<br />Then how could you plot it in between True and False positiveAnonymoushttps://www.blogger.com/profile/11781421089380085771noreply@blogger.comtag:blogger.com,1999:blog-7958828565254404797.post-20482298736572641172016-04-25T12:55:35.517-07:002016-04-25T12:55:35.517-07:00You have not copied the code correctly. Check the ...You have not copied the code correctly. Check the code once again. You forgot to mention validation data set name in the predict function. Deepanshu Bhallahttps://www.blogger.com/profile/04301769767832902721noreply@blogger.comtag:blogger.com,1999:blog-7958828565254404797.post-62306852438822105832016-04-20T23:39:57.288-07:002016-04-20T23:39:57.288-07:00Hi Folk,
Thanks for providing this wonderful arti...Hi Folk,<br /><br />Thanks for providing this wonderful article.<br />When I ran the below code it showed me an error.<br />#Prediction<br />pred = predict(logit,type="response")<br /><br />Error in predict.lm(object, newdata, se.fit, scale = 1, type = ifelse(type == : <br /> object 'val' not foundAnonymoushttps://www.blogger.com/profile/12039960046316810760noreply@blogger.com