Re: [R] Test For Difference of Betas By Group in car

2025-01-19 Thread John Fox
d similar) statistical models are implemented in R, covered in the book associated with car package and many other places. I hope this helps, John -- John Fox, Professor Emeritus McMaster University Hamilton, Ontario, Canada web: https://www.john-fox.ca/ -- On 2025-01-18 9:59 p.m., Sparks,

Re: [R] Non linear optimization with nloptr package fail to produce true optimal result

2024-12-13 Thread John Fox
Hello Duncan, On 2024-12-13 5:30 p.m., Duncan Murdoch wrote: Caution: External email. On 2024-12-13 5:11 p.m., John Fox wrote: Dear Daniel, On 2024-12-13 2:51 p.m., Daniel Lobo wrote: Caution: External email. Looks like the solution 1.576708   6.456606   6.195305 -19.007996 is the best

Re: [R] Non linear optimization with nloptr package fail to produce true optimal result

2024-12-13 Thread John Fox
e constant, are highly correlated). Best, John On Sat, 14 Dec 2024 at 01:14, John Fox wrote: Dear Daniel et al., Following on Duncan's remark and examining the message produced by nloptr(), I simply tried increasing the maximum number of function evaluations: -- snip --- &

Re: [R] Non linear optimization with nloptr package fail to produce true optimal result

2024-12-13 Thread John Fox
7, -19.371)) [1] 1325.076 I hope this helps, John -- John Fox, Professor Emeritus McMaster University Hamilton, Ontario, Canada web: https://www.john-fox.ca/ -- On 2024-12-13 1:45 p.m., Duncan Murdoch wrote: Caution: External email. You posted a version of this question on StackOverflow, and were giv

Re: [R] Manually calculating values from aov() result

2024-08-07 Thread John Fox
ere are covariates. In my opinion, researchers are usually interested in the hypotheses for type-II tests. These matters are described in detail, for example, in my applied regression text <https://www.john-fox.ca/AppliedRegression/index.html>. I hope this helps, John -- John F

Re: [R] Regression performance when using summary() twice

2024-06-21 Thread John Fox
100 100 I hope this helps, Johm -- John Fox, Professor Emeritus McMaster University Hamilton, Ontario, Canada web: https://www.john-fox.ca/ -- On 2024-06-21 10:38 a.m., c.bu...@posteo.jp wrote: [You don't often get email from c.bu...@posteo.jp. Learn why this is important at

Re: [R] Column names of model.matrix's output with contrast.arg

2024-06-17 Thread John Fox
including myself). I didn't write a replacement for contr.poly() because the current coefficient labeling seemed reasonably transparent. Best, John -- John Fox, Professor Emeritus McMaster University Hamilton, Ontario, Canada web: https://www.john-fox.ca/ -- On 2024-06-17 4:29 p.m., B

Re: [R] Listing folders on One Drive

2024-05-20 Thread John Fox
Dear Nick, See list.dirs(), which is documented in the same help file as list.files(). I hope this helps, John -- John Fox, Professor Emeritus McMaster University Hamilton, Ontario, Canada web: https://www.john-fox.ca/ -- On 2024-05-20 9:36 a.m., Nick Wray wrote: [You don't often get

Re: [R] x[0]: Can '0' be made an allowed index in R?

