-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Least squares mean in BE #33
Comments
Hi! |
Actually, I understand what you want. Your code leads to some warnings with output. I make a few changes (check the level of reference ): proc mixed data=be;
class seq trt(ref="R") per subject;
model lcmax=seq trt per/ddfm=satterth solution;
random trt/sub=subject type=fa0(2);
repeated /group=trt sub=subject;
lsmeans trt ;
ESTIMATE 'diff' trt 1 -1/CL ALPHA=0.1;
ods output Estimates=est;
ods output LsMeans=lsm;
ods output Tests3=anova;
ods output CovParms=res(rename=(estimate=var));
run; So for LsMeans in ReplicateBE at first you should make L matrix (1xp), where p - length of fixed effect vector
then you can get an estimate:
There is no automatic creation of L-matrix by the factor in ReplicateBE. But this can be done easily: Set 1 for Intercept coefficient, set 1 for one level of the factor of interest (or 0 for base level). For other sets 1/n where n - number of levels in a factor. For the example above: 1st - intercept, 2nd - 1/2 (2 sequences), 3-5 - 1/4 (4 periods), 6 - 1 for T 0 for R. |
Thanks for your reply! This package is very useful for my research. I also recommended it to my colleagues. this tutorial has perfectly solved my problem for your reply. I have starred this depot. However, I found that it takes a long time to run data for the first time (sample size is 27). , and it may take 80 seconds. But the second run will be very fast. I would like to know what caused this. I use this package in R through JuliaConnectoR. In fact, it also has this problem when running in julia (it takes a long time). Hope to get your reply. My computer configuration is as follows.
|
Hi! Glad if this repo helps you! "First time run" is a known feature (problem) of Julia - this time used for compilation. Second run - is real work time. Also other packages can take time for compilation. ReplicateBE using ForwardDiff for REML gradient and hessian - it add little more compile time. In future development ReplicateBE will use Metida for fitting, it can help to make better fitting and validation. One more question. Why are you using Julia under R? Is any specific package that is not present in Julia? |
How to use API to obtain the least squares mean of rbe results
The text was updated successfully, but these errors were encountered: