Thoughts of a Crime Show Junkie: Inadmissible Evidence
Recent Library Articles
Recently in the SAS Community Library: SAS' @RhondaWilliams reveals how SAS Law Enforcement Intelligence helps law enforcement agencies expedite detailed data entry using the Evidence Creation feature.
Hi, How can I obtain the p-value of the ADF test, which uses AIC or BIC to determine the lag for residuals, in order to test the stationarity of the residuals of a linear regression model? The input data and model that I have: data df;
input dep ind1 ind2 ind3;
cards;
-4.66344 0.5337595 1.533904 -0.1824561
-4.27203 0.5371667 1.638746 -0.2840759
-4.31303 0.5187737 1.708084 -0.208212
-3.46126 0.501581 1.773411 0.7434088
-3.10906 0.5024615 -0.7010086 0.4447428
-2.83321 0.50575 0.7289928 0.2619768
-2.74544 0.4943883 0.7419567 0.7679318
-3.30505 0.4825768 0.7544792 0.273685
-3.28185 0.468799 0.9924411 -0.1544852
-3.54578 0.4705212 1.133435 0.6179188
;
run;
proc reg
data=df;
model dep = ind1 ind2 ind3 ;
run; Thank you!
... View more
Hello everyone,
I am trying to create a dynamic proc format that is based on the monthly data for the past 7 or 8 years. I am using SAS version SAS 9.4 and enterprise guide 8.3. Here is a look at a portion of the normal proc format that I am trying to emulate.
proc format; INVALUE classordinal '2016-05'= 1 '2016-06'= 2 '2016-07'= 3 '2016-08'= 4 '2016-09'= 5 '2016-10'= 6 '2016-11'= 7 '2016-12'= 8 '2017-01'= 9 '2017-02'= 10 '2017-03'= 11 '2017-04'= 12
;
RUN;
I figured out how to generate the needed months, but don't know how to put it into a proc format statement.
data empty; format vintage yymmd7.; do i = 96 by -1 to 1; vintage = intnx('month', today(), -i, 'B'); classrank = 97 - i; output; end; drop i; run;
proc sql; select put(vintage, yymmd7.), put(classrank, 8.) into :vintages separated by ' ', :classranks separated by ' ' from empty; quit;
results
2016-05
1
2016-06
2
2016-07
3
2016-08
4
2016-09
5
2016-10
6
2016-11
7
2016-12
8
2017-01
9
2017-02
10
2017-03
11
2017-04
12
Thanks for your help.
... View more
I am currently working on the analysis of animal behaviour (frequency and duration) in a 2 x 2 factorial design, on two days (d2 and d16). Behavioural frequencies were analysed with proc glimmix with a Poisson distribution and Log link function, and a multiplicative overdispersion parameter: proc glimmix data=behav;
by Obs_Day;
class Batch Sanitary Diet;
model Fighting_Total_number = Batch Sanitary|Diet / dist=Poisson link=log;
random _residual_;
lsmeans Batch Sanitary|Diet / pdiff;
run; Durations were analysed with proc glimmix, with a binomial distribution and logit link function, and a multiplicative overdispersion parameter: proc glimmix data = behav;
NLoptions Maxiter = 2000;
by Obs_Day;
class Batch Sanitary Diet;
model Fighting_Total_duration = Batch Sanitary|Diet / dist = binomial link = logit;
random _residual_ ;
lsmeans Batch Sanitary|Diet / pdiff;
run; These are standard methods used by my department for such analyses. However, I was later told that because one treatment group had 0 incidences of a certain behaviour on d2, I cannot use proc glimmix. Is that so? If yes, what is the alternative? I would appreciate any help from the community.
... View more
Hi SAS community, I am a novice SAS user. I would like to analyze a dataset from an experiment. I have tree samples from two trials conducted at different sites. Each site was divided into several blocks, and tree seedlings from 4 origins were randomly planted within each black. 50+ years later, two blocks from each site were selected and 3 trees from each of the origins were harvested. Then each tree was "cut" into wood products using 3 different cutting methods (using a simulation software). I would like to test if there are differences in product recovery between the two sites, among the origins, and among the cutting methods. 1) I am not interested in blocks, so the block factor will be a random variable. Should I consider trees from each origin as subsampling or as another random factor, or maybe a replication? 2) The analysis I have done so far assumed the trees were randomly select from each origin within each block. What if the trees were randomly selected not at the origin level, but at the block level to cover the full range of tree sizes within the block (tree size have huge effect on recovery)? If this were the case, should I drop origin in the model, because its levels were not considered in the sampling? Here is what I have so far. I am not confident if this is a correct analysis and will be very appreciate if anyone could point me to a correct way to analyze the data (attached). PROC GLIMMIX data=data; class site origin block cut tree; model recovery = site*origin*cut/ddfm=kr; random block site*origin*cut*block; run; Thank you very much. Tess
... View more
Well, I know you've been asking yourself, "When is the new SAS developer portal going to launch?" The answer is, it already has.
This marks a significant milestone for the API Developer Experience team as we announce the external launch of the new developers.sas.com (notice the 's' on developers)! It's available now. Go check it out.
... View more