2024-04-23 Thread John Fox
Hello Peter, Unless I too misunderstand your point, negative indices for removal do work with the Oarray package (though -0 doesn't work to remove the 0th element, since -0 == 0 -- perhaps what you meant): > library(Oarray) > v <- Oarray(1:10, offset=0) > v [0,] [1,] [2,] [3,] [4,] [5,] [6,

Re: [R] Use of geometric mean .. in good data analysis

2024-01-22 Thread John Fox
ative. Best, John -- John Fox, Professor Emeritus McMaster University Hamilton, Ontario, Canada web: https://www.john-fox.ca/ On 2024-01-22 12:18 p.m., Martin Maechler wrote: Caution: External email. Rich Shepard on Mon, 22 Jan 2024 07:45:31 -0800 (PST) writes: > A statistical qu

Re: [R] Is there any design based two proportions z test?

2024-01-18 Thread John Fox
#x27;d check the results manually. Best, John With Kind Regards --------- */Md Kamruzzaman/* On Thu, Jan 18, 2024 at 12:44 AM John Fox <mailto:j...@mcmaster.ca>> wrote: Dear Md Kamruzzaman, To answer your second question first, you could just use the s

Re: [R] Is there any design based two proportions z test?

2024-01-17 Thread John Fox
l for their difference. I hope this helps, John -- John Fox, Professor Emeritus McMaster University Hamilton, Ontario, Canada web: https://www.john-fox.ca/ On 2024-01-16 10:21 p.m., Md. Kamruzzaman wrote: [You don't often get email from mkzama...@gmail.com. Learn why this is importan

Re: [R] car::deltaMethod() fails when a particular combination of categorical variables is not present

2023-09-26 Thread John Fox
there is also no intrinsic reason that deltaMethod() shouldn't be able to handle a rank-deficient model. We'll probably fix that. My apologies for the confusion, John -- John Fox, Professor Emeritus McMaster University Hamilton, Ontario, Canada web: https://www.john-fox.ca/ On 2023-09

Re: [R] car::deltaMethod() fails when a particular combination of categorical variables is not present

2023-09-26 Thread John Fox
2 Then the hypothesis is tested directly by the t-value for the coefficient bct2:sent. I hope that this helps, John -- John Fox, Professor Emeritus McMaster University Hamilton, Ontario, Canada web: https://www.john-fox.ca/ On 2023-09-26 1:12 a.m., Michael Cohn wrote: Caution: External email.

Re: [R] Print hypothesis warning- Car package

2023-09-18 Thread John Fox
ed are entirely unaffected. I've made this change and will commit it to the next version of the car package. Thank you for the suggestion, John - Peter On 17 Sep 2023, at 16:43 , John Fox wrote: Dear Robert, Anova() calls linearHypothesis(), also in the car package, to compute sum

Re: [R] Print hypothesis warning- Car package

2023-09-17 Thread John Fox
-- snip There's no good reason that linearHypothesis() should try to express each hypothesis symbolically for Anova(), since Anova() doesn't use that information. When I have some time, I'll arrange to avoid the warning. Best, John -- John Fox, Professor Emeritus McMas

Re: [R] Determining Starting Values for Model Parameters in Nonlinear Regression

2023-08-19 Thread John Fox
del differently, so this isn't the same as the nonlinear model, but the regression coefficients are very close to the estimates for the nonlinear model. Best, John -- John Fox, Professor Emeritus McMaster University Hamilton, Ontario, Canada web: https://www.john-fox.ca/ On 2023-08-19 6:39 p.m.

Re: [R] Getting an error calling MASS::boxcox in a function

2023-07-08 Thread John Fox
lso calls NextMethod()) So I would welcome clarification to clear my clogged (cerebral) sinuses. :-) Best, Bert On Sat, Jul 8, 2023 at 11:25 AM John Fox wrote: Dear Ron and Bert, First (and without considering why one would want to do this, e.g., adding a start of 1 to the data), the follow

Re: [R] Getting an error calling MASS::boxcox in a function

2023-07-08 Thread John Fox
in this context transforms towards *multi*normality: -- snip -- > library(car) Loading required package: carData > powerTransform(dd + 1) Estimated transformation parameters Y1Y2 0.1740200 0.2089925 I hope this helps, John -- John Fox, Professor Emeritus McMaster U

Re: [R] loess plotting problem

2023-03-23 Thread John Fox
help pages ?loess and ?loess.smooth. If you don't like the default for loess.smooth(), just specify the arguments you want. Best, John On Thu, 23 Mar 2023 at 20:20, John Fox <mailto:j...@mcmaster.ca>> wrote: Dear Anupam Tyagi, You didn't include your data, s

Re: [R] loess plotting problem

2023-03-23 Thread John Fox
confusion. I hope this helps, John -- * preferred email: john.david@proton.me John Fox, Professor Emeritus McMaster University Hamilton, Ontario, Canada web: https://www.john-fox.ca/ On 2023-03-23 10:18 a.m., Anupam Tyagi wrote: For some reason the following code is not plotting as I wan

Re: [R] Good Will Legal Question

2023-03-21 Thread John Fox
e license on the webpage that sells the hoodie. FWIW, I (and I expect you) have seen many t-shirts, etc., with R logos, some from companies, and I even have a few. I doubt that anyone will care. Best, John -Original Message----- From: R-help On Behalf Of John Fox Sent: Tuesday, March 21, 2

Re: [R] DOUBT

2023-03-21 Thread John Fox
ple of the problem -- but it's a good guess that the variable (HHsize or perhaps some other variable) isn't in the newdata data frame. Best, John -- John Fox, Professor Emeritus McMaster University Hamilton, Ontario, Canada web: https://www.john-fox.ca/ On 2023-03-21 1:24 p.m., N

Re: [R] Good Will Legal Question

2023-03-21 Thread John Fox
tion wanted to limit commercial use of the R logo, it wouldn't have released it under the CC-BY-SA 4.0 license. I'm not sure what moral issues concern you. I hope this helps, John John Fox, Professor Emeritus McMaster University Hamilton, Ontario, Canada web: https://socialsciences.

