[R] Issue with var command in stats package
Am using R version 3.2.4 in a fully updated version of Windows 7 and the most current versions of coorplot, FactoMineR and factoextra to support multiple correspondence analysis. However, today, a line of code that worked just fine on one set of data produced an error message on a different set of data. Specifically, when I ran: corrplot(var$contrib, is.corr = FALSE) I received the following message: > corrplot(var$contrib, is.corr = FALSE) Error in var$contrib : object of type 'closure' is not subsettable Can you please tell me what this error message means and roughly what I might need to do to correct it? If necessary, I can provide the original data files. Many thanks for your kind help. Very Respectfully, Larry John Principal Analyst ANSER __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] Scripting Problem--Linear Regression Using Logit of the Response Variable
Dear fellow citizens of the R-verse, I'm a non-quant analyst trying to do some statistical analyses on a large data set unimaginatively named "data." sympathy trust fear greed sharer_prob [1] 3 20 00.669593 [2] 2 12 30.669593 [3] 2 22 30.494675 [4] 2 21 20.494675 [5[ 2 22 00.556837 [6] 2 21 10.556837 "sharer_prob" is the continuous dependent variable with values 0 > sharer_prob > 1, so I know need to run a logit transformation before I can do any linear regressions to study the main and interaction effects of the four independent variables. I've loaded "car" and tried for several hours to create a one-line script that will give me the overall linear model, but keep having problems. It seems to me that something like the following should work > EvacLM <- lm((logit(sharer_prob) ~ sympathy + trust + fear + greed) > adjust=TRUE) na.action=NULL) But R politely tells me I've gotten something wrong: Error: unexpected symbol in "EvacLM <- lm((logit(sharer_prob) ~ sympathy + trust + fear + greed) adjust" I'm hoping one of you can spot and help me correct my mistake-I sure can't figure it out. Thanks for any help you can offer! Larry John Principal Analyst ANSER (www.anser.org) [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.