I am struggling with getting the right code on xls. exported data to estimate the initial values of model parameters (logistic, Gompertz, Richards, and Weibull) my ymax is 61.0
I tried with these two but I get error:
Any suggestion? Thanks!
DATA=ALL
YMAX=61.0
LOGISTIC=LOG((YMAX/Y)-1);
GOMPERTZ=LOG(-LOG(Y/YMAX));
RICHARDS=LOG(1-(Y/YMAX));
WEIBULL=LOG((-LOG(1-(Y/YMAX));
LNX=LOG(X);
RUN;
PROC REG DATA=ALL
MODEL LOGISTIC=X;
MODEL GOMPERTZ=X;
MODEL RICHARDS=X
MODEL WEIBULL=LNX;
RUN;
There is no equal sign in a DATA statement. DATA statements must end with a semi-colon. Assigning values must end with a semi-colon. Variables Y and X are never assigned a value. The number of open parentheses in a statement must equal the number of close parentheses in the statement.
Also you can't fit a regression to this data, it has only one data point.
There is no equal sign in a DATA statement. DATA statements must end with a semi-colon. Assigning values must end with a semi-colon. Variables Y and X are never assigned a value. The number of open parentheses in a statement must equal the number of close parentheses in the statement.
Also you can't fit a regression to this data, it has only one data point.
Syntax should be:
DATA ALL;
YMAX=61.0;
set mydata; /* dataset mydata contains X and Y variables */
LOGISTIC=LOG((YMAX/Y)-1);
GOMPERTZ=LOG(-LOG(Y/YMAX));
RICHARDS=LOG(1-(Y/YMAX));
WEIBULL=LOG(-LOG(1-(Y/YMAX)));
LNX=LOG(X);
RUN;
PROC REG DATA=ALL;
var X LNX LOGISTIC GOMPERTZ RICHARDS WEIBULL;
Logistic: MODEL LOGISTIC=X;
Gompertz: MODEL GOMPERTZ=X;
Richards: MODEL RICHARDS=X;
Weibull: MODEL WEIBULL=LNX;
RUN;
(untested)
Still needs to have open and close parentheses match.
Thanks @PaigeMiller . I edited the code.
We would need to see the SAS log (the part showing the code and warnings/errors) to help you further.
This message usually signals that all observations contain missing values. Please check the contents of dataset WORK.IMPORT.
It seems ok to me. The data xls. format is attached if you could check. It has DBH (X) and HT (Y).
I want to do this because my goal is to use the modified logistic functions to fit the function to the data using three iteration methods available in PROC NLIN (GAUSS, MARQUARDT, and NEWTON). Then compare the parameter estimates, asymptotic standard errors for the parameters, and asymptotic correlations among the parameters for the three methods.
When @PGStats says check the data, he specifically means (and specifically stated) check the SAS data set you are using, specifically you need to look at WORK.IMPORT and see if everything is okay in there. The XLS file is irrelevant.
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.
Find more tutorials on the SAS Users YouTube channel.