| Date: | Wed, 28 Nov 2007 21:22:29 +0000 |
| Reply-To: | toby dunn <tobydunn@HOTMAIL.COM> |
| Sender: | "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> |
| From: | toby dunn <tobydunn@HOTMAIL.COM> |
| Subject: | Re: Use of intck |
|
| In-Reply-To: | <474DD864.6010803@vdh.virginia.gov> |
| Content-Type: | text/plain; charset="iso-8859-1" |
Intck( 'Month' , DOB , DOV )
However it looks like you are trying to find someones age at a given time in which case there is a generally accepted one liner which will do this for you
Toby Dunn
"Don't bail. The best gold is at the bottom of barrels of crap."
Randy Pausch
"Be prepared. Luck is where preparation meets opportunity."
Randy Pausch
> Date: Wed, 28 Nov 2007 16:06:44 -0500
> From: Carolyn.Halbert@VDH.VIRGINIA.GOV
> Subject: Use of intck
> To: SAS-L@LISTSERV.UGA.EDU
>
> I have 2 date variables in datetime format and informat. I am trying to
> create a new variable by subtracting one from the other to get a
> variable that is the difference in number of months......I can't quite
> get this right...here are my attempts...
> data work.combined;
> set projects.combined;
> age = floor((intck('month',dov,dob)
> - (day(dov) < day(dob))) / 12);
> or
> age=DOV-DOB/31446925.9936;
> or
> /*INTCK(age,DOV,DOB)*/; /*both variables are in datetime format and
> informat*/
> run;
>
> I have a feeling I am 'close but no cigar'. Can anyone provide the
> appropriate syntax?
>
> Thanks
> Carolyn
>
>
> Automatic digest processor wrote:
>
>>There are 11 messages totalling 1010 lines in this issue.
>>
>>Topics in this special issue:
>>
>> 1. FFT in SAS
>> 2. use of stepwise cox regression in comparing relative "importance" of
>> variables
>> 3. Subsetting records with and without transposition
>> 4. run a SAS program before SAS session starts
>> 5. Job Opening: Statistical Analyst (Rockville, MD)
>> 6. Remote Teradata Check Permission
>> 7. I want to make a script to find all observations with the same PNR and
>> 8. Help! SAS NLMIXED. The final Hessian matrix is not positive definite?
>> 9. PLEASE help with my factor analysis and PROC CALIS!!!
>> 10. Do loop for array?
>> 11. OT: CheckSums
>>
>>----------------------------------------------------------------------
>>
>>Date: Wed, 28 Nov 2007 11:14:47 -0800
>>From: ram
>>Subject: FFT in SAS
>>
>>A couple of weeks back I had a question relating to FFT in SAS, but I
>>think that time I wrote my question down incorrectly. This is what I
>>want to do.
>>
>>I currently have an algorithm that implements a convolution type
>>aggregation in the following way. I want to compute S = X_1 + ... +
>>X_N where N is a random variable from a Poisson. So right now this is
>>what I do. I simulate an N, say 10, then compute S as X_1 + ... +
>>X_10. I repeat this process a thousand times. In SAS, the code looks
>>similar to the following:
>>
>> do i = 1 to 1000;
>> ;
>> mean = 10; sd = 15; /* These make the X_i 's
>>iid */
>> freq = ranpoi(-1,N);
>> S = 0;
>> do k = 1 to freq;
>> x = mean + sd*rannor(-1);
>> S = S + x ;
>> end; /* End for
>>loop freq number of times */
>> end; /* End for
>>the loop corresponding to i */
>>
>>I am trying to do the above using FFT. The outline of the algorithm,
>>which I want to implement in SAS, is as follows:
>>
>>Step 1 : Choose n = 2^r for some r
>>Step 2 : Discretize the distribution of x. Let [f_0,...,f_m] represent
>>the probability distribution of x. Pad the vector with 0's to the
>>right so that we get f=[f_0,...,f_m,0,...,0] with the vector f having
>>n elements.
>>Step 3: Obtain fft(f) = F (say)
>>Step 4: Compute exp(-freq + freq* F) = J
>>Step 5: Compute ifft(J) = distribution of S
>>
>>Once I get the distribution of S, I was thinking about simulating
>>values of S from its distribution.
>>
>>I am having a problem implementing the above algorithm in SAS. I am OK
>>until Step 2.
>>Now lets say I have a vector f = [f_0,...,f_m]. In step 3, I use Proc
>>IML to compute fft.
>>The resulting vector is supposed to have 2 columns according to the
>>SAS documentation but I get only 1 column. I do not know why this
>>happens.
>>
>>Here is the SAS code for the above algorithm:
>>
>>proc iml;
>> use parameters;
>> read all var {freq} into N;
>>
>> use temp1;
>> read all var _num_ into f;
>>
>> c = ; /* c here is the normalization factor for the FFT
>>and is taken to be the number
>> of elements in the vector f after padding 0 to
>>its right i.e. the value of n in Step (1)
>> of the above algorithm.*/
>>
>> dist_S = (ifft(exp(-lambda) # exp(lambda*fft(f)))) /(c);
>>
>> create dist_S_data var {dist_S};
>> append;
>>quit;
>>
>>My other question is that since f is a vector of probabilities, dist_S
>>is also supposed to be a vector of probabilities. But I do not have
>>values between 0 and 1. Instead, I get some values that are negative
>>or values much greater than 1. I first thought it got to do with the
>>normalization factor but I do not think this is the case.
>>
>>Thanks,
>>Ram.
>>
>>------------------------------
>>
>>Date: Wed, 28 Nov 2007 14:24:07 -0500
>>From: Sigurd Hermansen
>>Subject: Re: use of stepwise cox regression in comparing relative "importance"
>> of variables
>>
>>Vincent:
>>See
>>www.nesug.info/Proceedings/nesug07/sa/sa07.pdf
>>
>>Peter Flom, one of the co-authors of this paper, recommended it to a
>>person with a similar question. I recommend it highly to anyone
>>considering using step-wise regression or evaluating results of
>>step-wise model selection. The authors cite Harrell's Regression
>>Modeling Strategies (2001) book as a resource.
>>
>>Necessary, though not sufficient, rules for model selection these
>>criteria (in order of importance):
>>- a theoretical basis for or knowledge of a relation between causal
>>variable(s) and effects;
>>- a favorable trade-off between a more complex model (say, one that
>>includes highly correlated variables) and a less complex model (say, one
>>that excludes one or more of the highly correlated variables).
>>
>>Generally it works better to look at the overall fit of a less complex
>>model vs. a more complex model, and not at contributions of individual
>>variables. Model complexity varies with features other than selections
>>of variables: non-linear relations, splines, interactions, feedback,
>>etc.
>>S
>>
>>-----Original Message-----
>>From: owner-sas-l@listserv.uga.edu [mailto:owner-sas-l@listserv.uga.edu]
>>On Behalf Of duo wan
>>Sent: Wednesday, November 28, 2007 1:09 PM
>>To: SAS-L@LISTSERV.UGA.EDU
>>Subject: use of stepwise cox regression in comparing relative
>>"importance" of variables
>>
>>
>>Dear All,
>>
>> I am reading some clinical literatures for our research paper. They
>>adopted stepwise algorithm when building a final prognostic models.
>>However, they used this algorithm for:
>>
>> 1) Comparing the relative importance of two highly correlated
>>variables (different indicators for the same thing). Say the one kept in
>>the model is more important.
>> 2) Claiming that the variables with higher chi-squares are more
>>important in the final model
>>
>>
>> I really do not think two highly correlated variables can be compared
>>with stepwise regression. First, usually one of two highly correlated
>>variables has to go with stepwise regression. It is hard to tell the
>>magnitude of the differences between variables from stepwise. Also the
>>left one can be more important that some other variables kept in model
>>in terms of higher proportions of explained variations.
>>
>> Is there any good statistical paper about misusing of stepwise in
>>ranking the order of significant of variables or relative importance of
>>variables.
>>
>> Thanks,
>>
>> Vincent
>>
>>
>>---------------------------------
>>Be a better sports nut! Let your teams follow you with Yahoo Mobile. Try
>>it now.
>>
>>------------------------------
>>
>>Date: Wed, 28 Nov 2007 14:33:04 -0500
>>From: Sigurd Hermansen
>>Subject: Re: Subsetting records with and without transposition
>>
>>SB:
>>The answer to your first question is 'Yes'. In SAS PROC SQL, a ... GROUP
>>BY subjid HAVING max(value)>=15 .... clause finds the maximum value for
>>each subject and selects rows for that subject if any one of the rows
>>has a value greater or equal to 15. In SQL one declares a solution and
>>the SQL compiler determines how to implement that solution. No transpose
>>required.
>>
>>Do you still need an answer to your second question?
>>S
>>
>>-----Original Message-----
>>From: owner-sas-l@listserv.uga.edu [mailto:owner-sas-l@listserv.uga.edu]
>>On Behalf Of sas biology
>>Sent: Wednesday, November 28, 2007 4:44 AM
>>To: SAS-L@listserv.uga.edu
>>Subject: Fwd: Subsetting records with and without transposition
>>
>>
>>---------- Forwarded message ----------
>>From: sas biology
>>Date: Nov 28, 2007 4:42 AM
>>Subject: Subsetting records with and without transposition
>>To: "L-Soft list server at UGA (1.8d)"
>>
>>Hi Group,
>>
>>I have the following data set .
>>
>>*
>>
>>Data
>>*test;
>>
>>input
>>subjid visit value;
>>
>>cards
>>;
>>
>>1 1 10
>>
>>1 2 12
>>
>>1 3 16
>>
>>1 4 18
>>
>>1 5 17
>>
>>1 6 16
>>
>>2 1 11
>>
>>2 2 12
>>
>>2 3 14
>>
>>2 4 13
>>
>>3 1 10
>>
>>3 2 12
>>
>>3 3 16
>>
>>3 4 18
>>
>>3 5 17
>>
>>;
>>*
>>
>>run
>>*;
>>I need to list all the records for all the subjects if a particular
>>subject has a value more than or equal to 15 at any point(visit). To do
>>so, I transposed the data and subset by simple 'subsetting if' using the
>>following code.
>>
>>*
>>
>>proc
>>**transpose* data=test out=trans;
>>
>>by
>>subjid;
>>
>>var
>>value;
>>
>>id
>>visit;*
>>
>>run
>>*;*
>>
>>data
>>*final;
>>
>>set trans;
>>
>>if
>>_1>*15* or _2>* 15* or _3>*15* or _4>* 15* or _5>*15* or _6>* 15* ;*
>>
>>run
>>*;
>>
>>**
>>
>>*I have two questions. First, is there any way I can do this without
>>having to transpose the data?. Second, how can I list the variables _1
>>to _6 instead of printing all of them as I did . I appreciate your help.
>>*
>>
>>*Thanks*
>>
>>*SB*
>>
>>------------------------------
>>
>>Date: Wed, 28 Nov 2007 14:49:24 -0500
>>From: Ed Heaton
>>Subject: Re: run a SAS program before SAS session starts
>>
>>Masoud;
>>
>>That's what autoexec.sas is for. Look it up in the documentation.
>>
>>Ed
>>
>>Edward Heaton, Senior Systems Analyst,
>>Westat (An Employee-Owned Research Corporation),
>>1650 Research Boulevard, TB-286, Rockville, MD 20850-3195
>>Voice: (301) 610-4818 Fax: (301) 294-2085
>>mailto:EdHeaton@Westat.com http://www.Westat.com
>>
>>
>>
>>
>>-----Original Message-----
>>From: owner-sas-l@listserv.uga.edu [mailto:owner-sas-l@listserv.uga.edu]
>>On Behalf Of mpajoh@ODOT.ORG
>>Sent: Tuesday, November 27, 2007 4:17 PM
>>To: SAS-L@LISTSERV.UGA.EDU
>>Subject: run a SAS program before SAS session starts
>>
>>
>>How can I run a SAS program every time before the interactive session
>>starts?
>>
>>Masoud
>>
>>I use SAS 9.1.1.3 on XP.
>>
>>------------------------------
>>
>>Date: Wed, 28 Nov 2007 14:54:30 -0500
>>From: Bob_Abelson@HGSI.COM
>>Subject: Job Opening: Statistical Analyst (Rockville, MD)
>>
>>Apply online at http://www.hgsi.com
>>
>>Job ID: 2440
>>Position Type: Full-Time Regular
>>
>>Required Experience: 2-5 years
>>
>>Required Education: Masters Degree or Equivalent
>>
>>FLSA: Exempt (Salary)
>>
>>Work Hours Per Week: 40
>>Required Travel: No
>>
>>Relocation Available: Yes
>>
>>Recruiter Contact Information Wendy Penry, wendy_penry@hgsi.com
>>
>>
>>Summary/Description
>>We are seeking a proficient Statistical Analyst to join our talented team
>>and participate in the development of statistical methodology to support
>>pre-clinical and clinical studies as well as manufacturing activities. The
>>ideal candidate will be a contributing technical member who can dive into
>>current projects while focusing on planning for future business needs.
>>Therefore, leadership and project management, participation in regulatory
>>submissions and experience in building strong technical infrastructure
>>will be weighed similarly to programming skills.
>>
>>Specific responsibilities include:
>>- Actively participating in project teams
>>- Working collaboratively with analysts
>>- Developing analysis dataset and specifications, working with
>>Biostatisticians on implementing statistical analysis by creating tables,
>>listings and graphics in support of interim analyses, publications and
>>clinical study reports
>>- Developing new standards and technology to assist in a faster time to
>>approval of biologics
>>
>>Requirements
>>- Masters in Statistics, Biostatistics or related field
>>- At least 3-5 years experience in the biopharmaceutical, pharmaceutical
>>or related industries
>>- Proficient in SAS, SAS STAT and macro language, knowledge of S-Plus, or
>>R statistical packages is highly desirable, Knowledge of xml, html is also
>>a plus
>>- Excellent verbal and written communication skills
>>- Skilled in identifying issues related to statistical analysis,
>>recommending options and implementing solutions
>>- Familiarity with Federal regulations such as 21CFR, Part 11 and ICH
>>guidelines, prior participation in a regulatory submission is highly
>>desirable
>>- Knowledge of regulatory guidelines and their impact on statistical
>>deliverables, knowledge of electronic document management systems
>>
>>Bob Abelson
>>HGSI
>>240 314 4400 x1374
>>bob_abelson@hgsi.com
>>
>>------------------------------
>>
>>Date: Wed, 28 Nov 2007 14:57:44 -0500
>>From: Paul Walker
>>Subject: Remote Teradata Check Permission
>>
>>Here's another "homework problem" (ha ha).
>>
>>>From PC SAS, I have assigned a remote library to a teradata database (in a
>>corporate data warehouse). After the library is successfully assigned, I
>>want to run a function on one of the tables in that library to ascertain
>>whether I have the permission to insert rows into the table without
>>actually attempting to insert anything. What is the best way to do this?
>>(My program is in SCL, so if there was a function in SCL to do this, that
>>would be best.)
>>
>>TIA,
>>Paul
>>
>>------------------------------
>>
>>Date: Wed, 28 Nov 2007 12:02:32 -0800
>>From: ladde
>>Subject: I want to make a script to find all observations with the same PNR and
>>
>>Please make a script that finds all observations where
>>inskrdat=utskrdat and the persnr is the same. makes a new observation
>>with all the data from the initial observation but using the earliest
>>date for inskrdat and the latest for utskrdat. after that removes the
>>two initial observations
>>
>>persnr inskrdat inskrsatt utskrdat D
>>
>>1600124-5004 2007-05-24 30 2007-05-24
>>1600124-5004 2007-05-25 30 2007-05-25 787O
>>1600124-5004 2007-05-26 30 2007-05-28 373
>>1600124-5004 2007-05-30 30 2007-05-30 970O
>>1600124-5045 2007-03-12 30 2007-03-14 373
>>1600124-5045 2007-03-19 30 2007-03-19 970O
>>1600124-5540 2007-02-15 30 2007-02-15
>>1600124-5540 2007-06-19 30 2007-06-19
>>1600124-5540 2007-07-04 30 2007-07-04
>>1600124-5540 2007-07-19 30 2007-07-23 372
>>
>>1600124-5540 2007-07-21 30 2007-07-31
>>1600124-5540 2007-07-31 30 2007-08-31 907O
>>
>>
>>in this case this would be the result:
>>persnr inskrdat inskrsatt utskrdat D
>>
>>1600124-5004 2007-05-24 30 2007-05-24
>>1600124-5004 2007-05-25 30 2007-05-25 787O
>>1600124-5004 2007-05-26 30 2007-05-28 373
>>1600124-5004 2007-05-30 30 2007-05-30 970O
>>1600124-5045 2007-03-12 30 2007-03-14 373
>>1600124-5045 2007-03-19 30 2007-03-19 970O
>>1600124-5540 2007-02-15 30 2007-02-15
>>1600124-5540 2007-06-19 30 2007-06-19
>>1600124-5540 2007-07-04 30 2007-07-04
>>1600124-5540 2007-07-19 30 2007-07-23 372
>>
>>1600124-5540 2007-07-21 30 2007-08-31 907O
>>
>>
>>
>>
>>data have ;
>>
>>informat persnr $16. inskrdat yymmdd10. insk 2. utskrdat yymmdd10. D
>>$5.;
>>input persnr inskrdat insk utskrdat D ;
>>format persnr $16. inskrdat yymmdd10. insk 2. utskrdat yymmdd10. D
>>$5.;
>>
>>datalines;
>>16001016-165165 2007-10-17 30 2007-10-20 373
>>16001016-416161 2007-02-06 30 2007-02-06
>>16001016-416161 2007-05-22 30 2007-05-22
>>16001016-416161 2007-06-05 30 2007-06-05
>>16001016-416161 2007-06-30 30 2007-07-05 372
>>16001016-416161 2007-07-12 30 2007-07-12
>>16001016-416161 2007-08-02 30 2007-08-02 857P
>>16001016-416161 2007-10-02 30 2007-10-02
>>16001016-41665 2007-03-07 30 2007-03-07 856O
>>1600101-7064 2007-04-27 30 2007-05-02 371
>>1600101-7064 2007-05-07 30 2007-05-07
>>1600101-72167 2007-02-01 30 2007-02-01
>>1600101-72167 2007-06-19 30 2007-06-22 373
>>1600101-9242 2007-09-03 30 2007-09-03
>>1600101-9747 2007-01-25 30 2007-01-25
>>1600101-9747 2007-02-01 30 2007-02-01
>>1600101-9747 2007-04-25 30 2007-04-25 787O
>>1600101-9747 2007-06-26 30 2007-06-26 787O
>>1600101-9747 2007-06-27 30 2007-06-28 373
>>1600101-9747 2007-06-28 30 2007-06-28 974O
>>1600101-9747 2007-07-02 30 2007-07-02 974O
>>1600104-1527 2007-04-28 30 2007-04-29 373
>>1600104-1527 2007-05-04 30 2007-05-04 970O
>>1600104-16564 2007-01-03 30 2007-01-03
>>1600104-16564 2007-06-14 30 2007-06-14 787O
>>1600104-16564 2007-06-15 30 2007-06-15 787O
>>1600104-16564 2007-06-16 30 2007-06-19 373
>>1600104-16564 2007-06-21 30 2007-06-21 970O
>>1600104-16564 2007-06-21 30 2007-06-21 908O
>>1600104-4966 2007-02-19 30 2007-02-19 856O
>>1600104-4966 2007-03-08 30 2007-03-08 853O
>>1600104-4966 2007-08-20 30 2007-08-21 373
>>1600104-4966 2007-08-23 30 2007-08-23
>>1600104-4966 2007-08-24 30 2007-08-24 974O
>>1600104-50161 2007-01-25 30 2007-01-25 787O
>>1600104-50161 2007-01-26 30 2007-01-28 372
>>1600104-50161 2007-01-30 30 2007-01-30 970O
>>1600104-6204 2007-02-27 30 2007-02-27
>>1600104-6204 2007-03-14 30 2007-03-14
>>1600104-6204 2007-03-20 30 2007-03-20
>>1600104-6204 2007-03-21 30 2007-03-21 787O
>>1600104-6204 2007-03-22 30 2007-03-22 787O
>>1600104-6204 2007-03-22 30 2007-03-23 373
>>1600104-6204 2007-03-28 30 2007-03-28 970O
>>1600106-41626 2007-07-04 30 2007-07-04
>>1600106-9461 2007-10-01 30 2007-10-01 884P
>>1600107-49016 2007-10-26 30 2007-10-26
>>1600107-6242 2007-09-21 30 2007-09-21
>>1600107-9445 2007-07-02 30 2007-07-02
>>1600107-9445 2007-11-20 30 2007-11-20
>>1600109-41607 2007-05-22 30 2007-05-22
>>1600109-416160 2007-05-10 30 2007-05-10
>>1600109-416160 2007-07-09 30 2007-07-09
>>1600109-416160 2007-08-28 30 2007-08-28
>>1600109-416160 2007-10-21 30 2007-10-21 787O
>>1600109-416160 2007-10-25 30 2007-10-27 373
>>1600109-416160 2007-10-30 30 2007-10-30 970O
>>1600109-4906 2007-01-31 30 2007-01-31
>>1600109-4906 2007-02-01 30 2007-02-04 373
>>1600109-4906 2007-02-06 30 2007-02-06 974O
>>1600109-9509 2007-04-23 30 2007-04-23
>>1600109-9509 2007-09-18 30 2007-09-20 373
>>1600109-9509 2007-09-24 30 2007-09-24 974O
>>1600110-416167 2007-05-09 30 2007-05-09 372
>>1600110-416167 2007-05-14 30 2007-05-14 970O
>>1600111-41604 2007-02-01 30 2007-02-01
>>1600111-41604 2007-05-10 30 2007-05-10
>>1600111-41604 2007-05-11 30 2007-05-11
>>1600111-41604 2007-05-13 30 2007-05-13 787O
>>1600111-41604 2007-06-10 30 2007-06-11 373
>>1600111-41604 2007-06-14 30 2007-06-14 974O
>>1600111-49165 2007-02-01 30 2007-02-04 373
>>1600111-49165 2007-02-05 30 2007-02-05 974O
>>1600111-49165 2007-02-06 30 2007-02-06
>>1600111-49165 2007-02-08 30 2007-02-08 974O
>>1600111-49216 2007-01-08 30 2007-01-08 836P
>>1600111-49216 2007-01-25 30 2007-01-25
>>1600111-49216 2007-04-10 30 2007-04-10 857P
>>1600111-49216 2007-05-22 30 2007-05-22 857P
>>1600111-49216 2007-07-03 30 2007-07-04 372
>>1600111-49216 2007-07-04 15 2007-07-09 372
>>1600112-4944 2007-08-10 30 2007-08-10
>>1600112-4944 2007-11-03 30 2007-11-03
>>1600112-4944 2007-11-26 30 2007-11-26
>>1600114-416616 2007-01-08 30 2007-01-08
>>1600114-416616 2007-06-15 30 2007-06-17 373
>>1600114-416616 2007-06-18 30 2007-06-18 974O
>>1600114-5544 2007-01-04 30 2007-01-04 884O
>>1600114-5544 2007-01-25 30 2007-01-25 856O
>>1600114-5544 2007-01-25 30 2007-01-25
>>1600114-5544 2007-01-31 30 2007-01-31
>>1600114-5544 2007-02-03 30 2007-02-03 787O
>>1600114-5544 2007-02-06 30 2007-02-06
>>1600114-5544 2007-02-07 38 2007-02-11 373
>>1600114-5544 2007-02-07 30 2007-02-07 787O
>>1600114-64162 2007-05-10 30 2007-05-10
>>1600114-64162 2007-10-03 30 2007-10-04 372
>>1600114-64162 2007-10-08 30 2007-10-08 974O
>>1600115-41666 2007-02-26 30 2007-02-26
>>1600115-41666 2007-09-28 30 2007-09-28
>>1600115-41666 2007-10-26 30 2007-10-26
>>1600115-5624 2007-11-07 30 2007-11-07
>>1600116-2944 2007-09-27 30 2007-09-27
>>1600116-41624 2007-04-22 30 2007-04-22 884P
>>1600116-41624 2007-05-22 30 2007-05-22
>>1600116-41624 2007-05-27 30 2007-05-30 373
>>1600116-5540 2007-01-29 30 2007-01-29 974O
>>1600116-5540 2007-03-09 30 2007-03-09 974O
>>1600116-5540 2007-04-04 30 2007-04-04 884O
>>1600117-0045 2007-04-04 30 2007-04-07 372
>>1600117-0045 2007-04-11 30 2007-04-11 970O
>>1600117-49416 2007-05-14 30 2007-05-14
>>1600117-49416 2007-07-04 30 2007-07-04
>>1600117-49416 2007-09-30 30 2007-10-02 384
>>1600117-49416 2007-10-09 30 2007-10-09
>>1600117-49416 2007-10-09 38 2007-10-11 384
>>1600117-49416 2007-10-23 30 2007-10-23 908O
>>1600117-49416 2007-10-23 30 2007-10-28 370
>>1600117-49416 2007-11-02 30 2007-11-02 974O
>>1600119-4161616 2007-05-06 30 2007-05-07 373
>>1600119-4161616 2007-05-11 30 2007-05-11 970O
>>1600119-4961 2007-02-01 30 2007-02-01
>>1600119-4961 2007-07-05 30 2007-07-08 373
>>1600119-4961 2007-07-10 30 2007-07-10 974O
>>1600120-4101 2007-05-23 30 2007-05-23
>>1600120-4101 2007-10-21 30 2007-10-21 787O
>>1600120-4101 2007-10-22 30 2007-10-22 373
>>1600120-4101 2007-10-23 30 2007-10-23 970O
>>1600120-4101 2007-10-26 30 2007-10-26 970O
>>1600120-41644 2007-04-24 30 2007-04-24
>>1600120-41644 2007-09-23 30 2007-09-26 373
>>1600120-4927 2007-02-20 30 2007-02-20
>>1600120-4927 2007-08-04 30 2007-08-05 373
>>1600120-4927 2007-08-08 30 2007-08-08 970O
>>1600121-41627 2007-06-26 30 2007-06-26
>>1600121-41627 2007-11-01 30 2007-11-01
>>1600121-416616 2007-01-26 30 2007-01-26
>>1600121-416616 2007-06-18 30 2007-06-18
>>1600121-416616 2007-06-27 30 2007-07-01 373
>>1600121-50169 2007-09-17 30 2007-09-17
>>16001216-25164 2007-03-13 30 2007-03-13
>>16001216-41661 2007-03-15 30 2007-03-21 373
>>16001216-41661 2007-04-26 30 2007-04-26 908O
>>16001216-41661 2007-05-03 30 2007-05-03
>>16001216-41661 2007-05-09 30 2007-05-09 908O
>>16001216-5645 2007-11-13 30 2007-11-13
>>16001216-6420 2007-03-22 30 2007-03-24 372
>>16001216-6420 2007-03-25 30 2007-03-25 974O
>>16001216-6420 2007-05-22 30 2007-05-22 884P
>>16001216-6420 2007-11-23 30 2007-11-23
>>1600122-0766 2007-04-14 30 2007-04-16 372
>>1600122-0766 2007-04-20 30 2007-04-20 970O
>>1600122-0766 2007-07-09 30 2007-07-09 884P
>>1600122-41600 2007-04-30 30 2007-04-30
>>1600122-41600 2007-10-04 30 2007-10-04 787O
>>1600122-41600 2007-10-04 30 2007-10-06 373
>>1600122-41600 2007-10-09 30 2007-10-09 970O
>>1600122-41600 2007-10-12 30 2007-10-14 376
>>1600122-41600 2007-10-17 30 2007-10-17 857P
>>1600122-4729 2007-10-10 30 2007-10-10 908O
>>1600122-4729 2007-10-16 30 2007-10-16 857P
>>1600122-4729 2007-10-22 30 2007-10-22
>>1600122-4729 2007-10-25 30 2007-10-25
>>1600122-4729 2007-10-26 30 2007-10-26
>>1600122-4729 2007-11-06 30 2007-11-06 857P
>>1600122-4729 2007-11-22 30 2007-11-22
>>1600122-5567 2007-01-10 30 2007-01-10
>>1600122-5567 2007-01-11 30 2007-01-11 787O
>>1600122-5567 2007-01-12 30 2007-01-16 373
>>1600124-1961 2007-11-19 30 2007-11-19
>>1600124-46164 2007-05-11 30 2007-05-14 372
>>1600124-46164 2007-05-16 30 2007-05-16
>>1600124-49160 2007-07-16 30 2007-07-16
>>1600124-4940 2007-04-02 30 2007-04-02
>>1600124-4940 2007-07-24 30 2007-07-24
>>1600124-4940 2007-08-22 30 2007-08-28 373
>>1600124-5004 2007-05-24 30 2007-05-24
>>1600124-5004 2007-05-25 30 2007-05-25 787O
>>1600124-5004 2007-05-26 30 2007-05-28 373
>>1600124-5004 2007-05-30 30 2007-05-30 970O
>>1600124-5045 2007-03-12 30 2007-03-14 373
>>1600124-5045 2007-03-19 30 2007-03-19 970O
>>1600124-5540 2007-02-15 30 2007-02-15
>>1600124-5540 2007-06-19 30 2007-06-19
>>1600124-5540 2007-07-04 30 2007-07-04
>>1600124-5540 2007-07-19 30 2007-07-23 372
>>1600124-5540 2007-07-31 30 2007-07-31
>>1600124-5540 2007-07-31 30 2007-07-31 907O
>>;run;
>>
>>------------------------------
>>
>>Date: Wed, 28 Nov 2007 20:08:35 GMT
>>From: "sphuang via MathKB.com"
>>Subject: Help! SAS NLMIXED. The final Hessian matrix is not positive definite?
>>
>>Hi, there,
>>I am currently running sas PROC NLMIXED to analyze data. My sample are 27
>>animals. Their running speed were repeatedly measured at 9 temperature
>>treatments. The running speed is tested whether it can be predicted by
>>temperatues using a logistic-expotential function. Therefore, the function I
>>wrote in SAS code is an logistic-expotential.
>>My sas code is listed as following text(A). The problem I faced is that there
>>is a warning in log page, which is as following text(B). Could anyone give me
>>any suggestion to patch it on? any suggestions would be highly appreciated.
>>many many thanks.
>>
>>Shu-Ping
>>
>>text(A), My sas code:
>>proc nlmixed data= sprint_30s method=firo ;
>>parms b1=0.04 b6=4.5 b2=0.2 b4=0.2 U1=0 U2=0 VAR=0.1 t11=0.1 t22=0 t12=0;
>>bounds VAR>=0;
>>LOW=1/(0.015+U1+b6*exp(-b2*(Temp-2))); HIGH=1-exp(b4*(Temp-43.1)+U2);
>>pred=b1*LOW*HIGH;
>>VAR1=t11*t11;
>>cov12=t11*t12;
>>VAR2=t12*t12+t22*t22;
>>model speed_m~normal (pred,VAR);
>>random U1 U2 ~normal ([0,0],[VAR1, cov12,VAR2]) subject=ID;
>>run;
>>
>>text B:
>>WARNING: The final Hessian matrix is not positive definite, and therefore the
>>estimated covariance matrix is not full rank and may be unreliable. The
>>variance of some parameter estimates is zero or some parameters are linearly
>>related
>>to other parameters.
>>
>>--
>>Message posted via MathKB.com
>>http://www.mathkb.com/Uwe/Forums.aspx/sas/200711/1
>>
>>------------------------------
>>
>>Date: Wed, 28 Nov 2007 12:08:43 -0800
>>From: Xuhong
>>Subject: PLEASE help with my factor analysis and PROC CALIS!!!
>>
>>Dear SAS experts,
>>
>>I have a survey dataset and am trying to do the EFA in the first and
>>CFA in the second. After I did EFA by using PROC FACTOR, I thought I
>>found some interpretable factors and tried to start with PROC CALIS.
>>
>>However the output from PROC CALIS showed a large Chi-Square and with
>>"Pr>Chi-square" >EFA is not confirmed.
>>
>>I do quite understand the PROC CALIS. How this procedure will get the
>>rotation information from EFA since I did rotation in EFA.
>>
>>Do you have any suggestions how I could proceed???
>>
>>Thanks a lot!
>>Xuhong
>>
>>
>>
>>PROC FACTOR DATA=&mylib.raw_imp3 METHOD=ML NFACT=3 SCREE
>> PREROTATE=VARIMAX ROTATE=PROMAX;
>>RUN;
>>
>>/***SAS output ***/
>>
>>MAXIMUM LIKELIHOOD EXPLORATORY FACTOR ANALYSIS
>> Rotated Factor Pattern (Standardized Regression Coefficients)
>>
>> Factor1 Factor2 Factor3
>>
>>market 0.06115 0.04584 -0.01965
>>age 0.14962 -0.40647 -0.09373
>>employ 0.12416 -0.23073 -0.30358
>>educate 0.05473 -0.03647 0.39036
>>hhsize -0.00033 0.76737 0.09669
>>kidsal1 0.03008 0.61464 -0.05251
>>incsum 0.04012 -0.02415 0.97438
>>q4 0.61490 -0.00563 0.03685
>>q18 0.50124 -0.02407 0.07865
>>q19 0.60147 -0.03067 0.07210
>>q1 0.84236 -0.00541 -0.01870
>>q8 0.71014 -0.01739 0.12363
>>q5 0.84382 0.01161 -0.02136
>>q6 0.89880 0.00972 -0.05110
>>q3 0.90776 0.01388 -0.01119
>>ethnic -0.01463 0.13145 -0.05977
>>midinc 0.03089 -0.02625 0.97895
>>mard1_0 0.07156 0.19761 0.32789
>>Gender 0.03920 -0.00689 0.07559
>>kidsal2_1 0.02716 0.66733 -0.02775
>>kidsal3_1 0.02871 0.49448 0.00393
>>kidsal4_1 -0.02388 -0.90061 0.00383
>>
>>/
>>*********************************************************************/
>>
>>TITLE2 "MAXIMUM LIKELIHOOD CONFIRMATORY FACTOR ANALYSIS";
>>PROC CALIS DATA=&mylib.raw_imp3 RESIDUAL MODIFICATION;
>> LINEQS /* specify the equations linking factors with variables */
>> q4 = P1F1 F1 + E1,
>> q18 = P2F1 F1 + E2,
>> q19 = P3F1 F1 + E3,
>> q1 = P4F1 F1 + E4,
>> q8 = P5F1 F1 + E5,
>> q5 = P6F1 F1 + E6,
>> q6 = P7F1 F1 + E7,
>> q3 = P8F1 F1 + E8,
>>age=AgeF2 F2 + E9,
>>hhsize = HhF2 F2 + E10,
>>kidsal1 = K1F2 F2 + E11,
>>kidsal2_1 = K2F2 F2 + E12,
>>kidsal3_1 = K3F2 F2 + E13,
>>kidsal4_1 = K4F2 F2 + E14,
>>employ = L1F3 F3 + E15,
>>educate = L2F3 F3 + E16,
>>incsum = L3F3 F3 + E17,
>>midinc = L4F3 F3 + E18,
>>mard1_0 = L5F3 F3 + E19;
>>
>> STD /* specify variances of common and unique factors */
>> F1=1,
>>F2=1,
>>F3=1,
>>E1-E19 = VARErr1-VARErr19;
>>COV /* specify covariances among common factors */
>>F1 F2 = CovF1F2,
>>F1 F3 = CovF1F3,
>>F2 F3 = CovF2F3;
>>
>> VAR q4 q18 q19 q1 q8 q5 q6 q3 age hhsize kidsal1 kidsal2_1
>>kidsal3_1 kidsal4_1
>> employ educate incsum midinc mard1_0;
>>RUN;
>>
>>
>>/******* SAS output ****************************/
>>
>>The CALIS Procedure
>>Covariance Structure Analysis: Maximum Likelihood Estimation
>>
>>Fit Function 1.6764
>>Goodness of Fit Index (GFI) 0.8559
>>GFI Adjusted for Degrees of Freedom (AGFI) 0.8162
>>Root Mean Square Residual (RMR) 0.0791
>>Parsimonious GFI (Mulaik, 1989) 0.7458
>>Chi-Square 13319.2953
>>Chi-Square DF 149
>>Pr> Chi-Square >Independence Model Chi-Square 94677
>>Independence Model Chi-Square DF 171
>>RMSEA Estimate 0.1055
>>RMSEA 90% Lower Confidence Limit .
>>RMSEA 90% Upper Confidence Limit .
>>ECVI Estimate 1.6868
>>ECVI 90% Lower Confidence Limit .
>>ECVI 90% Upper Confidence Limit .
>>Probability of Close Fit .
>>Bentler's Comparative Fit Index 0.8606
>>Normal Theory Reweighted LS Chi-Square 12710.3514
>>Akaike's Information Criterion 13021.2953
>>Bozdogan's (1987) CAIC 11832.2122
>>Schwarz's Bayesian Criterion 11981.2122
>>McDonald's (1989) Centrality 0.4366
>>Bentler & Bonett's (1980) Non-normed Index 0.8401
>>Bentler & Bonett's (1980) NFI 0.8593
>>
>>------------------------------
>>
>>Date: Wed, 28 Nov 2007 15:12:55 -0500
>>From: Ed Heaton
>>Subject: Re: Do loop for array?
>>
>>Given...
>>
>> Array x[3,2] x11-x12 x21-x22 x31-x32 ;
>>
>>I can code...
>>
>> sum = sum( of x[*] ) ;
>>
>>but not...
>>
>> sum = sum( of x[1,*] ) ;
>>
>>Okay, I must admit that I'm prone to calling things bugs when they
>>probably are just design features!? But this seems like a bug (design
>>flaw) to me.
>>
>>Ed
>>
>>Edward Heaton, Senior Systems Analyst,
>>Westat (An Employee-Owned Research Corporation),
>>1650 Research Boulevard, TB-286, Rockville, MD 20850-3195
>>Voice: (301) 610-4818 Fax: (301) 294-2085
>>mailto:EdHeaton@Westat.com http://www.Westat.com
>>
>>
>>
>>
>>-----Original Message-----
>>From: owner-sas-l@listserv.uga.edu [mailto:owner-sas-l@listserv.uga.edu]
>>On Behalf Of iw1junk@comcast.net
>>Sent: Monday, November 26, 2007 9:23 PM
>>To: SAS(r) Discussion
>>Cc: Paul Dorfman; data _null_,; YSL
>>Subject: Re: Do loop for array?
>>
>>
>>Summary: Too cute, questionable names.
>>#iw-value=1
>>
>>Paul,
>>
>>I resisted answering on the basis that the names
>>
>> X11, X12, ..., X32
>>
>>build too much data structure into the variable names. If the first law
>>of program simplicity is - Arrays doom one to program with arrays. Then
>>the second law of program simplicity is - Data structure in the names,
>>doom one to program with macro code. That doesn't mean the laws cannot
>>be broken. It only means one should wait for a reason to do so.
>>
>>Now your terse macro breaks my resistance. Although I know that you
>>understand the consequences of your macro, I wonder how many would be
>>surprised at
>>
>> 12 data _null_ ;
>> 13 %arr (x, 3, 2) ;
>> 14 x3 = sum(of x[*]) ;
>> ERROR: Illegal reference to the array x3.
>> 15 put x3= ;
>> ERROR: Illegal reference to the array x3.
>> ERROR: Illegal variable type for I/O statement.
>> 16 run ;
>>
>>I would rather avoid side effects to save a few a lines of code.
>>
>>Ian Whitlock
>>===============
>>
>>Date: Tue, 27 Nov 2007 00:02:59 +0000
>>Reply-To: Paul Dorfman
>>Sender: "SAS(r) Discussion"
>>From: Paul Dorfman
>>Organization: PDC
>>Subject: Re: Do loop for array?
>>Comments: To: "data _null_,"
>>...which is splendid, but can be further simplified by letting SAS take
>>care of concocting column list suffixes:
>>
>>%macro arr (root, r, c) ;
>> %do r = 1 %to &r ;
>> array &root&r [&c] ;
>> %end ;
>> array &root &root: ;
>>%mend ;
>>
>>data _null_ ;
>> %arr (x, 3, 2) ;
>> put (x[*]) (=);
>>run ;
>>-----------------------------------
>>x11=. x12=. x21=. x22=. x31=. x32=.
>>
>>Kind regards
>>------------
>>Paul Dorfman
>>Jax, FL
>>------------
>>
>>
>>-------------- Original message ----------------------
>>From: "data _null_,"
>>
>>
>>>this macro uses Jay's approach to declare 2 dimensional array.
>>>
>>>313 %macro _2d(root,r,c);
>>>314 &root[&r,&c]
>>>315 %local i j;
>>>316 %do i = 1 %to &r;
>>>317 %do j = 1 %to &c;
>>>318 &root.&i.&j
>>>319 %end;
>>>320 %end;
>>>321 %mend _2d;
>>>322 options mprint;
>>>323 data _null_;
>>>324 array %_2d(x,3,2) (1:6);
>>>MPRINT(_2D): x[3,2] x11 x12 x21 x22 x31 x32
>>>325 do i = 1 to dim(x,1);
>>>326 do j = 1 to dim(x,2);
>>>327 put (i j x[i,j]) (=);
>>>328 end;
>>>329 end;
>>>330 run;
>>>
>>>i=1 j=1 x11=1
>>>i=1 j=2 x12=2
>>>i=2 j=1 x21=3
>>>i=2 j=2 x22=4
>>>i=3 j=1 x31=5
>>>i=3 j=2 x32=6
>>>
>>>
>>>
>>>
>>
>>
>>------------------------------
>>
>>Date: Wed, 28 Nov 2007 15:37:15 -0500
>>From: "Fehd, Ronald J. (CDC/CCHIS/NCPHI)"
>>Subject: OT: CheckSums
>>
>>well, well, well, the things you find surfing one's installation:
>>
>>C:\Program Files\SAS\SAS 9.1\core\sasinst\chksums
>>
>>Ron Fehd the macro maven CDC Atlanta GA USA RJF2 at cdc dot gov
>>
>>------------------------------
>>
>>End of SAS-L Digest - 28 Nov 2007 - Special issue (#2007-1953)
>>**************************************************************
>>
>>
>>
_________________________________________________________________
Share life as it happens with the new Windows Live.Download today it's FREE!
http://www.windowslive.com/share.html?ocid=TXT_TAGLM_Wave2_sharelife_112007
|