Re: [R] DOUBT

2023-03-21 Thread John Fox
Dear Nandini raj, You have a space in the variable name "HH size". I hope this helps, John John Fox, Professor Emeritus McMaster University Hamilton, Ontario, Canada web: https://socialsciences.mcmaster.ca/jfox/ On 2023-03-20 1:16 p.m., Nandini raj wrote: Respected sir/madam can

Re: [R] tcl tk: set the position button

2023-03-13 Thread John Fox
Dear Rodrigo, Try tkwm.geometry(win1, "-0+0"), which should position win1 at the top right. I hope this helps, John -- John Fox, Professor Emeritus McMaster University Hamilton, Ontario, Canada web: https://socialsciences.mcmaster.ca/jfox/ On 2023-03-12 8:41 p.m., Rodrigo Bad

Re: [R] MFA variables graph, filtered by separate.analyses

2023-02-21 Thread John Fox
Dear gavin, I think that it's likely that Jim meant the hetcor() function in the polycor package. Best, John -- John Fox, Professor Emeritus McMaster University Hamilton, Ontario, Canada web: https://socialsciences.mcmaster.ca/jfox/ On 2023-02-21 5:42 p.m., gavin duley wrote: Hi Jim

Re: [R] unexpected 'else' in " else"

2022-10-21 Thread John Fox
int(1) + else print(2)} [1] 2 I hope this helps, John -- John Fox, Professor Emeritus McMaster University Hamilton, Ontario, Canada web: https://socialsciences.mcmaster.ca/jfox/ On 2022-10-21 8:06 a.m., Jinsong Zhao wrote: Thanks a lot! I know the first and third way to correct the error. The seco

Re: [R] How to obtain a consistent estimator with a binary response model with endogenous explanatory variables?

2022-09-28 Thread John Fox
anatory variable. Best, John John Fox, Professor Emeritus McMaster University Hamilton, Ontario, Canada web: https://socialsciences.mcmaster.ca/jfox/ On 2022-09-28 3:47 p.m., John Fox wrote: Dear John, The Wikipedia page to which you refer appears to have all the information you need t

Re: [R] How to obtain a consistent estimator with a binary response model with endogenous explanatory variables?

2022-09-28 Thread John Fox
posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- John Fox, Professor Emeritus McMaster University Hamilton, Ontario, Canada web: https://socialsciences.mcmaster.ca/jfox/ __ R-help

Re: [R] Correlate

2022-08-22 Thread John Fox
roject.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. -- John Fox, Professor Emeritus McMaster Universit

Re: [R] how to add count to pie chart legend

2022-08-16 Thread John Fox
man/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. -- John Fox, Professor Emeritus McMaster University Hamilton, Ontario, Canada web: https://socialsciences.mcmaster.ca/jfox/

Re: [R] Odd behavior of a function within apply

2022-08-08 Thread John Fox
response: apply(test1.df[1:10,c(8,10)],2,count1a) X1_1_HZP1 X1_1_HBM1_yr 23 I am really baffled. If I use count1a on a single column, it works fine. Any suggestions much appreciated. Thanks, Sincerely, Erin Erin Hodgess, PhD mailto: erinm.hodg...@gmail.com [

Re: [R] Predicted values from glm() when linear predictor is NA.

2022-07-28 Thread John Fox
important. Best, John On July 28, 2022 5:45:35 AM PDT, John Fox wrote: Dear Jeff, On 2022-07-28 1:31 a.m., Jeff Newmiller wrote: But "disappearing" is not what NA is supposed to do normally. Why is it being treated that way here? NA has a different meaning here than in data.

Re: [R] Predicted values from glm() when linear predictor is NA.

2022-07-28 Thread John Fox
and some other value). The fitted values under the model are invariant with respect to this arbitrary choice. My apologies if I'm stating the obvious and misunderstand your objection. Best, John On July 27, 2022 7:04:20 PM PDT, John Fox wrote: Dear Rolf, The coefficient of TrtTi

Re: [R] Predicted values from glm() when linear predictor is NA.

2022-07-27 Thread John Fox
t.txt") Thanks for any enlightenment. cheers, Rolf Turner __ 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

Re: [R] grep

2022-07-10 Thread John Fox
t; "x.conserv" "x.dem" "x.rep" "x.realinc" __ 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-pro

Re: [R] R for linear algebra

2022-06-25 Thread John Fox
X^{-1} is returned." Best, John -Original Message----- From: John Fox To: Avi Gross Cc: r-help@r-project.org Sent: Sat, Jun 25, 2022 1:34 pm Subject: Re: [R] R for linear algebra Dear Avi, The purpose of the matlib package is to *teach* linear algebra and related topics, not to

