科学网

 找回密码
  注册
科学网 标签 test 相关日志

tag 标签: test

相关日志

IELTS
langqi1988 2013-3-2 17:24
今天speaking test 是一个蓝眼睛的考官,人很和蔼。不管你的英语水平如何,考官都不会让你有不舒服的地方。整体水平还是那样,木有任何起色啊。问了好多吃的问题,最喜欢的汤是什么,中国人喜欢在嘈杂的环境中吃饭,这是为什么?感觉这个老外的口音有点重,有些地方听不懂。 这次能否有点起色那,期待期待。
2517 次阅读|0 个评论
[转载]部分相关分析-偏相关分析(Fortran程序)
deliangwang 2013-2-7 10:45
C-------------------------------------------------------- C COMPUTE PARTIAL CORRELATION COEFFICIENT AND C SIGNIFICANCE FOR CENSORED DATA C C AUGUST 1995 C C THE CODE IS BASED ON THE METHODOLOGY PRESENTED IN C 'A test for partial correlation with censored C astronomical data' C BY C M.G.Akritas and J.Siebert C Monthly Notices of the Royal Astronomical Society C 278, 919-924, 1996 C------------------------------------------------------- program partial_tau common /data/ dat(500,3),idat(500,3) common ntot common /kx/ k1,k2,k3 C------------------------------------------------------------- C INPUT DATA FILE CALLED 'DATA'. C CURRENTLY THE DATA FORMAT IS FIXED TO 3(f10.4,1x,i2,1x). C 1ST, 3RD AND 5TH COLUMN ARE INDEPENDENT, DEPENDENT AND TEST C VARIABLE, RESPECTIVELY. 2ND, 4TH AND 6TH COLUMN DENOTE C CENSORING WITH 1 = DETECTION, 0= UPPER LIMIT C EXAMPLE: C ' 26.9800 1 44.4340 0 -1.0714 1 ' C------------------------------------------------------------- open(10,file='data',status='old') C------------------------------------------------- C READ IN DATA: C DAT(I,K) = MEASUREMENT I OF VARIABLE K C IDAT(I,K) = CENSORING INDICATOR FOR DATA POINT (I,K) C DETECTION -- IDAT(I,K)=1 C UPPER LIMIT -- IDAT(I,K)=0 C-------------------------------------------------- i=1 1 read(10,110,end=99) dat(i,1),idat(i,1),dat(i,2), # idat(i,2),dat(i,3),idat(i,3) 110 format(3(f10.4,1x,i2,1x)) dat(i,1)=-dat(i,1) ! CHANGE TO RIGHT CENSORING dat(i,2)=-dat(i,2) ! CHANGE TO RIGHT CENSORING dat(i,3)=-dat(i,3) ! CHANGE TO RIGHT CENSORING i=i+1 goto 1 99 ntot=i-1 k1=1 ! INDEPENDENT VARIABLE = 1.COL OF DAT k2=2 ! DEPENDENT VARIABLE = 2.COL OF DAT k3=3 ! THIRD VARIABLE = 3.COL OF DAT call tau123(res) ! COMPUTE PARTIAL KENDALLS TAU write(6,*) 'Tau(1,2):',tau(k1,k2) write(6,*) 'Tau(1,3):',tau(k1,k3) write(6,*) 'Tau(2,3):',tau(k2,k3) write(6,*) '-- Partial Kendalls tau:', res write(6,*) ' ' write(6,*) 'Calculating variance...this takes some time....' write(6,*) ' ' call sigma(sig) ! COMPUTE VARIANCE write(6,*) 'Square root of variance (sigma):',sig write(6,*) ' ' if(abs(res/sig).gt.1.96) then write(6,*) 'Zero partial correlation rejected at level 0.05' else write(6,*) 'Null hypothesis cannot be rejected!' write(6,*) '(-- No correlation present, if influence of #third variable is excluded)' endif stop end C------------------------------------------------------ C-------- SUBROUTINES AND FUNCTIONS ------------------- C------------------------------------------------------ C------------ TAU123 --------------------------------- C-------- PARTIAL KENDALLS TAU ----------------------- subroutine tau123(res) common /kx/ k1,k2,k3 res= (tau(k1,k2)-tau(k1,k3)*tau(k2,k3))/ # sqrt((1.-tau(k1,k3)**2)*(1.-tau(k2,k3)**2)) end C------------ SIGMA ----------------------------------- C-------- VARIANCE OF STATISTIC ----------------------- subroutine sigma(sigres) common ntot common /kx/ k1,k2,k3 sig2=an( )/(ntot*(1.-tau(k1,k3)**2)*(1.-tau(k2,k3)**2)) sigres=sqrt(sig2) end C------------ AN --------------------------------------- C------- COMPUTES VALUE FOR A_N ------------------------- function an( ) double precision aasum(500) common ntot common /data/ dat(500,3),idat(500,3) common /kx/ k1,k2,k3 c1=16./(float(ntot)-1.) c2=6./((float(ntot)-1.)*(float(ntot)-2.)*(float(ntot)-3.)) asum=0.0 ave = 0.0 do 5 i=1,ntot aasum(i)=0.0 5 continue do 10 i1=1,ntot ! OUTER SUMMATION (I1) write(6,*) i1 do 11 j1=1,ntot-2 ! INNER SUMMATION WITH if(j1.eq.i1) goto 11 ! J1I2J2 AND ALL .NE. I1 do 12 j2=j1+2,ntot ! if(j2.eq.i1) goto 12 ! do 13 i2=j1+1,j2-1 ! if(i2.eq.i1) goto 13 ! cj1=- idat(j1,k1) if(dat(i1,k1).lt.dat(j1,k1)) cj1=idat(i1,k1) cj2=- idat(j1,k2) if(dat(i1,k2).lt.dat(j1,k2)) cj2=idat(i1,k2) cj3=- idat(j1,k3) if(dat(i1,k3).lt.dat(j1,k3)) cj3=idat(i1,k3) cj4=- idat(j2,k2) if(dat(i2,k2).lt.dat(j2,k2)) cj4=idat(i2,k2) cj5=- idat(j2,k3) if(dat(i2,k3).lt.dat(j2,k3)) cj5=idat(i2,k3) cj6=- idat(i2,k2) if(dat(j2,k2).lt.dat(i2,k2)) cj6=idat(j2,k2) cj7=- idat(i2,k3) if(dat(j2,k3).lt.dat(i2,k3)) cj7=idat(j2,k3) gtsum=cj1*(2.0*cj2 - cj3*(cj4*cj5+cj6*cj7) ) cj1=- idat(j2,k1) if(dat(i1,k1).lt.dat(j2,k1)) cj1=idat(i1,k1) cj2=- idat(j2,k2) if(dat(i1,k2).lt.dat(j2,k2)) cj2=idat(i1,k2) cj3=- idat(j2,k3) if(dat(i1,k3).lt.dat(j2,k3)) cj3=idat(i1,k3) cj4=- idat(j1,k2) if(dat(i2,k2).lt.dat(j1,k2)) cj4=idat(i2,k2) cj5=- idat(j1,k3) if(dat(i2,k3).lt.dat(j1,k3)) cj5=idat(i2,k3) cj6=- idat(i2,k2) if(dat(j1,k2).lt.dat(i2,k2)) cj6=idat(j1,k2) cj7=- idat(i2,k3) if(dat(j1,k3).lt.dat(i2,k3)) cj7=idat(j1,k3) gtsum=gtsum+cj1*(2.0*cj2 - cj3*(cj4*cj5+cj6*cj7) ) cj1=- idat(i2,k1) if(dat(i1,k1).lt.dat(i2,k1)) cj1=idat(i1,k1) cj2=- idat(i2,k2) if(dat(i1,k2).lt.dat(i2,k2)) cj2=idat(i1,k2) cj3=- idat(i2,k3) if(dat(i1,k3).lt.dat(i2,k3)) cj3=idat(i1,k3) cj4=- idat(j1,k2) if(dat(j2,k2).lt.dat(j1,k2)) cj4=idat(j2,k2) cj5=- idat(j1,k3) if(dat(j2,k3).lt.dat(j1,k3)) cj5=idat(j2,k3) cj6=- idat(j2,k2) if(dat(j1,k2).lt.dat(j2,k2)) cj6=idat(j1,k2) cj7=- idat(j2,k3) if(dat(j1,k3).lt.dat(j2,k3)) cj7=idat(j1,k3) gtsum=gtsum+cj1*(2.0*cj2 - cj3*(cj4*cj5+cj6*cj7) ) cj1=- idat(i1,k1) if(dat(j1,k1).lt.dat(i1,k1)) cj1=idat(j1,k1) cj2=- idat(i1,k2) if(dat(j1,k2).lt.dat(i1,k2)) cj2=idat(j1,k2) cj3=- idat(i1,k3) if(dat(j1,k3).lt.dat(i1,k3)) cj3=idat(j1,k3) cj4=- idat(j2,k2) if(dat(i2,k2).lt.dat(j2,k2)) cj4=idat(i2,k2) cj5=- idat(j2,k3) if(dat(i2,k3).lt.dat(j2,k3)) cj5=idat(i2,k3) cj6=- idat(i2,k2) if(dat(j2,k2).lt.dat(i2,k2)) cj6=idat(j2,k2) cj7=- idat(i2,k3) if(dat(j2,k3).lt.dat(i2,k3)) cj7=idat(j2,k3) gtsum=gtsum+cj1*(2.0*cj2 - cj3*(cj4*cj5+cj6*cj7) ) cj1=- idat(i2,k1) if(dat(j1,k1).lt.dat(i2,k1)) cj1=idat(j1,k1) cj2=- idat(i2,k2) if(dat(j1,k2).lt.dat(i2,k2)) cj2=idat(j1,k2) cj3=- idat(i2,k3) if(dat(j1,k3).lt.dat(i2,k3)) cj3=idat(j1,k3) cj4=- idat(j2,k2) if(dat(i1,k2).lt.dat(j2,k2)) cj4=idat(i1,k2) cj5=- idat(j2,k3) if(dat(i1,k3).lt.dat(j2,k3)) cj5=idat(i1,k3) cj6=- idat(i1,k2) if(dat(j2,k2).lt.dat(i1,k2)) cj6=idat(j2,k2) cj7=- idat(i1,k3) if(dat(j2,k3).lt.dat(i1,k3)) cj7=idat(j2,k3) gtsum=gtsum+cj1*(2.0*cj2 - cj3*(cj4*cj5+cj6*cj7) ) cj1=- idat(j2,k1) if(dat(j1,k1).lt.dat(j2,k1)) cj1=idat(j1,k1) cj2=- idat(j2,k2) if(dat(j1,k2).lt.dat(j2,k2)) cj2=idat(j1,k2) cj3=- idat(j2,k3) if(dat(j1,k3).lt.dat(j2,k3)) cj3=idat(j1,k3) cj4=- idat(i2,k2) if(dat(i1,k2).lt.dat(i2,k2)) cj4=idat(i1,k2) cj5=- idat(i2,k3) if(dat(i1,k3).lt.dat(i2,k3)) cj5=idat(i1,k3) cj6=- idat(i1,k2) if(dat(i2,k2).lt.dat(i1,k2)) cj6=idat(i2,k2) cj7=- idat(i1,k3) if(dat(i2,k3).lt.dat(i1,k3)) cj7=idat(i2,k3) gtsum=gtsum+cj1*(2.0*cj2 - cj3*(cj4*cj5+cj6*cj7) ) cj1=- idat(i1,k1) if(dat(i2,k1).lt.dat(i1,k1)) cj1=idat(i2,k1) cj2=- idat(i1,k2) if(dat(i2,k2).lt.dat(i1,k2)) cj2=idat(i2,k2) cj3=- idat(i1,k3) if(dat(i2,k3).lt.dat(i1,k3)) cj3=idat(i2,k3) cj4=- idat(j2,k2) if(dat(j1,k2).lt.dat(j2,k2)) cj4=idat(j1,k2) cj5=- idat(j2,k3) if(dat(j1,k3).lt.dat(j2,k3)) cj5=idat(j1,k3) cj6=- idat(j1,k2) if(dat(j2,k2).lt.dat(j1,k2)) cj6=idat(j2,k2) cj7=- idat(j1,k3) if(dat(j2,k3).lt.dat(j1,k3)) cj7=idat(j2,k3) gtsum=gtsum+cj1*(2.0*cj2 - cj3*(cj4*cj5+cj6*cj7) ) cj1=- idat(j1,k1) if(dat(i2,k1).lt.dat(j1,k1)) cj1=idat(i2,k1) cj2=- idat(j1,k2) if(dat(i2,k2).lt.dat(j1,k2)) cj2=idat(i2,k2) cj3=- idat(j1,k3) if(dat(i2,k3).lt.dat(j1,k3)) cj3=idat(i2,k3) cj4=- idat(j2,k2) if(dat(i1,k2).lt.dat(j2,k2)) cj4=idat(i1,k2) cj5=- idat(j2,k3) if(dat(i1,k3).lt.dat(j2,k3)) cj5=idat(i1,k3) cj6=- idat(i1,k2) if(dat(j2,k2).lt.dat(i1,k2)) cj6=idat(j2,k2) cj7=- idat(i1,k3) if(dat(j2,k3).lt.dat(i1,k3)) cj7=idat(j2,k3) gtsum=gtsum+cj1*(2.0*cj2 - cj3*(cj4*cj5+cj6*cj7) ) cj1=- idat(j2,k1) if(dat(i2,k1).lt.dat(j2,k1)) cj1=idat(i2,k1) cj2=- idat(j2,k2) if(dat(i2,k2).lt.dat(j2,k2)) cj2=idat(i2,k2) cj3=- idat(j2,k3) if(dat(i2,k3).lt.dat(j2,k3)) cj3=idat(i2,k3) cj4=- idat(j1,k2) if(dat(i1,k2).lt.dat(j1,k2)) cj4=idat(i1,k2) cj5=- idat(j1,k3) if(dat(i1,k3).lt.dat(j1,k3)) cj5=idat(i1,k3) cj6=- idat(i1,k2) if(dat(j1,k2).lt.dat(i1,k2)) cj6=idat(j1,k2) cj7=- idat(i1,k3) if(dat(j1,k3).lt.dat(i1,k3)) cj7=idat(j1,k3) gtsum=gtsum+cj1*(2.0*cj2 - cj3*(cj4*cj5+cj6*cj7) ) cj1=- idat(i1,k1) if(dat(j2,k1).lt.dat(i1,k1)) cj1=idat(j2,k1) cj2=- idat(i1,k2) if(dat(j2,k2).lt.dat(i1,k2)) cj2=idat(j2,k2) cj3=- idat(i1,k3) if(dat(j2,k3).lt.dat(i1,k3)) cj3=idat(j2,k3) cj4=- idat(i2,k2) if(dat(j1,k2).lt.dat(i2,k2)) cj4=idat(j1,k2) cj5=- idat(i2,k3) if(dat(j1,k3).lt.dat(i2,k3)) cj5=idat(j1,k3) cj6=- idat(j1,k2) if(dat(i2,k2).lt.dat(j1,k2)) cj6=idat(i2,k2) cj7=- idat(j1,k3) if(dat(i2,k3).lt.dat(j1,k3)) cj7=idat(i2,k3) gtsum=gtsum+cj1*(2.0*cj2 - cj3*(cj4*cj5+cj6*cj7) ) cj1=- idat(j1,k1) if(dat(j2,k1).lt.dat(j1,k1)) cj1=idat(j2,k1) cj2=- idat(j1,k2) if(dat(j2,k2).lt.dat(j1,k2)) cj2=idat(j2,k2) cj3=- idat(j1,k3) if(dat(j2,k3).lt.dat(j1,k3)) cj3=idat(j2,k3) cj4=- idat(i1,k2) if(dat(i2,k2).lt.dat(i1,k2)) cj4=idat(i2,k2) cj5=- idat(i1,k3) if(dat(i2,k3).lt.dat(i1,k3)) cj5=idat(i2,k3) cj6=- idat(i2,k2) if(dat(i1,k2).lt.dat(i2,k2)) cj6=idat(i1,k2) cj7=- idat(i2,k3) if(dat(i1,k3).lt.dat(i2,k3)) cj7=idat(i1,k3) gtsum=gtsum+cj1*(2.0*cj2 - cj3*(cj4*cj5+cj6*cj7) ) cj1=- idat(i2,k1) if(dat(j2,k1).lt.dat(i2,k1)) cj1=idat(j2,k1) cj2=- idat(i2,k2) if(dat(j2,k2).lt.dat(i2,k2)) cj2=idat(j2,k2) cj3=- idat(i2,k3) if(dat(j2,k3).lt.dat(i2,k3)) cj3=idat(j2,k3) cj4=- idat(j1,k2) if(dat(i1,k2).lt.dat(j1,k2)) cj4=idat(i1,k2) cj5=- idat(j1,k3) if(dat(i1,k3).lt.dat(j1,k3)) cj5=idat(i1,k3) cj6=- idat(i1,k2) if(dat(j1,k2).lt.dat(i1,k2)) cj6=idat(j1,k2) cj7=- idat(i1,k3) if(dat(j1,k3).lt.dat(i1,k3)) cj7=idat(j1,k3) gtsum=gtsum+cj1*(2.0*cj2 - cj3*(cj4*cj5+cj6*cj7) ) aasum(i1)=aasum(i1)+1./24.*gtsum !ADD SUMMATION OVER PERMUTATIONS 13 continue ! 12 continue ! 11 continue ! ave = ave + c2*aasum(i1) 10 continue ave=ave/float(ntot) do 20 i=1,ntot asum=asum+(c2*aasum(i)-ave)**2 20 continue an=asum*c1 return end C------------- TAU ------------------------------------------- C------- COMPUTES KENDALLS TAU ------------------------------- function tau(k,l) common ntot ac=2./(float(ntot)*(float(ntot)-1)) sum=0.0 do 11 j=1,ntot do 12 i=1,ntot if (i.ge.j) goto 11 sum=sum+h(k,l,i,j) 12 continue 11 continue tau=sum*ac return end C-------------- H -------------------------------------------- C------- COMPUTE VALUE FOR H (SEE FORMULA) -------------------- function h(k,l,i,j) common /data/ dat(500,3),idat(500,3) cj1=-idat(j,k) if(dat(i,k).lt.dat(j,k)) cj1=idat(i,k) cj2=-idat(j,l) if(dat(i,l).lt.dat(j,l)) cj2=idat(i,l) h=cj1*cj2 return end
个人分类: 编程笔记|2039 次阅读|0 个评论
test
xykxw 2013-1-5 13:33
test
1803 次阅读|0 个评论
[转载]LIFE IS A JOURNEY
guanjiwen 2012-11-30 17:17
Life is a journey filled with lessons, hardships, heartaches, joys, celebrations and special moments that will ultimately lead us to our destination, our purpose in life. The road will not always be smooth; in fact, throughout our travels, we will encounter many challenges. Some of these challenges will test our courage, strengths, weaknesses, and faith. Along the way, we may stumble upon obstacles that will come between the paths that we are destined to take. In order to follow the right path, we must overcome these obstacles. Sometimes these obstacles are really blessings in disguise, only we don't realize that at the time. Along our journey we will be confronted with many situations, some will be filled with joy, and some will be filled with heartache. How we react to what we are faced with determines what kind of outcome the rest of our journey through life will be like. When things don't always go our way, we have two choices in dealing with the situations. We can focus on the fact that things didn't go how we had hoped they would and let life pass us by, or two, we can make the best out of the situation and know that these are only temporary setbacks and find the lessons that are to be learned. Time stops for no one, and if we allow ourselves to focus on the negative we might miss out on some really amazing things that life has to offer. We can't go back to the past, we can only take the lessons that we have learned and the experiences that we have gained from it and move on. It is because of the heartaches, as well as the hardships, that in the end help to make us a stronger person. The people that we meet on our journey, are people that we are destined to meet. Everybody comes into our lives for some reason or another and we don't always know their purpose until it is too late. They all play some kind of role. Some may stay for a lifetime; others may only stay for a short while. It is often the people who stay for only a short time that end up making a lasting impression not only in our lives, but in our hearts as well. Although we may not realize it at the time, they will make a difference and change our lives in a way we never could imagine. To think that one person can have such a profound affect on your life forever is truly a blessing. It is because of these encounters that we learn some of life's best lessons and sometimes we even learn a little bit about ourselves. People will come and go into our lives quickly, but sometimes we are lucky to meet that one special person that will stay in our hearts forever no matter what. Even though we may not always end up being with that person and they may not always stay in our life for as long as we like, the lessons that we have learned from them and the experiences that we have gained from meeting that person, will stay with us forever. It's these things that will give us strength to continue on with our journey. We know that we can always look back on those times of our past and know that because of that one individual, we are who we are and we can remember the wonderful moments that we have shared with that person. Memories are priceless treasures that we can cherish forever in our hearts. They also enables us to continue on with our journey for whatever life has in store for us. Sometimes all it takes is one special person to help us look inside ourselves and find a whole different person that we never knew existed. Our eyes are suddenly opened to a world we never knew existed- a world where time is so precious and moments never seem to last long enough. Throughout this adventure, people will give you advice and insights on how to live your life but when it all comes down to it, you must always do what you feel is right. Always follow your heart, and most importantly never have any regrets. Don't hold anything back. Say what you want to say, and do what you want to do, because sometimes we don't get a second chance to say or do what we should have the first time around. It is often said that what doesn't kill you will make you stronger. It all depends on how one defines the word "strong" It can have different meanings to different people. In this sense, "stronger" means looking back at the person you were and comparing it to the person you have become today. It also means looking deep into your soul and realizing that the person you are today couldn't exist if it weren't for the things that have happened in the past or for the people that you have met. Everything that happens in our life happens for a reason and sometimes that means we must face heartaches in order to experience joy.
714 次阅读|0 个评论

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-5-20 00:06

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部