[R] OT: A philosophical question about statistics

2025-05-06 Thread Gregg Powell via R-help
Sent from Proton Mail Android Kevin, Looks like I sent the wrong URL Try this instead. https://www.biopharmaservices.com/blog/statistical-methods-the-conventional-approach-vs-the-simulation-based-approach/#:~:text=Both%20simulation,reliability%20of%20their%20statistical%20analyses Best rega

[R] OT: A philosophical question about statistics

2025-05-05 Thread Gregg Powell via R-help
Hi Kevin, It might seem like simulation methods (bootstrapping and randomization) and traditional formulas (Normal or t-distributions) are just two ways to do the same job. So why learn both? Each approach has its own strengths, and statisticians use both in practice. Why do professionals use b

[R] Estimating regression with constraints in model coefficients - Follow-up on Constrained Ordinal Model — Optimized via COBYLA

2025-05-04 Thread Gregg Powell via R-help
PM, Gregg Powell via R-help wrote: > > > Hello Christofer, > > That’s good information. Thanks for the precision. > Think I can use this now to work on a script: > > Based on what you provided: > 1. Two distinct sets of coefficients, β¹ and β², each associated with

Re: [R] Estimating regression with constraints in model coefficients

2025-05-01 Thread Gregg Powell via R-help
Hello Christofer, That’s good information. Thanks for the precision. Think I can use this now to work on a script: Based on what you provided: 1. Two distinct sets of coefficients, β¹ and β², each associated with the logits for: • P(Y≤1)P(Y ≤ 1)P(Y≤1) • P(Y≤2)P(Y ≤ 2)P(Y≤2) 2. Separate sum co

Re: [R] Estimating regression with constraints in model coefficients

2025-04-29 Thread Gregg Powell via R-help
Hello again Christofer, This clarification changes the model structure somewhat significantly -it shifts us from a standard cumulative logit model with proportional odds to a non-parallel cumulative logit model, where each threshold has its own set of β coefficients. At least, that is now my un

Re: [R] How to find inverse of glm model?

2025-04-24 Thread Gregg Powell via R-help
nt"), lin)) : > > > NA/NaN/Inf in foreign function call (arg 5) > > > ``` > > > How can I properly set this regression model? > > > Thank you > > > > > On Wed, Apr 16, 2025 at 7:08 AM Luigi Marongiu marongiu.lu...@gmail.com > &g

Re: [R] Estimating regression with constraints in model coefficients

2025-04-24 Thread Gregg Powell via R-help
Christofer, That was a detailed follow-up — you clarified the requirements precisely enough providing a position to proceed from... To implement this, a constrained optimization procedure to estimate an ordinal logistic regression model is needed (cumulative logit), based on: 1. Estimated Cut

Re: [R] How to find inverse of glm model?

2025-04-23 Thread Gregg Powell via R-help
& Statistics > > > University of Melbourne, VIC 3010 Australia > > > Tel: (+61) 0403 138 955 > > > Email: a...@unimelb.edu.au > > > Website: https://researchers.ms.unimelb.edu.au/~apro@unimelb/ > > > > > > I acknowledge the Traditional Ow

Re: [R] Estimating regression with constraints in model coefficients

2025-04-23 Thread Gregg Powell via R-help
Hello again Christofer, Thanks for your thoughtful note — I’m glad the outline was helpful. Apologies for the long delay getting back to you. Had to do a small bit of research… Recommended Text on Ordinal Log-Likelihoods: You're right that most online sources jump straight to code or canned func

Re: [R] Estimating regression with constraints in model coefficients

2025-04-21 Thread Gregg Powell via R-help
Christofer, Given the constraints you mentioned—bounded parameters, no intercept, and a sum constraint—you're outside the capabilities of most off-the-shelf ordinal logistic regression functions in R like vglm or polr. The most flexible recommendation at this point is to implement custom likel

Re: [R] How to find inverse of glm model?

2025-04-15 Thread Gregg Powell via R-help
Take a look at this Luigi... ># The model is: logit(p) = β₀ + β₁*Cycles ># Where p is the probability (or normalized value in your case) > ># The inverse function would be: Cycles = (logit⁻¹(p) - β₀)/β₁ ># Where logit⁻¹ is the inverse logit function (also called the expit >function) > ># Extract

Re: [R] Estimating regression with constraints in model coefficients

2025-04-08 Thread Gregg Powell via R-help
there are ways to implement constraints on parameter estimates in ordinal logistic regression in R. Here are a few approaches: The rms package (Regression Modeling Strategies) by Frank Harrell offers the lrm function which can handle constraints through its penalty parameter, though it's primar