Re: [R] Obtaining the source code

2022-06-19 Thread John Fox
ling 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. -- John Fox, Professor Emeritus McMaster University Hamilton, Ontario,

Re: [R] rbind of multiple data frames by column name, when each data frames can contain different columns

2022-06-03 Thread John Fox
-- Questo messaggio stato analizzato da Libraesva ESG ed risultato non infetto. This message was scanned by Libraesva ESG and is believed to be clean. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIB

Re: [R] Placement of legend in base plot()

2022-05-31 Thread John Fox
atch.arg(x, c("bottomright", "bottom", "bottomleft", "left",  : 'arg' must be of length 1 ... and I had to resort to conditionally specify all 4. Given. Problems: 1. If there are the same number of points in sections, I

Re: [R] Complex Survey Data and EFA

2022-04-30 Thread John Fox
trachoric correlations when both variable are binary. I know that you want a correlation matrix for several binary variables, but it would be simple to compute them in a double for loop. I hope this helps, John -- John Fox, Professor Emeritus McMaster University Hamilton, Ontario, Canada web: htt

Re: [R] Package nlme

2022-04-07 Thread John Fox
Dear Rohan, Bert Gunter has already made several general useful suggestions. In addition, why did you make the variable on the left-hand side of the model a factor? Shouldn't it be a numeric variable? I hope this helps, John -- John Fox, Professor Emeritus McMaster University Ham

Re: [R] print only a few lines of an object

2022-03-23 Thread John Fox
Dear Jeff, On 2022-03-23 3:36 p.m., Jeff Newmiller wrote: After-thought... Why not just use head() and tail() like normal R users do? head() and tail() are reasonable choices if there are many rows, but not if there are many columns. My first thought was your previous suggestion to redefin

Re: [R] Cook's distance for least absolute deviation (lad) regressions

2022-03-21 Thread John Fox
now whether a more efficient computation is possible there, but unless the data set is very large, in which case it's highly unlikely that influence of individual cases is an issue, the brute-force approach should be feasible and very easy to program. I hope this helps, John --

Re: [R] Problem with data distribution

2022-02-17 Thread John Fox
Dear Nega gupta, In the last point, I meant to say, "Finally, it's better to post to the list in plain-text email, rather than html (as the posting guide suggests)." (I accidentally inserted a "not" in this sentence.) Sorry, John On 2022-02-17 2:21 p.m., John Fo

Re: [R] Problem with data distribution

2022-02-17 Thread John Fox
22-02-17 2:27 p.m., Neha gupta wrote: Dear John, thanks a lot for the detailed answer. Yes, I am not an expert in R language and when a problem comes in, I google it or post it on these forums. (I have just a little bit experience of ML in R). On Thu, Feb 17, 2022 at 8:21 PM John Fox

Re: [R] Constructing confidence interval ellipses with R

2022-01-25 Thread John Fox
?scatterplot. I hope this helps, John -- John Fox, Professor Emeritus McMaster University Hamilton, Ontario, Canada web: https://socialsciences.mcmaster.ca/jfox/ On 2022-01-24 4:24 p.m., Paul Bernal wrote: Dear friends, I will be sharing a dataset which has the following columns: 1. Scenario 2.

Re: [R] How to create density ellipses with R

2022-01-15 Thread John Fox
tirely self-taught as a statistician, much of what I've learned has come from probably over 10, perhaps nearer 20 years on this list. Thanks to all for all the work to maintain the list and contribute to it. Chris - Original Message ----- From: "John Fox" To: "Paul Ber

Re: [R] How to create density ellipses with R

2022-01-14 Thread John Fox
uster::ellipsoidPoints(); confidence ellipses are drawn by car::confidenceEllipse() and the various methods of ellipse::ellipse(). I hope this helps, John Any other guidance will be greatly appreciated. Cheers, Paul El vie, 14 ene 2022 a las 11:27, John Fox (<mailto:j...@mcm

Re: [R] How to create density ellipses with R

2022-01-14 Thread John Fox
tion first. You might find the dataEllipse() function in the car package more convenient (again assuming that you want bivariate-normal density contours). I hope this helps, John -- John Fox, Professor Emeritus McMaster University Hamilton, Ontario, Canada web: https://socialsciences.mcmast

Re: [R] Time for a companion mailing list for R packages?

2022-01-13 Thread John Fox
way to the posting guide. Best, John -- John Fox, Professor Emeritus McMaster University Hamilton, Ontario, Canada web: https://socialsciences.mcmaster.ca/jfox/ On 2022-01-12 10:27 p.m., Avi Gross via R-help wrote: Respectfully, this forum gets lots of questions that include non-base R c

Re: [R] [EXTERNAL] Re: bug in Windows implementation of nlme::groupedData

2022-01-07 Thread John Fox
es more sense to me than using groupedData, but it still seems strange that the function cannot find X in its search path. Thanks again! Melissa -Original Message- From: John Fox Sent: Friday, January 7, 2022 4:35 PM To: Key, Melissa Cc: r-help@r-project.org Subject: [EXTERNAL] Re: [R

Re: [R] bug in Windows implementation of nlme::groupedData

2022-01-07 Thread John Fox
nd not attached): [1] compiler_4.1.2 tools_4.1.2KernSmooth_2.23-20 splines_4.1.2 [5] grid_4.1.2 lattice_0.20-45 I hope this helps, John -- John Fox, Professor Emeritus McMaster University Hamilton, Ontario, Canada web: https://socialsciences.mcmaster.ca/jfox/ On 2022-01-07 1

Re: [R] How to use ifelse without invoking warnings

2021-10-08 Thread John Fox
for large arguments. Best, John Thanks & Best regards, Ravi ---- *From:* John Fox *Sent:* Thursday, October 7, 2021 2:00 PM *To:* Ravi Varadhan *Cc:* R-Help *Subject:* Re: [R] How to use ifelse without inv

Re: [R] How to use ifelse without invoking warnings

2021-10-07 Thread John Fox
n] <- 1 > ans[k >= -1 & k <= n] <- pbeta(p, kk + 1, n - kk, lower.tail=FALSE) > ans [1] 0.0 0.006821826 0.254991551 1.0 BTW, I don't think that you mentioned that p = 0.3, but that seems apparent from the output you showed. I hope this helps, John -

Re: [R] Error msg trying to load R Commander with an older R edition...

2021-09-13 Thread John Fox
Dear Brian, On 2021-09-13 9:33 a.m., Brian Lunergan wrote: Hi folks: I'm running Linux Mint 19.3 on my machine. Tried to install a more recent edition of R but I couldn't seem to get it working so I pulled it off and went with a good, basic install of the edition available through the software

Re: [R] Can't add error bars to existing line graph

2021-06-16 Thread John Fox
0, x1, y1), specifying the x and y coordinates of the endpoints of the arrows. It's true that because your "arrows" are intended to be vertical, you need not specify x1, which defaults to x0, but the other 3 arguments are necessary. See ?arrows for details. I hope this helps,

Re: [R] calculating area of ellipse

2021-05-11 Thread John Fox
tio with time (power). So this asserted requirement as to homogeneous units seems inaccurate. But without context I don't know if any of this will aid in interpretation of variance for the OP. On May 11, 2021 7:30:22 AM PDT, John Fox wrote: Dear Stephen, On 2021-05-11 10:20 a.m., Step

Re: [R] calculating area of ellipse

2021-05-11 Thread John Fox
efficients. The generalization of this idea to ellipsoids of any dimension is the basis for the generalized variance-inflation factors computed by the vif() function in the car package. Best, John John Fox, Professor Emeritus McMaster University Hamilton, Ontario, Canada web: htt

Re: [R] calculating area of ellipse

2021-05-07 Thread John Fox
product of its eigenvalues. These results generalize readily to ellipsoids in higher dimensions, and to degenerate cases, such as perfectly correlated coefficients. For more on the statistics of ellipses, see <http://euclid.psych.yorku.ca/datavis/papers/ellipses-STS402.pdf>. Best, John

Re: [R] calculating area of ellipse

2021-05-06 Thread John Fox
slate that into R code. I hope this helps, John John Fox, Professor Emeritus McMaster University Hamilton, Ontario, Canada web: https://socialsciences.mcmaster.ca/jfox/ John Fox, Professor Emeritus McMaster University Hamilton, Ontario, Canada web: https://socialsciences.mcmaster.ca/jfox/ On 20

Re: [R] Contrasts in coxph

2021-04-06 Thread John Fox
allison, ~ fin)) contrast estimateSE df z.ratio p.value no - yes0.379 0.191 Inf 1.983 0.0474 -- snip - Results are averaged over the levels of: race, wexp, mar, paro Results are given on the log (not the response) scale. John Fox, Professor Emeritus M

