Re: [R] Variable labels

2021-05-12 Thread Fredrik Karlsson
Hi, I am sorry but I don't understand your question, Generally, "clicking" is not something you can assume to be implemented for anything in R. However, if you read the manual for the package https://gdemin.github.io/expss/ you get an example at the bottom where an illustration of how the packa

[R] Variable labels

2021-05-12 Thread Steven Yen
I insert variable with the expss function as shown below. No error message. My question is, how to save the variable labels in the data frame so that I can click to read the labels. Thank you. mydata<-read_excel("data/Excel/hseinv.xlsx",na=".") library(expss) mydata=apply_labels(mydata,    

Re: [R] empty plots !

2021-05-12 Thread varin sacha via R-help
Hi Jim, No, I just want my R code to run correctly. I don’t want a pdf.file or other off-screen files. There is 1 error message and I guess it is due to that error message I don’t get the 8 plots. Envoyé de mon iPhone > Le 12 mai 2021 à 13:03, Jim Lemon a écrit : > > Hi varin, > Were you ex

Re: [R] question about the difference of AIC()

2021-05-12 Thread Søren Højsgaard
In the first model, I believe you estimate two parameters: the mean and the variance: > fm <- lm(y ~ 1) > 2*2 - 2 * logLik(fm) 'log Lik.' 40.49275 (df=2) > AIC(fm) [1] 40.49275 A zero mean model: fm0 <- lm(y ~ -1) > 2*1 - 2 * logLik(fm0) 'log Lik.' 39.00611 (df=1) > AIC(fm0) [1] 39.00611 Regard

Re: [R] question about the difference of AIC()

2021-05-12 Thread Jinsong Zhao
On 2021/5/12 19:49, Jinsong Zhao wrote: Hi there, I learned that AIC = 2 * npar - 2 * log(logLik(model)), where k is the number of estimated parameters in the model. k should be npar in the above sentence. Sorry for the mistake. For examle: > set.seed(123) > y <- rnorm(15) > fm <- lm(y

Re: [R] empty plots !

2021-05-12 Thread Rui Barradas
Hello, All power.* are filled with NA, please revise the code that produces those matrices, there's nothing wrong with the plotting code. Also, suggested in an answer to your previous e-mail *with* code that you should save old_par <- par(mfrow = c(4,2), cex = 0.45) [...] par(old_par) # at

[R] question about the difference of AIC()

2021-05-12 Thread Jinsong Zhao
Hi there, I learned that AIC = 2 * npar - 2 * log(logLik(model)), where k is the number of estimated parameters in the model. For examle: > set.seed(123) > y <- rnorm(15) > fm <- lm(y ~ 1) In this example, npar should be 1, so, AIC is: > 2*1 - 2 * logLik(fm) 'log Lik.' 38.49275 (df=2) However

Re: [R] empty plots !

2021-05-12 Thread Jim Lemon
Hi varin, Were you expecting image files? I don't see any plot device e.g. pdf() in your code. Jim On Wed, May 12, 2021 at 6:34 PM varin sacha via R-help wrote: > > Dear Experts, > > My R code was perfectly working since I decide to add a 5th correlation > coefficient : hoeffdings' D. > fter a

Re: [R] empty plots !

2021-05-12 Thread varin sacha via R-help
Dear Experts, My R code was perfectly working since I decide to add a 5th correlation coefficient : hoeffdings' D. fter a google search, I guess I need somewhere in my R code "unlist" but I don't know where ! Here below my R code with 1 error message. At the end I get my 8 plots but they are em