yesterday
TomHsiung
Pyrite | Level 9
Member since
01-04-2018
- 130 Posts
- 50 Likes Given
- 3 Solutions
- 7 Likes Received
-
Latest posts by TomHsiung
Subject Views Posted 237 Monday 401 Sunday 739 Saturday 842 Friday 863 Friday 891 Friday 266 a week ago 508 03-09-2025 04:04 AM 582 03-08-2025 06:02 AM 633 03-08-2025 01:41 AM -
Activity Feed for TomHsiung
- Liked Re: Can we do the approximately unbiased estimator for the probability density function of cont. var for Season. Monday
- Posted Re: Can we do the approximately unbiased estimator for the probability density function of cont. var on Statistical Procedures. Monday
- Liked Re: Can we do the approximately unbiased estimator for the probability density function of cont. var for FreelanceReinh. Monday
- Liked Re: Can we do the approximately unbiased estimator for the probability density function of cont. var for Season. Monday
- Posted Re: Can we do the approximately unbiased estimator for the probability density function of cont. var on Statistical Procedures. Sunday
- Liked Re: Can we do the approximately unbiased estimator for the probability density function of cont. var for Season. Sunday
- Got a Like for Re: Can we do the approximately unbiased estimator for the probability density function of cont. var. Sunday
- Posted Re: Can we do the approximately unbiased estimator for the probability density function of cont. var on Statistical Procedures. Saturday
- Liked Re: Can we do the approximately unbiased estimator for the probability density function of cont. var for Season. Saturday
- Liked Re: Can we do the approximately unbiased estimator for the probability density function of cont. var for Sa_S. Friday
- Posted Re: Can we do the approximately unbiased estimator for the probability density function of cont. var on Statistical Procedures. Friday
- Liked Re: Can we do the approximately unbiased estimator for the probability density function of cont. var for Season. Friday
- Got a Like for Re: Can we do the approximately unbiased estimator for the probability density function of cont. var. Friday
- Posted Re: Can we do the approximately unbiased estimator for the probability density function of cont. var on Statistical Procedures. Friday
- Liked Re: Can we do the approximately unbiased estimator for the probability density function of cont. var for Sa_S. Friday
- Got a Like for Can we do the approximately unbiased estimator for the probability density function of cont. var?. Friday
- Posted Can we do the approximately unbiased estimator for the probability density function of cont. var? on Statistical Procedures. Friday
- Liked Re: SAS data platform, where? Accessible? for Ksharp. a week ago
- Liked Re: SAS data platform, where? Accessible? for quickbluefish. a week ago
- Posted SAS data platform, where? Accessible? on Administration and Deployment. a week ago
-
Posts I Liked
Subject Likes Author Latest Post 1 3 1 1 1 -
My Liked Posts
Subject Likes Posted 1 Saturday 1 Friday 1 Friday 2 04-23-2024 02:51 AM 2 04-19-2024 11:38 AM
04-09-2024
09:23 AM
Hi, Jacob and all responders
Thank you for answering my question. Yep, so far I now this matrix method could be used to estimation the interval estimation of regression coefficients. However, I would like to understand the proof of this method because it is so fundamental and important for regression technology.
Tom
... View more
04-08-2024
10:30 AM
proc lifereg data = d202_raw order = formatted;
format x1 x2 x3 x4 x5 grpfmt.;
class x2 x3 x4;
model time*censor(0) = x1 x2 x3 x4 x5 / distribution = weibull;
run;
The PROC LIFEREG procedure does tell me the coefficients for variables and the Weibull shape. However, now I would like to draw the survival function curve with a confidence interval. The point estimation is easy to figure out by inputting the point estimations of these variables and the Weibull shape parameter. However, how to figure out the confidence interval of the survival curve? Hitherto, I only used the lower and upper limits of the Weibull shape parameter to do so. Much appreciated.
... View more
04-03-2024
03:39 AM
Hi, everyone
I don't quite understand the math behind the way the covariance matrix determines the CIs of regression coefficients. It is too hard for me because I know little about the matrix math. I guess there are some theories similar to the Delta method to get the results of CIs. However, I don't know where I should start. I intend to understand the proof and I would like to hear your suggestions. Thanks.
... View more
03-30-2024
01:41 AM
Got it. Thank you for your help. Koen.
... View more
03-29-2024
07:28 AM
There are many ways to model a Weibull distribution (reference: https://www.mdpi.com/2227-7390/12/1/56).
Some textbooks use a parametric proportional hazard model to construct the likelihood function. Others include the accelerated failure time (AFT) model, and so on. My question is what is the model used for the PROC LIFEREG procedure? Thanks.
Code below.
proc lifereg data = d202_raw order = formatted;
format x1 x2 x3 x4 x5 grpfmt.;
class x2 x3 x4;
model time*censor(0) = x1 x2 x3 x4 x5 / distribution = weibull;
run;
... View more
02-12-2024
08:49 AM
Hello, sir or madam
Thank you for your reply and I think a scenario would help to express more clearly of my idea.
The maximum likelihood of Poisson regression requires the calculation of the joint likelihood function. For Poisson regression, observations are categorized by their characteristics into several groups and each has a likelihood function expressed via the probability mass function of Poisson distribution.
Saying, we have a model of log(λ) = a +bX and X is the independent variable. Assume we have 100 observations and we designed X for the representation of age groups in the unit of decade. Therefore, the observations are categorized by X into several groups (a discrete variable), and each group could have sample λ of integrals other than 0 and 1, which fits the Poisson distribution.
However, if we use designed X for the representation of age in the unit of second (similar to a continuous variable), for these 100 observations, it is very likely they will be categorized into 100 groups. For each group, the λ could be only 0 or 1, which violates the assumption of Poisson distribution.
... View more
02-04-2024
04:21 AM
The Poisson regression should have a response variable of a natural number (e.g., 0, 1, 2, ..., n). Hypothesis: If we include a continuous independent variable in the Poisson regression model, the result probably would be that there is only one observation that has the exact value of that independent variable (because the value of that independent is so precision, e.g., two or more numbers after the decimal). This causes a problem because the response variable, given my hypothesis, is impossible to be any natural numbers except 0 and 1. This results in a binomial distribution instead of a Poisson distribution.
Above is my idea. I hope to hear your ideas. You're welcome.
Thanks.
... View more
12-23-2023
03:15 AM
I have read parts of this paper (https://pubmed.ncbi.nlm.nih.gov/35924051/). In the statistical method section, it described,
Daily medication exposure and processes of care (sedative, acid inhibitors, blood transfusion, mandatory ventilation, and head-of-bed elevation, gastrointestinal decompression, and rehabilitation exercise) and medications (sedatives, opioids, neuromuscular blockers, immunosuppressive agent, neuroleptic agents, antibiotics, expectorants, vasopressors, intestinal probiotics, and neuroleptic agents) were defined as time-varying variables. Time-varying variables were measured as daily exposure from initiation of MV to the event of interested for the model of VAEs and each day from ICU admission to ICU discharge for the model of ICU discharge and ICU mortality.
It looks like the authors included a dozen time-varying cofactors in their Cox regression model. So, I wonder how they handled the dataset. Each patient could have a dozen time-varying cofactors, and each such cofactor could have several different values. To record the data into a dataset must be a tough mission but I don't know how they did it.
... View more
11-28-2023
04:09 AM
Hi, everyone
I just learned how to process time-varying data in PROC PHREG but I only know how to do so for a data set that has only one time-varying variable. I wonder if is it possible to do the time-dependent Cox regression with two, three, or more independent cofactors (i.e., observations received several different exposures at different times). Thanks.
... View more
11-21-2023
08:11 AM
And after some google later, I found the link = log is a model called "log-binomial regression" (https://stats.stackexchange.com/questions/581678/what-is-the-difference-between-a-logistic-regression-and-log-binomial-regression )
The thread says,
Logistic regression always produces estimates of 𝑝𝑖 that are between 0 and 1. This is not true for log-binomial regression;
I guess this is the reason why few people use the log-binomial regression to model their data because the risk of deriving a risk higher than 100%. Thanks.
... View more
11-19-2023
05:03 AM
Hi, everyone
Recently I have been learning logistic regression. I know that PROC GENMOD could be used to do a logistic regression with the option link = logit. However, with the link = logit I can only get the odds ratio. I am more interested in the relative risk and what I found via Google is the same PROC GENMOD but with an option of link = log.
So, my question is: Does the PROC GENMOD still do a logistic regression with the option of link = log? If yes, what is the math behind it? If not, then what is the mathematical mode it uses? Thanks
... View more
- Tags:
- relative risk
08-31-2023
01:23 PM
/*Spline for hazard ratios*/
%macro SplineHR;
proc phreg data = &raw_data_name plots = cumhaz;
class &class_var;
effect SplALB = spline(serumAlb/naturalcubic);
model &length*&censor(0) = &indep_list / rl=Wald;
*effectplot fit(x=serumAlb);
*effectplot fit(x=serumAlb) / link;
hazardratio serumAlb / at(serumAlb = 25 to 45);
run;
%mend;
%SplineHR
Hello, everyone.
With the above macro and other codes, I indeed got the expected outcome. But, unlike PROC LOGISTIC, they are listed as a table instead of a spline plot. Any suggestion for making the plot? Thanks.
... View more
08-31-2023
10:44 AM
Exactly! This is the issue. I specified serumALB instead of SplALB in the MODEL statement. After correcting this error, everything followed as expected. Thank you.
... View more
08-31-2023
06:41 AM
Hello, Dave.
Wow! That's a great reference. Thanks. I copied and edited the code to suit my project. But, so far, I have never get the Odd Ratio plot as shown in the first example. My code only generated one column for the variable of serumAlb. I am just not able to make it. Your investigation would be of great important. Thanks.
My code:
%macro Logistic2;
proc logistic data= &raw_data_name plots = oddsratio(type=vertical);
class &class_var;
effect SplALB=spline(serumAlb/naturalcubic);
model &censor(event = '1') = &indep_list;
effectplot fit(x=serumAlb);
effectplot fit(x=serumAlb) / link;
oddsratio serumAlb / at(serumAlb=34.8125 36.0425 37.35 39.0 40.92);
store kmod;
run;
%mend;
%Logistic2
... View more
- Tags:
- ello
08-31-2023
03:28 AM
Thanks for these advice, ballardw.
Yep, I will follow your guide.
... View more
- Tags:
- sk