Re: [R] Plotting adjusted KM curve

2021-04-04 Thread John Fox
On 2021-04-04 10:45 p.m., John Fox wrote: Dear John, I think that what you're looking for is plot(survfit(fit1Cox, newdata=data.frame(age=rep(65, 2), sex=factor("female", "male" Whoops, that should be plot(survfit(fit1Cox, newdata=data.frame(age=rep(65,

Re: [R] Plotting adjusted KM curve

2021-04-04 Thread John Fox
Dear John, I think that what you're looking for is plot(survfit(fit1Cox, newdata=data.frame(age=rep(65, 2), sex=factor("female", "male" assuming, of course, that sex is a factor with levels "female" and "male". I hope this helps, John Joh

Re: [R] using eigen function in MAP and purr

2021-03-29 Thread John Fox
3]] [1] 43.3196 -13.3196 -- snip - I hope this helps, John John Fox, Professor Emeritus McMaster University Hamilton, Ontario, Canada web: https://socialsciences.mcmaster.ca/jfox/ On 2021-03-29 5:28 p.m., Veerappa Chetty wrote: I want to use map and purr functions to compute eigen

Re: [R] Error using nls function

2021-03-27 Thread John Fox
-1.469576e-15 [7] -1.714506e-15 -1.959435e-15 -2.204364e-15 -2.449294e-15 -9.799650e-15 -2.939152e-15 > cos(2*pi*t) [1] 1 1 1 1 1 1 1 1 1 1 1 1 Second, as formulated the model is linear in the parameters. I hope this helps, John John Fox, Professor Emeritus McMaster University Hamilton, Ontar

