Re: [R] add cex.axis =1.2 to qqunif.plot from lattice library

2021-03-27 Thread Deepayan Sarkar
In addition to what Rolf said, a relatively obscure but generally useful way to "globally" control fontsize is to set the underlying grid parameter (see ?grid::gpar). The easiest way to do this is through the lattice settings, e.g., lattice.options(default.theme = list(grid.pars = list(cex = 1.5))

Re: [R] Off topic --- underdispersed (pseudo) binomial data.

2021-03-27 Thread Abby Spurdle
Further to yesterday's posts: I think the "n" value would be the maximum possible number of jumps, not the number of students. In theory, the minimum possible number is zero, so the distributions are more binomial-like than they look. Also, there was a mistake in my comments. The jump is from non-

Re: [R] add cex.axis =1.2 to qqunif.plot from lattice library

2021-03-27 Thread Rolf Turner
On Sat, 27 Mar 2021 21:26:53 + Yuan Chun Ding wrote: > Dear R user, > > The following qqunit.plot function generated correct qq plot, > however, I want to make axis label (1 ,2 ,.8) have larger size > for publication. I tried to add cex.axis =1.2 code following the pch > =20, but it d

[R] add cex.axis =1.2 to qqunif.plot from lattice library

2021-03-27 Thread Yuan Chun Ding
Dear R user, The following qqunit.plot function generated correct qq plot, however, I want to make axis label (1 ,2 ,.8) have larger size for publication. I tried to add cex.axis =1.2 code following the pch =20, but it does not change size of axis label. I guess lattice library setting is

Re: [R] Colorizing different individuals with fviz

2021-03-27 Thread Jim Lemon
Hi Mahmood, What you have specified can be done with: col=c(rep("black",10),rep("red",10)) depending upon what print function you are using. I suspect that this may be based on a value in your data. For example, if you want black for values of some variable up to 10 and red for those over: col=

Re: [R] Error using nls function

2021-03-27 Thread Mark Leeds
David: Note that your problem is linear so it looks like you can use the lm function to estimate a, b and c. ( or as a check against what john did ) Unless I'm missing something which could be the case ! Also, see Bloomfield's text for a closed form solution. I think it's called "Intro To Four

Re: [R] Error using nls function

2021-03-27 Thread John Fox
Dear David, I'm afraid that this doesn't make much sense -- that is, I expect that you're not doing what you intended. First, sin(2*pi*t) and cos(2*pi*t) are each invariant: > sin(2*pi*t) [1] -2.449294e-16 -4.898587e-16 -7.347881e-16 -9.797174e-16 -1.224647e-15 -1.469576e-15 [7] -1.714506e

Re: [R] Error using nls function

2021-03-27 Thread J C Nash
Use nlsr::nlxb() to get analytic derivatives. Though your problem is pretty rubbishy -- look at the singular values. (You'll need to learn some details of nlxb() results to interpret.) Note to change the x to t in the formula. JN > f1 <- y ~ a+b*sin(2*pi*t)+c*cos(2*pi*t) > res1 <- nls(f1, dat

[R] Running effect size tests on subsets of data

2021-03-27 Thread Giovanna Badia
Hello all, I have seen instructions for conducting post-hoc pairwise comparisons in R after running an ANOVA, Kruskal-Wallis Test, or Yuen�s Test. Is there a method to subset data automatically to run an effect size test across different pairs? For example, if I want to run Cohen�s d to examine

[R] Error using nls function

2021-03-27 Thread David E.S.
I'm trying to fit a harmonic equation to my data, but when I'm applying the nls function, R gives me the following error: Error in nlsModel(formula, mf, start, wts) : singular gradient matrix at initial parameter estimates. All posts I've seen, related to this error, are of exponential function

[R] Colorizing different individuals with fviz

2021-03-27 Thread Mahmood Naderan-Tahan
Hi I use this command to generate a graph of individuals ind <- get_famd_ind(res.famd) fviz_famd_ind(res.famd, repel = TRUE) I would like to know how can I specify different colors for different individuals? The colorization is not very complex. Basically, I want to specify rows[1:10] to be

Re: [R] How to average minutes per hour per month in the form of '# hours #minutes'

2021-03-27 Thread Rich Shepard
On Fri, 26 Mar 2021, Greg Minshall wrote: My malpractice insurance gives me a discount if I consult up to 22 hours per week in a 3 months period. i wonder if you might add up the number of hours worked over the (92 (?)) days of November, December, January, divide by that number of days, then d

Re: [R] How to average minutes per hour per month in the form of '# hours #minutes'

2021-03-27 Thread Greg Minshall
Eberhard, > My malpractice insurance gives me a discount if I consult up to 22 > hours per week in a 3 months period. i wonder if you might add up the number of hours worked over the (92 (?)) days of November, December, January, divide by that number of days, then divide by seven? that would

Re: [R] local maxima positions in a vector with duplicated values

2021-03-27 Thread Greg Minshall
Stefano, my contribution is similar to Bill Dunlap's: x <- c(1,0,0,0,2,2,3,4,0,1,1,0,5,5,5,0,1) (cumsum(rle(x)$lengths)-(rle(x)$length-1))[which(diff(diff(rle(x)$values)>=0)<0)+1] cumsum(rle(x)$lengths)[which(diff(diff(rle(x)$value)>0)>0)+1] kind of a cute little problem, actually. che

Re: [R] Off topic --- underdispersed (pseudo) binomial data.

2021-03-27 Thread Abby Spurdle
Sorry. I just realized, after posting, that the "n" value in the dispersion calculation isn't correct. I'll have to revisit the simulation, tomorrow. On Sat, Mar 27, 2021 at 9:11 PM Abby Spurdle wrote: > > Hi Rolf, > > Let's say we have a course called Corgiology 101, with a single moderated > e

Re: [R] Off topic --- underdispersed (pseudo) binomial data.

2021-03-27 Thread Abby Spurdle
Hi Rolf, Let's say we have a course called Corgiology 101, with a single moderated exam. And let's say the moderators transform initial exam scores, such that there are fixed percentages of pass rates and A grades. Rather than count the number of passes, we can count the number of "jumps". That i