Re: [R] Cores hang when calling mcapply

2024-12-12 Thread Gregg Powell via R-help
Hi Thomas, Glad to hear the suggestion helped, and that switching to a `data.table` approach reduced the processing time and memory overhead—15 minutes for one of the smaller datasets is certainly better! Sounds like the adjustments you devised, especially keeping the multicore approach for `ma

Re: [R] Cores hang when calling mcapply

2024-12-11 Thread Gregg Powell via R-help
How is the server configured to handle memory distribution for individual users. I see it has over 700GB of total system memory, but how much can be assigned it each individual user? AAgain - just curious, and wondering how much memory was assigned to your instance when you were running R. reg

Re: [R] Cores hang when calling mcapply

2024-12-11 Thread Gregg Powell via R-help
Thomas, I'm curious - what OS are you running this on, and how much memory does the computer have?  Let me know if that code worked out as I hoped. regards, gregg On Wednesday, December 11th, 2024 at 6:51 AM, Deramus, Thomas Patrick wrote: > About to try this implementation. > > As a foll

Re: [R] Cores hang when calling mcapply

2024-12-10 Thread Gregg Powell via R-help
Hello Thomas, Consider that the primary bottleneck may be tied to memory usage and the complexity of pivoting extremely large datasets into wide formats with tens of thousands of unique values per column. Extremely large expansions of columns inherently stress both memory and CPU, and splitting

Re: [R] Fwd: effects() extractor for a quantile reqression object: error message

2024-09-06 Thread Gregg Powell via R-help
Need to kill some time, so thought I'd Opine. Given the intent, as I understood it... to extract components from a quantile regression (rq) object similar to how one might extract effects from an lm object. Since it seems effects() is not implemented for rq, here are some alternative approach

Re: [R] Is there a package that can do Fuzzy name matching to standardize names in a single column

2022-06-15 Thread Gregg Powell via R-help
; Best Regards, > Ashim > > On Wed, Jun 15, 2022 at 8:28 PM Gregg Powell via R-help > r-help@r-project.org wrote: > > > Have data sets where there are names, in the first column, client names in > > the second, and Client start date in the third. > > >

Re: [R] How to remove all rows that have a numeric in the first (or any) column

2021-09-15 Thread Gregg Powell via R-help
klish to handle within base R but less so in > >the tidyverse. > > > >For example, if I try to make a data.frame the normal way, the list gets > >made into multiple columns and copied to each row. Not what was expected. I > >think some tidyverse functionality does b

Re: [R] How to remove all rows that have a numeric in the first (or any) column

2021-09-14 Thread Gregg Powell via R-help
llianne Carantes" $ : num 12 ‐‐‐ Original Message ‐‐‐ On Tuesday, September 14th, 2021 at 8:32 PM, Jeff Newmiller wrote: > An atomic column of data by design has exactly one mode, so if any values are > non-numeric then the entire column will be non-numeric. What does &

[R] How to remove all rows that have a numeric in the first (or any) column

2021-09-14 Thread Gregg Powell via R-help
> Stuck on this problem - How does one remove all rows in a dataframe that have > a numeric in the first (or any) column? > > Seems straight forward - but I'm having trouble. > I've attempted to used: VPN_Sheet1 <- VPN_Sheet1[!is.numeric(VPN_Sheet1$HVA),] and VPN_Sheet1 <- VPN_Sheet1[!i

[R] Need to compare two columns in two data.frames and return all rows from df where rows values are missing

2021-06-13 Thread Gregg Powell via R-help
> > 2 B 2 NA > > 3 C 3 NA > > 4 D 4 NA > > 5 E 5 NA > > > df_D > > names values_B values_A > > 6 K 16 NA > > 7 L 17 NA > > 8 M 18 NA > > 9 N 19 NA > > 10 O 20 NA > > HTH, Bill. > > W. Michels, P

[R] Need to compare two columns in two data.frames and return all rows from df where rows values are missing

2021-06-13 Thread Gregg Powell via R-help
This is even complicated to write into a question Have two data.frames (A and B) data.frame A and B each have a name column. Want to compare A and B data.frame to each other based on the values in the 'names' columns - for every name that appears in dataframe A  but not B, I want to copy th

[R] Need to compare two columns in two data.frames and return all rows from df where rows values are missing

2021-06-13 Thread Gregg Powell via R-help
This is even complicated to write into a question Have two data.frames (A and B) data.frame A and B each have a name column. Want to compare A and B data.frame to each other based on the values in the 'names' columns - for every name that appears in dataframe A  but not B, I want to copy th