Re: [R] library(hms)

2021-03-17 Thread John Fox
R before you try to use it, possibly starting with the "An Introduction to R" manual that ships with the standard R distribution. Best, John John Fox, Professor Emeritus McMaster University Hamilton, Ontario, Canada web: https://socialsciences.mcmaster.ca/jfox/ On 2021-03-17 1:07

Re: [R] How to plot dates

2021-03-16 Thread John Fox
s not obvious what you want to do. If you can't clearly describe the structure of the plot you intend to draw, it's doubtful that I or anyone else can help you. Best, John John Fox, Professor Emeritus McMaster University Hamilton, Ontario, Canada web: https://socialsciences.mcmaster.ca/jf

Re: [R] How to plot dates

2021-03-16 Thread John Fox
A more general comment: If I'm correct and you're just following a recipe, that's a recipe for problems. You'd probably be more successful if you tried to learn how ggplot(), etc., work. My apologies if I'm misinterpreting the source of your difficulties. I hope this he

Re: [R] mpfr function in Rmpfr crashes R

2021-03-07 Thread John Fox
s_0.5.1.1 tools_4.0.4 yaml_2.2.1 rmarkdown_2.6 [6] knitr_1.31xfun_0.21 digest_0.6.27 packrat_0.5.0 rlang_0.4.10 [11] evaluate_0.14 --- snip You might try updating R or running Rmpfr in a cleaner session. I hope this helps, John

Re: [R] Out from an R package

2021-02-25 Thread John Fox
whether the command Output <- lmer(G10ln ~ v191_ms + (1 | couno), data = 'G10R') actually works. The data argument should be a data frame, not the *name* of a data frame, i.e., data = G10R . I hope this helps, John John Fox, Professor Emeritus McMaster University Ham

Re: [R] Different results on running Wilcoxon Rank Sum test in R and SPSS

2021-01-20 Thread John Fox
ame. Best, John Thank you very much for your time! Yours sincerelyBharat RawlleyOn Wednesday, 20 January, 2021, 04:47:21 am IST, John Fox wrote: Dear Bharat Rawlley, What you tried to do appears to be nonsense. That is, you're treating PFD_n and drug_code as if they were sc

Re: [R] Different results on running Wilcoxon Rank Sum test in R and SPSS

2021-01-19 Thread John Fox
u slightly different results -- assuming that you're actually doing the same thing in both cases. I couldn't help but notice that most of your data are missing. Are you getting the same value of the test statistic and different p-values, or is the test statistic different as well? I hope

Re: [R] Troubles installing Rcmdr on Mac

2021-01-12 Thread John Fox
working n RStudio or another IDE is undoubtedly more powerful, for them it certainly isn't easier. Your teaching experiences may be different. Best, John greetings, el On 12/01/2021 16:19, John Fox wrote: Dear Eberhard, On 2021-01-12 12:32 a.m., Dr Eberhard W Lisse wrote:

Re: [R] Troubles installing Rcmdr on Mac

2021-01-12 Thread John Fox
oire L-ViS, Université Lyon 1 De : John Fox Envoyé : mardi 12 janvier 2021 03:30 À : CHAMPELY STEPHANE Cc : r-help@r-project.org; Dr Eberhard W Lisse Objet : Re: [R] Troubles installing Rcmdr on Mac Dear Stephane, I've taken yet another look at t

Re: [R] Troubles installing Rcmdr on Mac

2021-01-12 Thread John Fox
concerning the Xcode tools to the Rcmdr installation notes for macOS. Thanks for your help, John — Sent from Dr Lisse’s iPhone On 12 Jan 2021, 04:30 +0200, John Fox , wrote: Dear Stephane, I've taken yet another look at this and have an additional suggestion for your students to tr

Re: [R] Troubles installing Rcmdr on Mac

2021-01-11 Thread John Fox
John On 2021-01-11 3:53 p.m., John Fox wrote: Dear Stephane and Eberhard, As an addendum to my previous response, I uninstalled the Rcmdr package and all of its direct and indirect dependencies and then reinstalled the package -- on a macOS 11.1 system running R 4.0.3 with all other pack

Re: [R] Troubles installing Rcmdr on Mac

2021-01-11 Thread John Fox
these steps, everything (still) works fine. I therefore can't duplicate your students' problem, which makes it hard to suggest how to fix it, without having some additional details. Best, John On 2021-01-11 3:33 p.m., John Fox wrote: Dear Stephane and Eberhard, It should not be ne

Re: [R] Troubles installing Rcmdr on Mac

2021-01-11 Thread John Fox
till experience this problem, it would help to have some more information about what they did to install the Rcmdr and what happened. In the meantime, I'll try a fresh install of the Rcmdr and dependencies to see whether I encounter any difficulties. Best, John -- John Fox, Professor Em

Re: [R] [effects] Wrong xlevels in effects plot for mixed effects model when multiline = TRUE

2020-11-11 Thread John Fox
ects package will be submitted to CRAN. Thank you again for the bug report, John John Fox, Professor Emeritus McMaster University Hamilton, Ontario, Canada web: https://socialsciences.mcmaster.ca/jfox/ On 2020-11-09 4:51 p.m., Gerrit Eichner wrote: Dear John, thank you for prompt reply

Re: [R] [effects] Wrong xlevels in effects plot for mixed effects model when multiline = TRUE

2020-11-09 Thread John Fox
difficulties, we'll fix the bug in due course. I hope this helps, John John Fox, Professor Emeritus McMaster University Hamilton, Ontario, Canada web: https://socialsciences.mcmaster.ca/jfox/ On 2020-11-09 8:06 a.m., Gerrit Eichner wrote: Dear list members, I observe a strange/wrong gr

Re: [R] how to get a numeric vector?

2020-10-04 Thread John Fox
ctor(mapply(':', c(1, 4), c(5, 8))) [1] 1 2 3 4 5 4 5 6 7 8 also works. I hope this helps, John John Fox, Professor Emeritus McMaster University Hamilton, Ontario, Canada web: https://socialsciences.mcmaster.ca/jfox/ Thanks. __ R-help@r-

Re: [R] formula wrangling

2020-09-21 Thread John Fox
t;- environment(formula) That doesn't amount to much, and I haven't tested my substitute code beyond your example. Best, John John Fox, Professor Emeritus McMaster University Hamilton, Ontario, Canada web: https://socialsciences.mcmaster.ca/jfox/ On 2020-09-21 9:40 a.m., Koenker, Ro

Re: [R] linearHypothesis

2020-09-17 Thread John Fox
e test still is on a restricted model of the starting model. Thanks, Johan Den tor. 17. sep. 2020 kl. 15.55 skrev John Fox <mailto:j...@mcmaster.ca>>: Dear Johan, On 2020-09-17 9:07 a.m., Johan Lassen wrote: > Dear R-users, > > I am using the R-function

Re: [R] linearHypothesis

2020-09-17 Thread John Fox
a2'*(t2-t4)+beta3'*(t3-t4) data$t1 <- data$t1-data$t4 data$t2 <- data$t2-data$t4 data$t3 <- data$t3-data$t4 model_reduced <- lm(y~t0+t1+t2+t3+0,data=data) anova(model_reduced,model) Yes, this is equivalent to the test performed by linearHypothesis() using the coefficie

[R] [R-pkgs] new ivreg package for 2SLS regression with diagnostics

2020-09-03 Thread John Fox
more information, see the ivreg CRAN webpage at <https://cran.r-project.org/package=ivreg> and the ivreg pkgdown webpage at <https://john-d-fox.github.io/ivreg/>. Comments, suggestions, and bug reports would be appreciated. John -- John Fox, Professor Emeritus McMaster University

Re: [R] How to obtain individual log-likelihood value from glm?

2020-08-29 Thread John Fox
just an optimization problem at the end of day, or not? Thanks On Sat, Aug 29, 2020 at 9:02 AM John Fox mailto:j...@mcmaster.ca>> wrote: Dear John, On 2020-08-29 1:30 a.m., John Smith wrote: > Thanks Prof. Fox. > > I am curious: wh

