Hello, I know that i can use INTCK on studio but i want to know if i can find a formula in visual Analytics to measure the delay between 2 dates and exclude the week end or blank days.
... View more
Esteemed Advisors:
I am trying to interleave two datasets with a condition that the resulting dataset contains only observations that can be found in both of the two datasets.
Below is exemplar code to illustrate the problem. If you run this code and inspect dataset interleave2 you will see that for a group of 3 observations where target=1, two came from Random_A and one came from Random_B. Likewise, for a group of three observations where target=2, two came from Random_B and one came from Random_A. All of these observations need to be retained in the desired dataset.
For the group of 3 observations where target=3, all observations came from Random_B only. These are ones that need to be omitted. All observations for a given target that come from a single source dataset are not to be retained in the desired dataset.
The challenge for me (and now for you) is to come up with the code that will interleave Random_A and Random_B such that the resultant dataset that only contains the groups of targets that are present in both datasets.
Hope this makes sense and thanks for taking a look,
Gene
data Random_A (drop=i);
call streaminit(4786);
do i=1 to 100;
Source="A";
Target=rand("Integer",1,100);
ST=catx('/',Source,Target);
output;
end;
data Random_B (drop=i);
call streaminit(6874);
do i=1 to 150;
Source="B";
Target=rand("Integer",1,100);
ST=catx('/',Source,Target);
output;
end;
Proc sort data=Random_A;
by ST;
run;
Proc sort data=Random_B;
by ST;
run;
data interleave1;
set random_A random_B;
by ST;
run;
proc sort data=interleave1 out=interleave2 nounikey;
by target;
run;
... View more
Hello, I'm trying to find an optimal solution for a problem I'm having. I'm looking for 3D solution. I'm trying to convert a Point from world coordinates to the local coordinates of a specific Object, so that when the Object rotates/changes position, I would still be able to find new coordinate for the Point, that would be have the same relation (position/rotation) to the Object as during the initial state. I have the Forward, Right, Up vector of this Object; its position in world coordinates as well as the position of the Point in world coordinates. I was thinking I could get the difference in angles between the vector from Object's origin to Point's origin and the Forward vector of the Object, and then rotate by this difference from the Forward vector backwards to get the direction of the desired vector, but that is unreliable. So I'm assuming I will have to use some transformation Matrix for this. What are the maths for my exact situation, where I'd be using a custom axis (the Forward vector of my object) and to do the conversion from world to local coordinates?
... View more
My default region is Europe, but I need to create a course for PharmaSUG on the server for United States 1. How do I create an account away from my default region?
... View more
Tried using the following code and obtained the error message below. Would greatly appreciate any insight into how to correct code/what I am doing wrong. variables BMI and age are continuous, gender is binary. Code: proc mcmc data=pdata outpost=pdata seed=1234 nmc=20000; ods select PostSumInt; parms beta0 0 beta1 0 beta2 0 beta3 0 s2 1; prior s2 ~ igamma(0.01, s=0.01); prior beta: ~ general(0); w = beta0 + beta1*bmi + beta2*age + beta3*gender; random delta ~ normal(w, var=100) subject=childid; pi = logistic(delta); model sick ~ binomial(p=pi); run; ERROR: A hyperparameter of the random effect delta changed value in observation 2. The hyperparameter is a function of the data set variable bmi, which must remain constant within subjects.
... View more