Re: [R] How to obtain individual log-likelihood value from glm?

2020-08-29 Thread John Fox
ept" or "regression constant." Perhaps I'm missing some connection -- I'm not the best person to ask about machine learning. Best, John On Sat, Aug 29, 2020 at 9:02 AM John Fox wrote: Dear John, On 2020-08-29 1:30 a.m., John Smith wrote: Thanks Prof. Fox. I am c

Re: [R] How to obtain individual log-likelihood value from glm?

2020-08-29 Thread John Fox
I guess the question is what are you trying to achieve with the weights? Best, John On Aug 28, 2020, at 10:51 PM, John Fox wrote: Dear John I think that you misunderstand the use of the weights argument to glm() for a binomial GLM. From ?glm: "For a binomial GLM prior weights are use

Re: [R] How to obtain individual log-likelihood value from glm?

2020-08-28 Thread John Fox
proportion of successes (i.e., between 0 and 1) and the weights are integers giving the number of trials for each binomial observation. I hope this helps, John John Fox, Professor Emeritus McMaster University Hamilton, Ontario, Canada web: https://socialsciences.mcmaster.ca/jfox/ On 2020-08-2

Re: [R] install.packages() R vs RStudio

2020-08-17 Thread John Fox
masked from ‘package:base’:     as.Date, as.Date.numeric" so they may as well be silent. Duncan Murdoch On 17/08/2020 10:02 a.m., John Fox wrote: Dear Duncan, On 2020-08-17 9:03 a.m., Duncan Murdoch wrote: On 17/08/2020 7:54 a.m., Ivan Calandra wrote: Dear useRs, Following the recent

Re: [R] install.packages() R vs RStudio

2020-08-17 Thread John Fox
Dear Duncan, On 2020-08-17 9:03 a.m., Duncan Murdoch wrote: On 17/08/2020 7:54 a.m., Ivan Calandra wrote: Dear useRs, Following the recent activity on the list, I have been made aware of this discussion: https://stat.ethz.ch/pipermail/r-help/2020-May/466788.html I used to install all packages

Re: [R] Best settings for RStudio video recording?

2020-08-14 Thread John Fox
et the size of the fonts in RStudio, I tested in a dummy Zoom session that I viewed on a small laptop prior to the start of the lecture series. I hope this helps, John John Fox, Professor Emeritus McMaster University Hamilton, Ontario, Canada web: https://socialsciences.mcmaster.ca/jfox/ On 2020

Re: [R] Dependent Variable in Logistic Regression

2020-08-01 Thread John Fox
The original poster claimed to have encountered an error with a 0/1 numeric response, but didn't show any data or even a command. I suspect that the response was a character variable, but of course can't really know that. Best, John John Fox, Professor Emeritus McMaster U

Re: [R] Axis with inverse logarithmic scale

2020-07-28 Thread John Fox
Dear Martin, On 7/28/2020 10:17 AM, Martin Maechler wrote: Martin Maechler on Tue, 28 Jul 2020 15:56:10 +0200 writes: John Fox on Mon, 27 Jul 2020 12:57:57 -0400 writes: >> Dear Dileepkumar R, >> As is obvious from the tick marks, the vertical axis is no

Re: [R] Axis with inverse logarithmic scale

2020-07-27 Thread John Fox
conforms to what the axis label says. Also, the ticks in the R version point out rather than into the plotting region -- the former is generally considered better practice. Finally, the graph is not a histogram as the original title states. I hope this helps, John -

Re: [R] Error message from allEffects(model) / effect(model)" ‘range’ not meaningful for factors"

2015-08-19 Thread John Fox
;, m) # ditto x effect x abc 3.322448 3.830997 4.969154 Best, John ------- John Fox, Professor McMaster University Hamilton, Ontario, Canada http://socserv.socsci.mcmaster.ca/jfox/ > -Original Message- > From: R-help

Re: [R] R GUI tklistbox get value

2015-07-20 Thread John Fox
Dear j.para.fernandez, Try selecvar <- dat[, as.numeric(tkcurselection(tl))+1] Omitting the comma returns a one-column data frame, not a numeric vector. I hope this helps, John ---- John Fox, Professor McMaster University Hamilton, Onta

Re: [R] powerTransform warning message?

2015-07-16 Thread John Fox
e of multivariate normals, which almost surely isn't itself normal. I hope this helps, John John Fox, Professor McMaster University Hamilton, Ontario, Canada http://socserv.mcmaster.ca/jfox/ > Thank you so much! > > Brittany > [[alternative

  1   2   3   4   5   6   7   8   9   >